diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-20 18:36:05 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 18:36:05 -0400 |
| commit | 857c68f733eea07f11a061caea43a38fed61adb7 (patch) | |
| tree | 4567a9e91f717b22143ac1ccb0fb5323ac15afd3 /arch/i386/kernel/kprobes.c | |
| parent | 4741c336d27dec3ea68a35659abb8dc82b142388 (diff) | |
| parent | 402a26f0c040077ed6f941eefac5a6971f0d5f40 (diff) | |
Merge branch 'master'
Diffstat (limited to 'arch/i386/kernel/kprobes.c')
| -rw-r--r-- | arch/i386/kernel/kprobes.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index f19768789e8a..043f5292e70a 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
| @@ -43,7 +43,7 @@ DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; | |||
| 43 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 43 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
| 44 | 44 | ||
| 45 | /* insert a jmp code */ | 45 | /* insert a jmp code */ |
| 46 | static inline void set_jmp_op(void *from, void *to) | 46 | static __always_inline void set_jmp_op(void *from, void *to) |
| 47 | { | 47 | { |
| 48 | struct __arch_jmp_op { | 48 | struct __arch_jmp_op { |
| 49 | char op; | 49 | char op; |
| @@ -57,7 +57,7 @@ static inline void set_jmp_op(void *from, void *to) | |||
| 57 | /* | 57 | /* |
| 58 | * returns non-zero if opcodes can be boosted. | 58 | * returns non-zero if opcodes can be boosted. |
| 59 | */ | 59 | */ |
| 60 | static inline int can_boost(kprobe_opcode_t opcode) | 60 | static __always_inline int can_boost(kprobe_opcode_t opcode) |
| 61 | { | 61 | { |
| 62 | switch (opcode & 0xf0 ) { | 62 | switch (opcode & 0xf0 ) { |
| 63 | case 0x70: | 63 | case 0x70: |
| @@ -88,7 +88,7 @@ static inline int can_boost(kprobe_opcode_t opcode) | |||
| 88 | /* | 88 | /* |
| 89 | * returns non-zero if opcode modifies the interrupt flag. | 89 | * returns non-zero if opcode modifies the interrupt flag. |
| 90 | */ | 90 | */ |
| 91 | static inline int is_IF_modifier(kprobe_opcode_t opcode) | 91 | static int __kprobes is_IF_modifier(kprobe_opcode_t opcode) |
| 92 | { | 92 | { |
| 93 | switch (opcode) { | 93 | switch (opcode) { |
| 94 | case 0xfa: /* cli */ | 94 | case 0xfa: /* cli */ |
| @@ -138,7 +138,7 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
| 138 | mutex_unlock(&kprobe_mutex); | 138 | mutex_unlock(&kprobe_mutex); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 141 | static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) |
| 142 | { | 142 | { |
| 143 | kcb->prev_kprobe.kp = kprobe_running(); | 143 | kcb->prev_kprobe.kp = kprobe_running(); |
| 144 | kcb->prev_kprobe.status = kcb->kprobe_status; | 144 | kcb->prev_kprobe.status = kcb->kprobe_status; |
| @@ -146,7 +146,7 @@ static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | |||
| 146 | kcb->prev_kprobe.saved_eflags = kcb->kprobe_saved_eflags; | 146 | kcb->prev_kprobe.saved_eflags = kcb->kprobe_saved_eflags; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) | 149 | static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb) |
| 150 | { | 150 | { |
| 151 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; | 151 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; |
| 152 | kcb->kprobe_status = kcb->prev_kprobe.status; | 152 | kcb->kprobe_status = kcb->prev_kprobe.status; |
| @@ -154,7 +154,7 @@ static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) | |||
| 154 | kcb->kprobe_saved_eflags = kcb->prev_kprobe.saved_eflags; | 154 | kcb->kprobe_saved_eflags = kcb->prev_kprobe.saved_eflags; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | 157 | static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, |
| 158 | struct kprobe_ctlblk *kcb) | 158 | struct kprobe_ctlblk *kcb) |
| 159 | { | 159 | { |
| 160 | __get_cpu_var(current_kprobe) = p; | 160 | __get_cpu_var(current_kprobe) = p; |
| @@ -164,7 +164,7 @@ static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
| 164 | kcb->kprobe_saved_eflags &= ~IF_MASK; | 164 | kcb->kprobe_saved_eflags &= ~IF_MASK; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 167 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
| 168 | { | 168 | { |
| 169 | regs->eflags |= TF_MASK; | 169 | regs->eflags |= TF_MASK; |
| 170 | regs->eflags &= ~IF_MASK; | 170 | regs->eflags &= ~IF_MASK; |
| @@ -507,7 +507,7 @@ no_change: | |||
| 507 | * Interrupts are disabled on entry as trap1 is an interrupt gate and they | 507 | * Interrupts are disabled on entry as trap1 is an interrupt gate and they |
| 508 | * remain disabled thoroughout this function. | 508 | * remain disabled thoroughout this function. |
| 509 | */ | 509 | */ |
| 510 | static inline int post_kprobe_handler(struct pt_regs *regs) | 510 | static int __kprobes post_kprobe_handler(struct pt_regs *regs) |
| 511 | { | 511 | { |
| 512 | struct kprobe *cur = kprobe_running(); | 512 | struct kprobe *cur = kprobe_running(); |
| 513 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 513 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
| @@ -543,7 +543,7 @@ out: | |||
| 543 | return 1; | 543 | return 1; |
| 544 | } | 544 | } |
| 545 | 545 | ||
| 546 | static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | 546 | static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) |
| 547 | { | 547 | { |
| 548 | struct kprobe *cur = kprobe_running(); | 548 | struct kprobe *cur = kprobe_running(); |
| 549 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 549 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
