aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/kprobes.c
diff options
context:
space:
mode:
authorPrasanna S Panchamukhi <prasanna@in.ibm.com>2006-04-19 01:22:03 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-19 12:13:53 -0400
commit07fab8da808d0702778da50e5b435e6ba471c903 (patch)
tree59ee487f2bb46e7200ec0888baae34a611530497 /arch/sparc64/kernel/kprobes.c
parent3ca269d8b4d020af018e9e7e82b22f965a0e1bd9 (diff)
[PATCH] Switch Kprobes inline functions to __kprobes for sparc64
Andrew Morton pointed out that compiler might not inline the functions marked for inline in kprobes. There-by allowing the insertion of probes on these kprobes routines, which might cause recursion. This patch removes all such inline and adds them to kprobes section there by disallowing probes on all such routines. Some of the routines can even still be inlined, since these routines gets executed after the kprobes had done necessay setup for reentrancy. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc64/kernel/kprobes.c')
-rw-r--r--arch/sparc64/kernel/kprobes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index ffc7309e9f22..2e1c824c1cc9 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -63,7 +63,7 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
63 flushi(p->addr); 63 flushi(p->addr);
64} 64}
65 65
66static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) 66static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
67{ 67{
68 kcb->prev_kprobe.kp = kprobe_running(); 68 kcb->prev_kprobe.kp = kprobe_running();
69 kcb->prev_kprobe.status = kcb->kprobe_status; 69 kcb->prev_kprobe.status = kcb->kprobe_status;
@@ -71,7 +71,7 @@ static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
71 kcb->prev_kprobe.orig_tstate_pil = kcb->kprobe_orig_tstate_pil; 71 kcb->prev_kprobe.orig_tstate_pil = kcb->kprobe_orig_tstate_pil;
72} 72}
73 73
74static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) 74static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
75{ 75{
76 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; 76 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
77 kcb->kprobe_status = kcb->prev_kprobe.status; 77 kcb->kprobe_status = kcb->prev_kprobe.status;
@@ -79,7 +79,7 @@ static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb)
79 kcb->kprobe_orig_tstate_pil = kcb->prev_kprobe.orig_tstate_pil; 79 kcb->kprobe_orig_tstate_pil = kcb->prev_kprobe.orig_tstate_pil;
80} 80}
81 81
82static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, 82static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
83 struct kprobe_ctlblk *kcb) 83 struct kprobe_ctlblk *kcb)
84{ 84{
85 __get_cpu_var(current_kprobe) = p; 85 __get_cpu_var(current_kprobe) = p;
@@ -87,7 +87,7 @@ static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
87 kcb->kprobe_orig_tstate_pil = (regs->tstate & TSTATE_PIL); 87 kcb->kprobe_orig_tstate_pil = (regs->tstate & TSTATE_PIL);
88} 88}
89 89
90static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs, 90static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs,
91 struct kprobe_ctlblk *kcb) 91 struct kprobe_ctlblk *kcb)
92{ 92{
93 regs->tstate |= TSTATE_PIL; 93 regs->tstate |= TSTATE_PIL;
@@ -273,7 +273,7 @@ static void __kprobes resume_execution(struct kprobe *p,
273 kcb->kprobe_orig_tstate_pil); 273 kcb->kprobe_orig_tstate_pil);
274} 274}
275 275
276static inline int post_kprobe_handler(struct pt_regs *regs) 276static int __kprobes post_kprobe_handler(struct pt_regs *regs)
277{ 277{
278 struct kprobe *cur = kprobe_running(); 278 struct kprobe *cur = kprobe_running();
279 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 279 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
@@ -300,7 +300,7 @@ out:
300 return 1; 300 return 1;
301} 301}
302 302
303static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) 303static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
304{ 304{
305 struct kprobe *cur = kprobe_running(); 305 struct kprobe *cur = kprobe_running();
306 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 306 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();