kprobes.c 16 KB

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