aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/kprobes.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index a55bfadfd766..ca4c22d78cfd 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -722,6 +722,7 @@ out:
722 722
723 return ret; 723 return ret;
724} 724}
725EXPORT_SYMBOL_GPL(register_kprobe);
725 726
726/* 727/*
727 * Unregister a kprobe without a scheduler synchronization. 728 * Unregister a kprobe without a scheduler synchronization.
@@ -803,11 +804,13 @@ int __kprobes register_kprobes(struct kprobe **kps, int num)
803 } 804 }
804 return ret; 805 return ret;
805} 806}
807EXPORT_SYMBOL_GPL(register_kprobes);
806 808
807void __kprobes unregister_kprobe(struct kprobe *p) 809void __kprobes unregister_kprobe(struct kprobe *p)
808{ 810{
809 unregister_kprobes(&p, 1); 811 unregister_kprobes(&p, 1);
810} 812}
813EXPORT_SYMBOL_GPL(unregister_kprobe);
811 814
812void __kprobes unregister_kprobes(struct kprobe **kps, int num) 815void __kprobes unregister_kprobes(struct kprobe **kps, int num)
813{ 816{
@@ -826,6 +829,7 @@ void __kprobes unregister_kprobes(struct kprobe **kps, int num)
826 if (kps[i]->addr) 829 if (kps[i]->addr)
827 __unregister_kprobe_bottom(kps[i]); 830 __unregister_kprobe_bottom(kps[i]);
828} 831}
832EXPORT_SYMBOL_GPL(unregister_kprobes);
829 833
830static struct notifier_block kprobe_exceptions_nb = { 834static struct notifier_block kprobe_exceptions_nb = {
831 .notifier_call = kprobe_exceptions_notify, 835 .notifier_call = kprobe_exceptions_notify,
@@ -865,16 +869,19 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
865 } 869 }
866 return ret; 870 return ret;
867} 871}
872EXPORT_SYMBOL_GPL(register_jprobes);
868 873
869int __kprobes register_jprobe(struct jprobe *jp) 874int __kprobes register_jprobe(struct jprobe *jp)
870{ 875{
871 return register_jprobes(&jp, 1); 876 return register_jprobes(&jp, 1);
872} 877}
878EXPORT_SYMBOL_GPL(register_jprobe);
873 879
874void __kprobes unregister_jprobe(struct jprobe *jp) 880void __kprobes unregister_jprobe(struct jprobe *jp)
875{ 881{
876 unregister_jprobes(&jp, 1); 882 unregister_jprobes(&jp, 1);
877} 883}
884EXPORT_SYMBOL_GPL(unregister_jprobe);
878 885
879void __kprobes unregister_jprobes(struct jprobe **jps, int num) 886void __kprobes unregister_jprobes(struct jprobe **jps, int num)
880{ 887{
@@ -894,6 +901,7 @@ void __kprobes unregister_jprobes(struct jprobe **jps, int num)
894 __unregister_kprobe_bottom(&jps[i]->kp); 901 __unregister_kprobe_bottom(&jps[i]->kp);
895 } 902 }
896} 903}
904EXPORT_SYMBOL_GPL(unregister_jprobes);
897 905
898#ifdef CONFIG_KRETPROBES 906#ifdef CONFIG_KRETPROBES
899/* 907/*
@@ -987,6 +995,7 @@ int __kprobes register_kretprobe(struct kretprobe *rp)
987 free_rp_inst(rp); 995 free_rp_inst(rp);
988 return ret; 996 return ret;
989} 997}
998EXPORT_SYMBOL_GPL(register_kretprobe);
990 999
991int __kprobes register_kretprobes(struct kretprobe **rps, int num) 1000int __kprobes register_kretprobes(struct kretprobe **rps, int num)
992{ 1001{
@@ -1004,11 +1013,13 @@ int __kprobes register_kretprobes(struct kretprobe **rps, int num)
1004 } 1013 }
1005 return ret; 1014 return ret;
1006} 1015}
1016EXPORT_SYMBOL_GPL(register_kretprobes);
1007 1017
1008void __kprobes unregister_kretprobe(struct kretprobe *rp) 1018void __kprobes unregister_kretprobe(struct kretprobe *rp)
1009{ 1019{
1010 unregister_kretprobes(&rp, 1); 1020 unregister_kretprobes(&rp, 1);
1011} 1021}
1022EXPORT_SYMBOL_GPL(unregister_kretprobe);
1012 1023
1013void __kprobes unregister_kretprobes(struct kretprobe **rps, int num) 1024void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
1014{ 1025{
@@ -1030,24 +1041,30 @@ void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
1030 } 1041 }
1031 } 1042 }
1032} 1043}
1044EXPORT_SYMBOL_GPL(unregister_kretprobes);
1033 1045
1034#else /* CONFIG_KRETPROBES */ 1046#else /* CONFIG_KRETPROBES */
1035int __kprobes register_kretprobe(struct kretprobe *rp) 1047int __kprobes register_kretprobe(struct kretprobe *rp)
1036{ 1048{
1037 return -ENOSYS; 1049 return -ENOSYS;
1038} 1050}
1051EXPORT_SYMBOL_GPL(register_kretprobe);
1039 1052
1040int __kprobes register_kretprobes(struct kretprobe **rps, int num) 1053int __kprobes register_kretprobes(struct kretprobe **rps, int num)
1041{ 1054{
1042 return -ENOSYS; 1055 return -ENOSYS;
1043} 1056}
1057EXPORT_SYMBOL_GPL(register_kretprobes);
1058
1044void __kprobes unregister_kretprobe(struct kretprobe *rp) 1059void __kprobes unregister_kretprobe(struct kretprobe *rp)
1045{ 1060{
1046} 1061}
1062EXPORT_SYMBOL_GPL(unregister_kretprobe);
1047 1063
1048void __kprobes unregister_kretprobes(struct kretprobe **rps, int num) 1064void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
1049{ 1065{
1050} 1066}
1067EXPORT_SYMBOL_GPL(unregister_kretprobes);
1051 1068
1052static int __kprobes pre_handler_kretprobe(struct kprobe *p, 1069static int __kprobes pre_handler_kretprobe(struct kprobe *p,
1053 struct pt_regs *regs) 1070 struct pt_regs *regs)
@@ -1418,16 +1435,5 @@ late_initcall(debugfs_kprobe_init);
1418 1435
1419module_init(init_kprobes); 1436module_init(init_kprobes);
1420 1437
1421EXPORT_SYMBOL_GPL(register_kprobe); 1438/* defined in arch/.../kernel/kprobes.c */
1422EXPORT_SYMBOL_GPL(unregister_kprobe);
1423EXPORT_SYMBOL_GPL(register_kprobes);
1424EXPORT_SYMBOL_GPL(unregister_kprobes);
1425EXPORT_SYMBOL_GPL(register_jprobe);
1426EXPORT_SYMBOL_GPL(unregister_jprobe);
1427EXPORT_SYMBOL_GPL(register_jprobes);
1428EXPORT_SYMBOL_GPL(unregister_jprobes);
1429EXPORT_SYMBOL_GPL(jprobe_return); 1439EXPORT_SYMBOL_GPL(jprobe_return);
1430EXPORT_SYMBOL_GPL(register_kretprobe);
1431EXPORT_SYMBOL_GPL(unregister_kretprobe);
1432EXPORT_SYMBOL_GPL(register_kretprobes);
1433EXPORT_SYMBOL_GPL(unregister_kretprobes);