H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_ALTERNATIVE_H |
| 2 | #define _ASM_X86_ALTERNATIVE_H |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 3 | |
| 4 | #include <linux/types.h> |
| 5 | #include <linux/stddef.h> |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 6 | #include <linux/stringify.h> |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 7 | #include <asm/asm.h> |
Jiri Kosina | 17f4157 | 2013-07-23 10:09:28 +0200 | [diff] [blame] | 8 | #include <asm/ptrace.h> |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 9 | |
| 10 | /* |
| 11 | * Alternative inline assembly for SMP. |
| 12 | * |
| 13 | * The LOCK_PREFIX macro defined here replaces the LOCK and |
| 14 | * LOCK_PREFIX macros used everywhere in the source tree. |
| 15 | * |
| 16 | * SMP alternatives use the same data structures as the other |
| 17 | * alternatives and the X86_FEATURE_UP flag to indicate the case of a |
| 18 | * UP system running a SMP kernel. The existing apply_alternatives() |
| 19 | * works fine for patching a SMP kernel for UP. |
| 20 | * |
| 21 | * The SMP alternative tables can be kept after boot and contain both |
| 22 | * UP and SMP versions of the instructions to allow switching back to |
| 23 | * SMP at runtime, when hotplugging in a new CPU, which is especially |
| 24 | * useful in virtualized environments. |
| 25 | * |
| 26 | * The very common lock prefix is handled as special case in a |
| 27 | * separate table which is a pure address list without replacement ptr |
| 28 | * and size information. That keeps the table sizes small. |
| 29 | */ |
| 30 | |
| 31 | #ifdef CONFIG_SMP |
Luca Barbieri | b3ac891 | 2010-02-24 10:54:22 +0100 | [diff] [blame] | 32 | #define LOCK_PREFIX_HERE \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 33 | ".pushsection .smp_locks,\"a\"\n" \ |
| 34 | ".balign 4\n" \ |
| 35 | ".long 671f - .\n" /* offset */ \ |
| 36 | ".popsection\n" \ |
Luca Barbieri | b3ac891 | 2010-02-24 10:54:22 +0100 | [diff] [blame] | 37 | "671:" |
| 38 | |
| 39 | #define LOCK_PREFIX LOCK_PREFIX_HERE "\n\tlock; " |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 40 | |
| 41 | #else /* ! CONFIG_SMP */ |
H. Peter Anvin | b701a47 | 2010-04-29 16:03:57 -0700 | [diff] [blame] | 42 | #define LOCK_PREFIX_HERE "" |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 43 | #define LOCK_PREFIX "" |
Thomas Gleixner | 96a388d | 2007-10-11 11:20:03 +0200 | [diff] [blame] | 44 | #endif |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 45 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 46 | struct alt_instr { |
Andy Lutomirski | 59e97e4 | 2011-07-13 09:24:10 -0400 | [diff] [blame] | 47 | s32 instr_offset; /* original instruction */ |
| 48 | s32 repl_offset; /* offset to replacement instruction */ |
H. Peter Anvin | 83a7a2a | 2010-06-10 00:10:43 +0000 | [diff] [blame] | 49 | u16 cpuid; /* cpuid bit set for replacement */ |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 50 | u8 instrlen; /* length of original instruction */ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 51 | u8 replacementlen; /* length of new instruction */ |
| 52 | u8 padlen; /* length of build-time padding */ |
| 53 | } __packed; |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 54 | |
Ingo Molnar | 5e907bb | 2015-04-30 09:09:26 +0200 | [diff] [blame] | 55 | /* |
| 56 | * Debug flag that can be tested to see whether alternative |
| 57 | * instructions were patched in already: |
| 58 | */ |
| 59 | extern int alternatives_patched; |
| 60 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 61 | extern void alternative_instructions(void); |
| 62 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); |
| 63 | |
| 64 | struct module; |
| 65 | |
| 66 | #ifdef CONFIG_SMP |
| 67 | extern void alternatives_smp_module_add(struct module *mod, char *name, |
| 68 | void *locks, void *locks_end, |
| 69 | void *text, void *text_end); |
| 70 | extern void alternatives_smp_module_del(struct module *mod); |
Rusty Russell | 816afe4 | 2012-08-06 17:29:49 +0930 | [diff] [blame] | 71 | extern void alternatives_enable_smp(void); |
Masami Hiramatsu | 2cfa197 | 2010-02-02 16:49:11 -0500 | [diff] [blame] | 72 | extern int alternatives_text_reserved(void *start, void *end); |
Suresh Siddha | 3fb82d5 | 2010-11-23 16:11:40 -0800 | [diff] [blame] | 73 | extern bool skip_smp_alternatives; |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 74 | #else |
| 75 | static inline void alternatives_smp_module_add(struct module *mod, char *name, |
Joe Perches | 2ac1ea7 | 2008-03-23 01:01:37 -0700 | [diff] [blame] | 76 | void *locks, void *locks_end, |
| 77 | void *text, void *text_end) {} |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 78 | static inline void alternatives_smp_module_del(struct module *mod) {} |
Rusty Russell | 816afe4 | 2012-08-06 17:29:49 +0930 | [diff] [blame] | 79 | static inline void alternatives_enable_smp(void) {} |
Masami Hiramatsu | 2cfa197 | 2010-02-02 16:49:11 -0500 | [diff] [blame] | 80 | static inline int alternatives_text_reserved(void *start, void *end) |
| 81 | { |
| 82 | return 0; |
| 83 | } |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 84 | #endif /* CONFIG_SMP */ |
| 85 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 86 | #define b_replacement(num) "664"#num |
| 87 | #define e_replacement(num) "665"#num |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 88 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 89 | #define alt_end_marker "663" |
| 90 | #define alt_slen "662b-661b" |
| 91 | #define alt_pad_len alt_end_marker"b-662b" |
| 92 | #define alt_total_slen alt_end_marker"b-661b" |
| 93 | #define alt_rlen(num) e_replacement(num)"f-"b_replacement(num)"f" |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 94 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 95 | #define __OLDINSTR(oldinstr, num) \ |
| 96 | "661:\n\t" oldinstr "\n662:\n" \ |
| 97 | ".skip -(((" alt_rlen(num) ")-(" alt_slen ")) > 0) * " \ |
| 98 | "((" alt_rlen(num) ")-(" alt_slen ")),0x90\n" |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 99 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 100 | #define OLDINSTR(oldinstr, num) \ |
| 101 | __OLDINSTR(oldinstr, num) \ |
| 102 | alt_end_marker ":\n" |
| 103 | |
| 104 | /* |
Borislav Petkov | dbe4058 | 2015-04-04 15:34:43 +0200 | [diff] [blame] | 105 | * max without conditionals. Idea adapted from: |
| 106 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax |
| 107 | * |
| 108 | * The additional "-" is needed because gas works with s32s. |
| 109 | */ |
| 110 | #define alt_max_short(a, b) "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") - (" b ")))))" |
| 111 | |
| 112 | /* |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 113 | * Pad the second replacement alternative with additional NOPs if it is |
| 114 | * additionally longer than the first replacement alternative. |
| 115 | */ |
Borislav Petkov | dbe4058 | 2015-04-04 15:34:43 +0200 | [diff] [blame] | 116 | #define OLDINSTR_2(oldinstr, num1, num2) \ |
| 117 | "661:\n\t" oldinstr "\n662:\n" \ |
| 118 | ".skip -((" alt_max_short(alt_rlen(num1), alt_rlen(num2)) " - (" alt_slen ")) > 0) * " \ |
| 119 | "(" alt_max_short(alt_rlen(num1), alt_rlen(num2)) " - (" alt_slen ")), 0x90\n" \ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 120 | alt_end_marker ":\n" |
| 121 | |
| 122 | #define ALTINSTR_ENTRY(feature, num) \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 123 | " .long 661b - .\n" /* label */ \ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 124 | " .long " b_replacement(num)"f - .\n" /* new instruction */ \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 125 | " .word " __stringify(feature) "\n" /* feature bit */ \ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 126 | " .byte " alt_total_slen "\n" /* source len */ \ |
| 127 | " .byte " alt_rlen(num) "\n" /* replacement len */ \ |
| 128 | " .byte " alt_pad_len "\n" /* pad len */ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 129 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 130 | #define ALTINSTR_REPLACEMENT(newinstr, feature, num) /* replacement */ \ |
| 131 | b_replacement(num)":\n\t" newinstr "\n" e_replacement(num) ":\n\t" |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 132 | |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 133 | /* alternative assembly primitive: */ |
| 134 | #define ALTERNATIVE(oldinstr, newinstr, feature) \ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 135 | OLDINSTR(oldinstr, 1) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 136 | ".pushsection .altinstructions,\"a\"\n" \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 137 | ALTINSTR_ENTRY(feature, 1) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 138 | ".popsection\n" \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 139 | ".pushsection .altinstr_replacement, \"ax\"\n" \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 140 | ALTINSTR_REPLACEMENT(newinstr, feature, 1) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 141 | ".popsection" |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 142 | |
| 143 | #define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2)\ |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 144 | OLDINSTR_2(oldinstr, 1, 2) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 145 | ".pushsection .altinstructions,\"a\"\n" \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 146 | ALTINSTR_ENTRY(feature1, 1) \ |
| 147 | ALTINSTR_ENTRY(feature2, 2) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 148 | ".popsection\n" \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 149 | ".pushsection .altinstr_replacement, \"ax\"\n" \ |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 150 | ALTINSTR_REPLACEMENT(newinstr1, feature1, 1) \ |
| 151 | ALTINSTR_REPLACEMENT(newinstr2, feature2, 2) \ |
H. Peter Anvin | 9cebed4 | 2012-09-21 12:43:08 -0700 | [diff] [blame] | 152 | ".popsection" |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 153 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 154 | /* |
Borislav Petkov | d61931d | 2010-03-05 17:34:46 +0100 | [diff] [blame] | 155 | * This must be included *after* the definition of ALTERNATIVE due to |
| 156 | * <asm/arch_hweight.h> |
| 157 | */ |
| 158 | #include <asm/cpufeature.h> |
| 159 | |
| 160 | /* |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 161 | * Alternative instructions for different CPU types or capabilities. |
| 162 | * |
| 163 | * This allows to use optimized instructions even on generic binary |
| 164 | * kernels. |
| 165 | * |
| 166 | * length of oldinstr must be longer or equal the length of newinstr |
| 167 | * It can be padded with nops as needed. |
| 168 | * |
| 169 | * For non barrier like inlines please define new variants |
| 170 | * without volatile and memory clobber. |
| 171 | */ |
| 172 | #define alternative(oldinstr, newinstr, feature) \ |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 173 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory") |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 174 | |
Borislav Petkov | 4332195 | 2014-12-27 10:41:52 +0100 | [diff] [blame] | 175 | #define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \ |
| 176 | asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) ::: "memory") |
| 177 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 178 | /* |
| 179 | * Alternative inline assembly with input. |
| 180 | * |
| 181 | * Pecularities: |
| 182 | * No memory clobber here. |
| 183 | * Argument numbers start with 1. |
| 184 | * Best is to use constraints that are fixed size (like (%1) ... "r") |
| 185 | * If you use variable sized constraints like "m" or "g" in the |
| 186 | * replacement make sure to pad to the worst case length. |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 187 | * Leaving an unused argument 0 to keep API compatibility. |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 188 | */ |
| 189 | #define alternative_input(oldinstr, newinstr, feature, input...) \ |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 190 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ |
| 191 | : : "i" (0), ## input) |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 192 | |
Fenghua Yu | 5b3e83f | 2014-05-29 11:12:32 -0700 | [diff] [blame] | 193 | /* |
| 194 | * This is similar to alternative_input. But it has two features and |
| 195 | * respective instructions. |
| 196 | * |
| 197 | * If CPU has feature2, newinstr2 is used. |
| 198 | * Otherwise, if CPU has feature1, newinstr1 is used. |
| 199 | * Otherwise, oldinstr is used. |
| 200 | */ |
| 201 | #define alternative_input_2(oldinstr, newinstr1, feature1, newinstr2, \ |
| 202 | feature2, input...) \ |
| 203 | asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, \ |
| 204 | newinstr2, feature2) \ |
| 205 | : : "i" (0), ## input) |
| 206 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 207 | /* Like alternative_input, but with a single output argument */ |
| 208 | #define alternative_io(oldinstr, newinstr, feature, output, input...) \ |
Mathieu Desnoyers | edc953f | 2009-04-28 11:13:46 -0400 | [diff] [blame] | 209 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ |
| 210 | : output : "i" (0), ## input) |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 211 | |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 212 | /* Like alternative_io, but for replacing a direct call with another one. */ |
| 213 | #define alternative_call(oldfunc, newfunc, feature, output, input...) \ |
| 214 | asm volatile (ALTERNATIVE("call %P[old]", "call %P[new]", feature) \ |
| 215 | : output : [old] "i" (oldfunc), [new] "i" (newfunc), ## input) |
| 216 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 217 | /* |
Fenghua Yu | 954e482 | 2012-05-24 18:19:45 -0700 | [diff] [blame] | 218 | * Like alternative_call, but there are two features and respective functions. |
| 219 | * If CPU has feature2, function2 is used. |
| 220 | * Otherwise, if CPU has feature1, function1 is used. |
| 221 | * Otherwise, old function is used. |
| 222 | */ |
| 223 | #define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2, \ |
| 224 | output, input...) \ |
| 225 | asm volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\ |
| 226 | "call %P[new2]", feature2) \ |
| 227 | : output : [old] "i" (oldfunc), [new1] "i" (newfunc1), \ |
| 228 | [new2] "i" (newfunc2), ## input) |
| 229 | |
| 230 | /* |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 231 | * use this macro(s) if you need more than one output parameter |
| 232 | * in alternative_io |
| 233 | */ |
Jan Beulich | 1b1d925 | 2009-12-18 16:12:56 +0000 | [diff] [blame] | 234 | #define ASM_OUTPUT2(a...) a |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 235 | |
Jan Beulich | 819165f | 2012-01-20 16:21:41 +0000 | [diff] [blame] | 236 | /* |
| 237 | * use this macro if you need clobbers but no inputs in |
| 238 | * alternative_{input,io,call}() |
| 239 | */ |
| 240 | #define ASM_NO_INPUT_CLOBBER(clbr...) "i" (0) : clbr |
| 241 | |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 242 | struct paravirt_patch_site; |
| 243 | #ifdef CONFIG_PARAVIRT |
| 244 | void apply_paravirt(struct paravirt_patch_site *start, |
| 245 | struct paravirt_patch_site *end); |
| 246 | #else |
Joe Perches | 2ac1ea7 | 2008-03-23 01:01:37 -0700 | [diff] [blame] | 247 | static inline void apply_paravirt(struct paravirt_patch_site *start, |
| 248 | struct paravirt_patch_site *end) |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 249 | {} |
| 250 | #define __parainstructions NULL |
| 251 | #define __parainstructions_end NULL |
| 252 | #endif |
| 253 | |
Jason Baron | fa6f2cc | 2010-09-17 11:08:56 -0400 | [diff] [blame] | 254 | extern void *text_poke_early(void *addr, const void *opcode, size_t len); |
| 255 | |
Mathieu Desnoyers | e587cad | 2008-03-06 08:48:49 -0500 | [diff] [blame] | 256 | /* |
| 257 | * Clear and restore the kernel write-protection flag on the local CPU. |
| 258 | * Allows the kernel to edit read-only pages. |
| 259 | * Side-effect: any interrupt handler running between save and restore will have |
| 260 | * the ability to write to read-only pages. |
| 261 | * |
| 262 | * Warning: |
| 263 | * Code patching in the UP case is safe if NMIs and MCE handlers are stopped and |
| 264 | * no thread can be preempted in the instructions being modified (no iret to an |
| 265 | * invalid instruction possible) or if the instructions are changed from a |
| 266 | * consistent state to another consistent state atomically. |
Mathieu Desnoyers | e587cad | 2008-03-06 08:48:49 -0500 | [diff] [blame] | 267 | * On the local CPU you need to be protected again NMI or MCE handlers seeing an |
| 268 | * inconsistent instruction while you patch. |
Mathieu Desnoyers | e587cad | 2008-03-06 08:48:49 -0500 | [diff] [blame] | 269 | */ |
Mathieu Desnoyers | e587cad | 2008-03-06 08:48:49 -0500 | [diff] [blame] | 270 | extern void *text_poke(void *addr, const void *opcode, size_t len); |
Jiri Kosina | 17f4157 | 2013-07-23 10:09:28 +0200 | [diff] [blame] | 271 | extern int poke_int3_handler(struct pt_regs *regs); |
Jiri Kosina | fd4363f | 2013-07-12 11:21:48 +0200 | [diff] [blame] | 272 | extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler); |
H. Peter Anvin | 6b59257 | 2008-01-30 13:30:30 +0100 | [diff] [blame] | 273 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 274 | #endif /* _ASM_X86_ALTERNATIVE_H */ |