@@ -44,10 +44,11 @@ static const union mips_instruction breakpoint2_insn = {
4444DEFINE_PER_CPU (struct kprobe * , current_kprobe );
4545DEFINE_PER_CPU (struct kprobe_ctlblk , kprobe_ctlblk );
4646
47- static int __kprobes insn_has_delayslot (union mips_instruction insn )
47+ static int insn_has_delayslot (union mips_instruction insn )
4848{
4949 return __insn_has_delay_slot (insn );
5050}
51+ NOKPROBE_SYMBOL (insn_has_delayslot );
5152
5253/*
5354 * insn_has_ll_or_sc function checks whether instruction is ll or sc
@@ -56,7 +57,7 @@ static int __kprobes insn_has_delayslot(union mips_instruction insn)
5657 * instructions; cannot do much about breakpoint in the middle of
5758 * ll/sc pair; it is upto user to avoid those places
5859 */
59- static int __kprobes insn_has_ll_or_sc (union mips_instruction insn )
60+ static int insn_has_ll_or_sc (union mips_instruction insn )
6061{
6162 int ret = 0 ;
6263
@@ -72,8 +73,9 @@ static int __kprobes insn_has_ll_or_sc(union mips_instruction insn)
7273 }
7374 return ret ;
7475}
76+ NOKPROBE_SYMBOL (insn_has_ll_or_sc );
7577
76- int __kprobes arch_prepare_kprobe (struct kprobe * p )
78+ int arch_prepare_kprobe (struct kprobe * p )
7779{
7880 union mips_instruction insn ;
7981 union mips_instruction prev_insn ;
@@ -132,26 +134,30 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
132134out :
133135 return ret ;
134136}
137+ NOKPROBE_SYMBOL (arch_prepare_kprobe );
135138
136- void __kprobes arch_arm_kprobe (struct kprobe * p )
139+ void arch_arm_kprobe (struct kprobe * p )
137140{
138141 * p -> addr = breakpoint_insn ;
139142 flush_insn_slot (p );
140143}
144+ NOKPROBE_SYMBOL (arch_arm_kprobe );
141145
142- void __kprobes arch_disarm_kprobe (struct kprobe * p )
146+ void arch_disarm_kprobe (struct kprobe * p )
143147{
144148 * p -> addr = p -> opcode ;
145149 flush_insn_slot (p );
146150}
151+ NOKPROBE_SYMBOL (arch_disarm_kprobe );
147152
148- void __kprobes arch_remove_kprobe (struct kprobe * p )
153+ void arch_remove_kprobe (struct kprobe * p )
149154{
150155 if (p -> ainsn .insn ) {
151156 free_insn_slot (p -> ainsn .insn , 0 );
152157 p -> ainsn .insn = NULL ;
153158 }
154159}
160+ NOKPROBE_SYMBOL (arch_remove_kprobe );
155161
156162static void save_previous_kprobe (struct kprobe_ctlblk * kcb )
157163{
@@ -257,7 +263,7 @@ static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs,
257263 * breakpoint trap. In case of branch instructions, the target
258264 * epc to be restored.
259265 */
260- static void __kprobes resume_execution (struct kprobe * p ,
266+ static void resume_execution (struct kprobe * p ,
261267 struct pt_regs * regs ,
262268 struct kprobe_ctlblk * kcb )
263269{
@@ -268,8 +274,9 @@ static void __kprobes resume_execution(struct kprobe *p,
268274 regs -> cp0_epc = orig_epc + 4 ;
269275 }
270276}
277+ NOKPROBE_SYMBOL (resume_execution );
271278
272- static int __kprobes kprobe_handler (struct pt_regs * regs )
279+ static int kprobe_handler (struct pt_regs * regs )
273280{
274281 struct kprobe * p ;
275282 int ret = 0 ;
@@ -367,6 +374,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
367374 return ret ;
368375
369376}
377+ NOKPROBE_SYMBOL (kprobe_handler );
370378
371379static inline int post_kprobe_handler (struct pt_regs * regs )
372380{
@@ -415,7 +423,7 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
415423/*
416424 * Wrapper routine for handling exceptions.
417425 */
418- int __kprobes kprobe_exceptions_notify (struct notifier_block * self ,
426+ int kprobe_exceptions_notify (struct notifier_block * self ,
419427 unsigned long val , void * data )
420428{
421429
@@ -446,6 +454,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
446454 }
447455 return ret ;
448456}
457+ NOKPROBE_SYMBOL (kprobe_exceptions_notify );
449458
450459/*
451460 * Function return probe trampoline:
@@ -469,7 +478,7 @@ static void __used kretprobe_trampoline_holder(void)
469478
470479void __kretprobe_trampoline (void );
471480
472- void __kprobes arch_prepare_kretprobe (struct kretprobe_instance * ri ,
481+ void arch_prepare_kretprobe (struct kretprobe_instance * ri ,
473482 struct pt_regs * regs )
474483{
475484 ri -> ret_addr = (kprobe_opcode_t * ) regs -> regs [31 ];
@@ -478,11 +487,12 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
478487 /* Replace the return addr with trampoline addr */
479488 regs -> regs [31 ] = (unsigned long )__kretprobe_trampoline ;
480489}
490+ NOKPROBE_SYMBOL (arch_prepare_kretprobe );
481491
482492/*
483493 * Called when the probe at kretprobe trampoline is hit
484494 */
485- static int __kprobes trampoline_probe_handler (struct kprobe * p ,
495+ static int trampoline_probe_handler (struct kprobe * p ,
486496 struct pt_regs * regs )
487497{
488498 instruction_pointer (regs ) = __kretprobe_trampoline_handler (regs , NULL );
@@ -493,14 +503,16 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
493503 */
494504 return 1 ;
495505}
506+ NOKPROBE_SYMBOL (trampoline_probe_handler );
496507
497- int __kprobes arch_trampoline_kprobe (struct kprobe * p )
508+ int arch_trampoline_kprobe (struct kprobe * p )
498509{
499510 if (p -> addr == (kprobe_opcode_t * )__kretprobe_trampoline )
500511 return 1 ;
501512
502513 return 0 ;
503514}
515+ NOKPROBE_SYMBOL (arch_trampoline_kprobe );
504516
505517static struct kprobe trampoline_p = {
506518 .addr = (kprobe_opcode_t * )__kretprobe_trampoline ,
0 commit comments