kprobes.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. /*
  2. * Kernel Probes (KProbes)
  3. * kernel/kprobes.c
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. *
  19. * Copyright (C) IBM Corporation, 2002, 2004
  20. *
  21. * 2002-Oct Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel
  22. * Probes initial implementation (includes suggestions from
  23. * Rusty Russell).
  24. * 2004-Aug Updated by Prasanna S Panchamukhi <prasanna@in.ibm.com> with
  25. * hlists and exceptions notifier as suggested by Andi Kleen.
  26. * 2004-July Suparna Bhattacharya <suparna@in.ibm.com> added jumper probes
  27. * interface to access function arguments.
  28. * 2004-Sep Prasanna S Panchamukhi <prasanna@in.ibm.com> Changed Kprobes
  29. * exceptions notifier to be first on the priority list.
  30. * 2005-May Hien Nguyen <hien@us.ibm.com>, Jim Keniston
  31. * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi
  32. * <prasanna@in.ibm.com> added function-return probes.
  33. */
  34. #include <linux/kprobes.h>
  35. #include <linux/spinlock.h>
  36. #include <linux/hash.h>
  37. #include <linux/init.h>
  38. #include <linux/module.h>
  39. #include <linux/moduleloader.h>
  40. #include <asm-generic/sections.h>
  41. #include <asm/cacheflush.h>
  42. #include <asm/errno.h>
  43. #include <asm/kdebug.h>
  44. #define KPROBE_HASH_BITS 6
  45. #define KPROBE_TABLE_SIZE (1 << KPROBE_HASH_BITS)
  46. static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
  47. static struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE];
  48. unsigned int kprobe_cpu = NR_CPUS;
  49. static DEFINE_SPINLOCK(kprobe_lock);
  50. static struct kprobe *curr_kprobe;
  51. /*
  52. * kprobe->ainsn.insn points to the copy of the instruction to be
  53. * single-stepped. x86_64, POWER4 and above have no-exec support and
  54. * stepping on the instruction on a vmalloced/kmalloced/data page
  55. * is a recipe for disaster
  56. */
  57. #define INSNS_PER_PAGE (PAGE_SIZE/(MAX_INSN_SIZE * sizeof(kprobe_opcode_t)))
  58. struct kprobe_insn_page {
  59. struct hlist_node hlist;
  60. kprobe_opcode_t *insns; /* Page of instruction slots */
  61. char slot_used[INSNS_PER_PAGE];
  62. int nused;
  63. };
  64. static struct hlist_head kprobe_insn_pages;
  65. /**
  66. * get_insn_slot() - Find a slot on an executable page for an instruction.
  67. * We allocate an executable page if there's no room on existing ones.
  68. */
  69. kprobe_opcode_t __kprobes *get_insn_slot(void)
  70. {
  71. struct kprobe_insn_page *kip;
  72. struct hlist_node *pos;
  73. hlist_for_each(pos, &kprobe_insn_pages) {
  74. kip = hlist_entry(pos, struct kprobe_insn_page, hlist);
  75. if (kip->nused < INSNS_PER_PAGE) {
  76. int i;
  77. for (i = 0; i < INSNS_PER_PAGE; i++) {
  78. if (!kip->slot_used[i]) {
  79. kip->slot_used[i] = 1;
  80. kip->nused++;
  81. return kip->insns + (i * MAX_INSN_SIZE);
  82. }
  83. }
  84. /* Surprise! No unused slots. Fix kip->nused. */
  85. kip->nused = INSNS_PER_PAGE;
  86. }
  87. }
  88. /* All out of space. Need to allocate a new page. Use slot 0.*/
  89. kip = kmalloc(sizeof(struct kprobe_insn_page), GFP_KERNEL);
  90. if (!kip) {
  91. return NULL;
  92. }
  93. /*
  94. * Use module_alloc so this page is within +/- 2GB of where the
  95. * kernel image and loaded module images reside. This is required
  96. * so x86_64 can correctly handle the %rip-relative fixups.
  97. */
  98. kip->insns = module_alloc(PAGE_SIZE);
  99. if (!kip->insns) {
  100. kfree(kip);
  101. return NULL;
  102. }
  103. INIT_HLIST_NODE(&kip->hlist);
  104. hlist_add_head(&kip->hlist, &kprobe_insn_pages);
  105. memset(kip->slot_used, 0, INSNS_PER_PAGE);
  106. kip->slot_used[0] = 1;
  107. kip->nused = 1;
  108. return kip->insns;
  109. }
  110. void __kprobes free_insn_slot(kprobe_opcode_t *slot)
  111. {
  112. struct kprobe_insn_page *kip;
  113. struct hlist_node *pos;
  114. hlist_for_each(pos, &kprobe_insn_pages) {
  115. kip = hlist_entry(pos, struct kprobe_insn_page, hlist);
  116. if (kip->insns <= slot &&
  117. slot < kip->insns + (INSNS_PER_PAGE * MAX_INSN_SIZE)) {
  118. int i = (slot - kip->insns) / MAX_INSN_SIZE;
  119. kip->slot_used[i] = 0;
  120. kip->nused--;
  121. if (kip->nused == 0) {
  122. /*
  123. * Page is no longer in use. Free it unless
  124. * it's the last one. We keep the last one
  125. * so as not to have to set it up again the
  126. * next time somebody inserts a probe.
  127. */
  128. hlist_del(&kip->hlist);
  129. if (hlist_empty(&kprobe_insn_pages)) {
  130. INIT_HLIST_NODE(&kip->hlist);
  131. hlist_add_head(&kip->hlist,
  132. &kprobe_insn_pages);
  133. } else {
  134. module_free(NULL, kip->insns);
  135. kfree(kip);
  136. }
  137. }
  138. return;
  139. }
  140. }
  141. }
  142. /* Locks kprobe: irqs must be disabled */
  143. void __kprobes lock_kprobes(void)
  144. {
  145. unsigned long flags = 0;
  146. /* Avoiding local interrupts to happen right after we take the kprobe_lock
  147. * and before we get a chance to update kprobe_cpu, this to prevent
  148. * deadlock when we have a kprobe on ISR routine and a kprobe on task
  149. * routine
  150. */
  151. local_irq_save(flags);
  152. spin_lock(&kprobe_lock);
  153. kprobe_cpu = smp_processor_id();
  154. local_irq_restore(flags);
  155. }
  156. void __kprobes unlock_kprobes(void)
  157. {
  158. unsigned long flags = 0;
  159. /* Avoiding local interrupts to happen right after we update
  160. * kprobe_cpu and before we get a a chance to release kprobe_lock,
  161. * this to prevent deadlock when we have a kprobe on ISR routine and
  162. * a kprobe on task routine
  163. */
  164. local_irq_save(flags);
  165. kprobe_cpu = NR_CPUS;
  166. spin_unlock(&kprobe_lock);
  167. local_irq_restore(flags);
  168. }
  169. /* You have to be holding the kprobe_lock */
  170. struct kprobe __kprobes *get_kprobe(void *addr)
  171. {
  172. struct hlist_head *head;
  173. struct hlist_node *node;
  174. head = &kprobe_table[hash_ptr(addr, KPROBE_HASH_BITS)];
  175. hlist_for_each(node, head) {
  176. struct kprobe *p = hlist_entry(node, struct kprobe, hlist);
  177. if (p->addr == addr)
  178. return p;
  179. }
  180. return NULL;
  181. }
  182. /*
  183. * Aggregate handlers for multiple kprobes support - these handlers
  184. * take care of invoking the individual kprobe handlers on p->list
  185. */
  186. static int __kprobes aggr_pre_handler(struct kprobe *p, struct pt_regs *regs)
  187. {
  188. struct kprobe *kp;
  189. list_for_each_entry(kp, &p->list, list) {
  190. if (kp->pre_handler) {
  191. curr_kprobe = kp;
  192. if (kp->pre_handler(kp, regs))
  193. return 1;
  194. }
  195. curr_kprobe = NULL;
  196. }
  197. return 0;
  198. }
  199. static void __kprobes aggr_post_handler(struct kprobe *p, struct pt_regs *regs,
  200. unsigned long flags)
  201. {
  202. struct kprobe *kp;
  203. list_for_each_entry(kp, &p->list, list) {
  204. if (kp->post_handler) {
  205. curr_kprobe = kp;
  206. kp->post_handler(kp, regs, flags);
  207. curr_kprobe = NULL;
  208. }
  209. }
  210. return;
  211. }
  212. static int __kprobes aggr_fault_handler(struct kprobe *p, struct pt_regs *regs,
  213. int trapnr)
  214. {
  215. /*
  216. * if we faulted "during" the execution of a user specified
  217. * probe handler, invoke just that probe's fault handler
  218. */
  219. if (curr_kprobe && curr_kprobe->fault_handler) {
  220. if (curr_kprobe->fault_handler(curr_kprobe, regs, trapnr))
  221. return 1;
  222. }
  223. return 0;
  224. }
  225. static int __kprobes aggr_break_handler(struct kprobe *p, struct pt_regs *regs)
  226. {
  227. struct kprobe *kp = curr_kprobe;
  228. if (curr_kprobe && kp->break_handler) {
  229. if (kp->break_handler(kp, regs)) {
  230. curr_kprobe = NULL;
  231. return 1;
  232. }
  233. }
  234. curr_kprobe = NULL;
  235. return 0;
  236. }
  237. struct kretprobe_instance __kprobes *get_free_rp_inst(struct kretprobe *rp)
  238. {
  239. struct hlist_node *node;
  240. struct kretprobe_instance *ri;
  241. hlist_for_each_entry(ri, node, &rp->free_instances, uflist)
  242. return ri;
  243. return NULL;
  244. }
  245. static struct kretprobe_instance __kprobes *get_used_rp_inst(struct kretprobe
  246. *rp)
  247. {
  248. struct hlist_node *node;
  249. struct kretprobe_instance *ri;
  250. hlist_for_each_entry(ri, node, &rp->used_instances, uflist)
  251. return ri;
  252. return NULL;
  253. }
  254. void __kprobes add_rp_inst(struct kretprobe_instance *ri)
  255. {
  256. /*
  257. * Remove rp inst off the free list -
  258. * Add it back when probed function returns
  259. */
  260. hlist_del(&ri->uflist);
  261. /* Add rp inst onto table */
  262. INIT_HLIST_NODE(&ri->hlist);
  263. hlist_add_head(&ri->hlist,
  264. &kretprobe_inst_table[hash_ptr(ri->task, KPROBE_HASH_BITS)]);
  265. /* Also add this rp inst to the used list. */
  266. INIT_HLIST_NODE(&ri->uflist);
  267. hlist_add_head(&ri->uflist, &ri->rp->used_instances);
  268. }
  269. void __kprobes recycle_rp_inst(struct kretprobe_instance *ri)
  270. {
  271. /* remove rp inst off the rprobe_inst_table */
  272. hlist_del(&ri->hlist);
  273. if (ri->rp) {
  274. /* remove rp inst off the used list */
  275. hlist_del(&ri->uflist);
  276. /* put rp inst back onto the free list */
  277. INIT_HLIST_NODE(&ri->uflist);
  278. hlist_add_head(&ri->uflist, &ri->rp->free_instances);
  279. } else
  280. /* Unregistering */
  281. kfree(ri);
  282. }
  283. struct hlist_head __kprobes *kretprobe_inst_table_head(struct task_struct *tsk)
  284. {
  285. return &kretprobe_inst_table[hash_ptr(tsk, KPROBE_HASH_BITS)];
  286. }
  287. /*
  288. * This function is called from exit_thread or flush_thread when task tk's
  289. * stack is being recycled so that we can recycle any function-return probe
  290. * instances associated with this task. These left over instances represent
  291. * probed functions that have been called but will never return.
  292. */
  293. void __kprobes kprobe_flush_task(struct task_struct *tk)
  294. {
  295. struct kretprobe_instance *ri;
  296. struct hlist_head *head;
  297. struct hlist_node *node, *tmp;
  298. unsigned long flags = 0;
  299. spin_lock_irqsave(&kprobe_lock, flags);
  300. head = kretprobe_inst_table_head(current);
  301. hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
  302. if (ri->task == tk)
  303. recycle_rp_inst(ri);
  304. }
  305. spin_unlock_irqrestore(&kprobe_lock, flags);
  306. }
  307. /*
  308. * This kprobe pre_handler is registered with every kretprobe. When probe
  309. * hits it will set up the return probe.
  310. */
  311. static int __kprobes pre_handler_kretprobe(struct kprobe *p,
  312. struct pt_regs *regs)
  313. {
  314. struct kretprobe *rp = container_of(p, struct kretprobe, kp);
  315. /*TODO: consider to only swap the RA after the last pre_handler fired */
  316. arch_prepare_kretprobe(rp, regs);
  317. return 0;
  318. }
  319. static inline void free_rp_inst(struct kretprobe *rp)
  320. {
  321. struct kretprobe_instance *ri;
  322. while ((ri = get_free_rp_inst(rp)) != NULL) {
  323. hlist_del(&ri->uflist);
  324. kfree(ri);
  325. }
  326. }
  327. /*
  328. * Keep all fields in the kprobe consistent
  329. */
  330. static inline void copy_kprobe(struct kprobe *old_p, struct kprobe *p)
  331. {
  332. memcpy(&p->opcode, &old_p->opcode, sizeof(kprobe_opcode_t));
  333. memcpy(&p->ainsn, &old_p->ainsn, sizeof(struct arch_specific_insn));
  334. }
  335. /*
  336. * Add the new probe to old_p->list. Fail if this is the
  337. * second jprobe at the address - two jprobes can't coexist
  338. */
  339. static int __kprobes add_new_kprobe(struct kprobe *old_p, struct kprobe *p)
  340. {
  341. struct kprobe *kp;
  342. if (p->break_handler) {
  343. list_for_each_entry(kp, &old_p->list, list) {
  344. if (kp->break_handler)
  345. return -EEXIST;
  346. }
  347. list_add_tail(&p->list, &old_p->list);
  348. } else
  349. list_add(&p->list, &old_p->list);
  350. return 0;
  351. }
  352. /*
  353. * Fill in the required fields of the "manager kprobe". Replace the
  354. * earlier kprobe in the hlist with the manager kprobe
  355. */
  356. static inline void add_aggr_kprobe(struct kprobe *ap, struct kprobe *p)
  357. {
  358. copy_kprobe(p, ap);
  359. ap->addr = p->addr;
  360. ap->pre_handler = aggr_pre_handler;
  361. ap->post_handler = aggr_post_handler;
  362. ap->fault_handler = aggr_fault_handler;
  363. ap->break_handler = aggr_break_handler;
  364. INIT_LIST_HEAD(&ap->list);
  365. list_add(&p->list, &ap->list);
  366. INIT_HLIST_NODE(&ap->hlist);
  367. hlist_del(&p->hlist);
  368. hlist_add_head(&ap->hlist,
  369. &kprobe_table[hash_ptr(ap->addr, KPROBE_HASH_BITS)]);
  370. }
  371. /*
  372. * This is the second or subsequent kprobe at the address - handle
  373. * the intricacies
  374. * TODO: Move kcalloc outside the spinlock
  375. */
  376. static int __kprobes register_aggr_kprobe(struct kprobe *old_p,
  377. struct kprobe *p)
  378. {
  379. int ret = 0;
  380. struct kprobe *ap;
  381. if (old_p->pre_handler == aggr_pre_handler) {
  382. copy_kprobe(old_p, p);
  383. ret = add_new_kprobe(old_p, p);
  384. } else {
  385. ap = kcalloc(1, sizeof(struct kprobe), GFP_ATOMIC);
  386. if (!ap)
  387. return -ENOMEM;
  388. add_aggr_kprobe(ap, old_p);
  389. copy_kprobe(ap, p);
  390. ret = add_new_kprobe(ap, p);
  391. }
  392. return ret;
  393. }
  394. /* kprobe removal house-keeping routines */
  395. static inline void cleanup_kprobe(struct kprobe *p, unsigned long flags)
  396. {
  397. arch_disarm_kprobe(p);
  398. hlist_del(&p->hlist);
  399. spin_unlock_irqrestore(&kprobe_lock, flags);
  400. arch_remove_kprobe(p);
  401. }
  402. static inline void cleanup_aggr_kprobe(struct kprobe *old_p,
  403. struct kprobe *p, unsigned long flags)
  404. {
  405. list_del(&p->list);
  406. if (list_empty(&old_p->list)) {
  407. cleanup_kprobe(old_p, flags);
  408. kfree(old_p);
  409. } else
  410. spin_unlock_irqrestore(&kprobe_lock, flags);
  411. }
  412. static int __kprobes in_kprobes_functions(unsigned long addr)
  413. {
  414. if (addr >= (unsigned long)__kprobes_text_start
  415. && addr < (unsigned long)__kprobes_text_end)
  416. return -EINVAL;
  417. return 0;
  418. }
  419. int __kprobes register_kprobe(struct kprobe *p)
  420. {
  421. int ret = 0;
  422. unsigned long flags = 0;
  423. struct kprobe *old_p;
  424. if ((ret = in_kprobes_functions((unsigned long) p->addr)) != 0)
  425. return ret;
  426. if ((ret = arch_prepare_kprobe(p)) != 0)
  427. goto rm_kprobe;
  428. spin_lock_irqsave(&kprobe_lock, flags);
  429. old_p = get_kprobe(p->addr);
  430. p->nmissed = 0;
  431. if (old_p) {
  432. ret = register_aggr_kprobe(old_p, p);
  433. goto out;
  434. }
  435. arch_copy_kprobe(p);
  436. INIT_HLIST_NODE(&p->hlist);
  437. hlist_add_head(&p->hlist,
  438. &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]);
  439. arch_arm_kprobe(p);
  440. out:
  441. spin_unlock_irqrestore(&kprobe_lock, flags);
  442. rm_kprobe:
  443. if (ret == -EEXIST)
  444. arch_remove_kprobe(p);
  445. return ret;
  446. }
  447. void __kprobes unregister_kprobe(struct kprobe *p)
  448. {
  449. unsigned long flags;
  450. struct kprobe *old_p;
  451. spin_lock_irqsave(&kprobe_lock, flags);
  452. old_p = get_kprobe(p->addr);
  453. if (old_p) {
  454. if (old_p->pre_handler == aggr_pre_handler)
  455. cleanup_aggr_kprobe(old_p, p, flags);
  456. else
  457. cleanup_kprobe(p, flags);
  458. } else
  459. spin_unlock_irqrestore(&kprobe_lock, flags);
  460. }
  461. static struct notifier_block kprobe_exceptions_nb = {
  462. .notifier_call = kprobe_exceptions_notify,
  463. .priority = 0x7fffffff /* we need to notified first */
  464. };
  465. int __kprobes register_jprobe(struct jprobe *jp)
  466. {
  467. /* Todo: Verify probepoint is a function entry point */
  468. jp->kp.pre_handler = setjmp_pre_handler;
  469. jp->kp.break_handler = longjmp_break_handler;
  470. return register_kprobe(&jp->kp);
  471. }
  472. void __kprobes unregister_jprobe(struct jprobe *jp)
  473. {
  474. unregister_kprobe(&jp->kp);
  475. }
  476. #ifdef ARCH_SUPPORTS_KRETPROBES
  477. int __kprobes register_kretprobe(struct kretprobe *rp)
  478. {
  479. int ret = 0;
  480. struct kretprobe_instance *inst;
  481. int i;
  482. rp->kp.pre_handler = pre_handler_kretprobe;
  483. /* Pre-allocate memory for max kretprobe instances */
  484. if (rp->maxactive <= 0) {
  485. #ifdef CONFIG_PREEMPT
  486. rp->maxactive = max(10, 2 * NR_CPUS);
  487. #else
  488. rp->maxactive = NR_CPUS;
  489. #endif
  490. }
  491. INIT_HLIST_HEAD(&rp->used_instances);
  492. INIT_HLIST_HEAD(&rp->free_instances);
  493. for (i = 0; i < rp->maxactive; i++) {
  494. inst = kmalloc(sizeof(struct kretprobe_instance), GFP_KERNEL);
  495. if (inst == NULL) {
  496. free_rp_inst(rp);
  497. return -ENOMEM;
  498. }
  499. INIT_HLIST_NODE(&inst->uflist);
  500. hlist_add_head(&inst->uflist, &rp->free_instances);
  501. }
  502. rp->nmissed = 0;
  503. /* Establish function entry probe point */
  504. if ((ret = register_kprobe(&rp->kp)) != 0)
  505. free_rp_inst(rp);
  506. return ret;
  507. }
  508. #else /* ARCH_SUPPORTS_KRETPROBES */
  509. int __kprobes register_kretprobe(struct kretprobe *rp)
  510. {
  511. return -ENOSYS;
  512. }
  513. #endif /* ARCH_SUPPORTS_KRETPROBES */
  514. void __kprobes unregister_kretprobe(struct kretprobe *rp)
  515. {
  516. unsigned long flags;
  517. struct kretprobe_instance *ri;
  518. unregister_kprobe(&rp->kp);
  519. /* No race here */
  520. spin_lock_irqsave(&kprobe_lock, flags);
  521. free_rp_inst(rp);
  522. while ((ri = get_used_rp_inst(rp)) != NULL) {
  523. ri->rp = NULL;
  524. hlist_del(&ri->uflist);
  525. }
  526. spin_unlock_irqrestore(&kprobe_lock, flags);
  527. }
  528. static int __init init_kprobes(void)
  529. {
  530. int i, err = 0;
  531. /* FIXME allocate the probe table, currently defined statically */
  532. /* initialize all list heads */
  533. for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
  534. INIT_HLIST_HEAD(&kprobe_table[i]);
  535. INIT_HLIST_HEAD(&kretprobe_inst_table[i]);
  536. }
  537. err = arch_init_kprobes();
  538. if (!err)
  539. err = register_die_notifier(&kprobe_exceptions_nb);
  540. return err;
  541. }
  542. __initcall(init_kprobes);
  543. EXPORT_SYMBOL_GPL(register_kprobe);
  544. EXPORT_SYMBOL_GPL(unregister_kprobe);
  545. EXPORT_SYMBOL_GPL(register_jprobe);
  546. EXPORT_SYMBOL_GPL(unregister_jprobe);
  547. EXPORT_SYMBOL_GPL(jprobe_return);
  548. EXPORT_SYMBOL_GPL(register_kretprobe);
  549. EXPORT_SYMBOL_GPL(unregister_kretprobe);