[REFACTOR] redesign arch_prepare_kprobe()
[kernel/swap-modules.git] / kprobe / arch / asm-arm / dbi_kprobes.c
1 /*
2  *  Dynamic Binary Instrumentation Module based on KProbes
3  *  modules/kprobe/arch/asm-arm/dbi_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) Samsung Electronics, 2006-2010
20  *
21  * 2006-2007    Ekaterina Gorelkina <e.gorelkina@samsung.com>: initial implementation for ARM/MIPS
22  * 2008-2009    Alexey Gerenkov <a.gerenkov@samsung.com> User-Space
23  *              Probes initial implementation; Support x86.
24  * 2010         Ekaterina Gorelkina <e.gorelkina@samsung.com>: redesign module for separating core and arch parts
25  * 2010-2011    Alexander Shirshikov <a.shirshikov@samsung.com>: initial implementation for Thumb
26  * 2012         Stanislav Andreev <s.andreev@samsung.com>: added time debug profiling support; BUG() message fix
27  * 2012         Stanislav Andreev <s.andreev@samsung.com>: redesign of kprobe functionality -
28  *              kprobe_handler() now called via undefined instruction hooks
29  * 2012         Stanislav Andreev <s.andreev@samsung.com>: hash tables search implemented for uprobes
30  */
31
32 #include <linux/module.h>
33 #include <linux/mm.h>
34
35 #include "dbi_kprobes.h"
36 #include "trampoline_arm.h"
37 #include "../dbi_kprobes.h"
38 #include "../../dbi_kprobes.h"
39
40 #include "../../dbi_kdebug.h"
41 #include "../../dbi_insn_slots.h"
42 #include "../../dbi_kprobes_deps.h"
43 #include <ksyms.h>
44
45 #include <asm/cacheflush.h>
46 #include <asm/traps.h>
47 #include <asm/ptrace.h>
48 #include <linux/list.h>
49 #include <linux/hash.h>
50
51 #define SUPRESS_BUG_MESSAGES
52
53 extern struct kprobe * per_cpu__current_kprobe;
54 extern struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
55
56 static void (*__swap_register_undef_hook)(struct undef_hook *hook);
57 static void (*__swap_unregister_undef_hook)(struct undef_hook *hook);
58
59 static struct kprobe trampoline_p =
60 {
61         .addr = (kprobe_opcode_t *)&kretprobe_trampoline,
62         .pre_handler = trampoline_probe_handler
63 };
64
65 int prep_pc_dep_insn_execbuf(kprobe_opcode_t *insns, kprobe_opcode_t insn, int uregs)
66 {
67         int i;
68
69         if (uregs & 0x10) {
70                 int reg_mask = 0x1;
71                 //search in reg list
72                 for (i = 0; i < 13; i++, reg_mask <<= 1) {
73                         if (!(insn & reg_mask))
74                                 break;
75                 }
76         } else {
77                 for (i = 0; i < 13; i++) {
78                         if ((uregs & 0x1) && (ARM_INSN_REG_RN(insn) == i))
79                                 continue;
80                         if ((uregs & 0x2) && (ARM_INSN_REG_RD(insn) == i))
81                                 continue;
82                         if ((uregs & 0x4) && (ARM_INSN_REG_RS(insn) == i))
83                                 continue;
84                         if ((uregs & 0x8) && (ARM_INSN_REG_RM(insn) == i))
85                                 continue;
86                         break;
87                 }
88         }
89
90         if (i == 13) {
91                 DBPRINTF ("there are no free register %x in insn %lx!", uregs, insn);
92                 return -EINVAL;
93         }
94         DBPRINTF ("prep_pc_dep_insn_execbuf: using R%d, changing regs %x", i, uregs);
95
96         // set register to save
97         ARM_INSN_REG_SET_RD(insns[0], i);
98         // set register to load address to
99         ARM_INSN_REG_SET_RD(insns[1], i);
100         // set instruction to execute and patch it
101         if (uregs & 0x10) {
102                 ARM_INSN_REG_CLEAR_MR(insn, 15);
103                 ARM_INSN_REG_SET_MR(insn, i);
104         } else {
105                 if ((uregs & 0x1) && (ARM_INSN_REG_RN(insn) == 15))
106                         ARM_INSN_REG_SET_RN(insn, i);
107                 if ((uregs & 0x2) && (ARM_INSN_REG_RD(insn) == 15))
108                         ARM_INSN_REG_SET_RD(insn, i);
109                 if ((uregs & 0x4) && (ARM_INSN_REG_RS(insn) == 15))
110                         ARM_INSN_REG_SET_RS(insn, i);
111                 if ((uregs & 0x8) && (ARM_INSN_REG_RM(insn) == 15))
112                         ARM_INSN_REG_SET_RM(insn, i);
113         }
114
115         insns[UPROBES_TRAMP_INSN_IDX] = insn;
116         // set register to restore
117         ARM_INSN_REG_SET_RD(insns[3], i);
118
119         return 0;
120 }
121 EXPORT_SYMBOL_GPL(prep_pc_dep_insn_execbuf);
122
123 int arch_check_insn_arm(struct arch_specific_insn *ainsn)
124 {
125         int ret = 0;
126
127         // check instructions that can change PC by nature
128         if (
129 //          ARM_INSN_MATCH(UNDEF, ainsn->insn_arm[0]) ||
130             ARM_INSN_MATCH(AUNDEF, ainsn->insn_arm[0]) ||
131             ARM_INSN_MATCH(SWI, ainsn->insn_arm[0]) ||
132             ARM_INSN_MATCH(BREAK, ainsn->insn_arm[0]) ||
133             ARM_INSN_MATCH(BL, ainsn->insn_arm[0]) ||
134             ARM_INSN_MATCH(BLX1, ainsn->insn_arm[0]) ||
135             ARM_INSN_MATCH(BLX2, ainsn->insn_arm[0]) ||
136             ARM_INSN_MATCH(BX, ainsn->insn_arm[0]) ||
137             ARM_INSN_MATCH(BXJ, ainsn->insn_arm[0]))    {
138                 DBPRINTF ("Bad insn arch_check_insn_arm: %lx\n", ainsn->insn_arm[0]);
139                 ret = -EFAULT;
140 #ifndef CONFIG_CPU_V7
141         // check instructions that can write result to PC
142         } else if ((ARM_INSN_MATCH(DPIS, ainsn->insn_arm[0]) ||
143                    ARM_INSN_MATCH(DPRS, ainsn->insn_arm[0]) ||
144                    ARM_INSN_MATCH(DPI, ainsn->insn_arm[0]) ||
145                    ARM_INSN_MATCH(LIO, ainsn->insn_arm[0]) ||
146                    ARM_INSN_MATCH(LRO, ainsn->insn_arm[0])) &&
147                    (ARM_INSN_REG_RD(ainsn->insn_arm[0]) == 15)) {
148                 DBPRINTF ("Bad arch_check_insn_arm: %lx\n", ainsn->insn_arm[0]);
149                 ret = -EFAULT;
150 #endif // CONFIG_CPU_V7
151         // check special instruction loads store multiple registers
152         } else if ((ARM_INSN_MATCH(LM, ainsn->insn_arm[0]) || ARM_INSN_MATCH(SM, ainsn->insn_arm[0])) &&
153                         // store pc or load to pc
154                    (ARM_INSN_REG_MR(ainsn->insn_arm[0], 15) ||
155                          // store/load with pc update
156                     ((ARM_INSN_REG_RN(ainsn->insn_arm[0]) == 15) && (ainsn->insn_arm[0] & 0x200000)))) {
157                 DBPRINTF ("Bad insn arch_check_insn_arm: %lx\n", ainsn->insn_arm[0]);
158                 ret = -EFAULT;
159         }
160
161         return ret;
162 }
163 EXPORT_SYMBOL_GPL(arch_check_insn_arm);
164
165 int arch_prepare_kprobe(struct kprobe *p, struct hlist_head *page_list)
166 {
167         kprobe_opcode_t insns[KPROBES_TRAMP_LEN];
168         int uregs, pc_dep, ret = 0;
169         kprobe_opcode_t insn[MAX_INSN_SIZE];
170         struct arch_specific_insn ainsn;
171
172         /* insn: must be on special executable page on i386. */
173         p->ainsn.insn = get_insn_slot(NULL, page_list, 0);
174         if (!p->ainsn.insn)
175                 return -ENOMEM;
176
177         memcpy(insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
178         ainsn.insn_arm = ainsn.insn = insn;
179         ret = arch_check_insn_arm(&ainsn);
180         if (!ret) {
181                 p->opcode = *p->addr;
182                 uregs = pc_dep = 0;
183
184                 // Rn, Rm ,Rd
185                 if (ARM_INSN_MATCH(DPIS, insn[0]) || ARM_INSN_MATCH(LRO, insn[0]) ||
186                     ARM_INSN_MATCH(SRO, insn[0])) {
187                         uregs = 0xb;
188                         if ((ARM_INSN_REG_RN(insn[0]) == 15) || (ARM_INSN_REG_RM(insn[0]) == 15) ||
189                             (ARM_INSN_MATCH(SRO, insn[0]) && (ARM_INSN_REG_RD(insn[0]) == 15))) {
190                                 DBPRINTF ("Unboostable insn %lx, DPIS/LRO/SRO\n", insn[0]);
191                                 pc_dep = 1;
192                         }
193
194                 // Rn ,Rd
195                 } else if( ARM_INSN_MATCH(DPI, insn[0]) || ARM_INSN_MATCH(LIO, insn[0]) ||
196                            ARM_INSN_MATCH(SIO, insn[0])) {
197                         uregs = 0x3;
198                         if ((ARM_INSN_REG_RN(insn[0]) == 15) || (ARM_INSN_MATCH(SIO, insn[0]) &&
199                             (ARM_INSN_REG_RD (insn[0]) == 15))) {
200                                 pc_dep = 1;
201                                 DBPRINTF ("Unboostable insn %lx/%p, DPI/LIO/SIO\n", insn[0], p);
202                         }
203                 // Rn, Rm, Rs
204                 } else if (ARM_INSN_MATCH(DPRS, insn[0])) {
205                         uregs = 0xd;
206                         if ((ARM_INSN_REG_RN(insn[0]) == 15) || (ARM_INSN_REG_RM(insn[0]) == 15) ||
207                             (ARM_INSN_REG_RS (insn[0]) == 15)) {
208                                 pc_dep = 1;
209                                 DBPRINTF ("Unboostable insn %lx, DPRS\n", insn[0]);
210                         }
211                 // register list
212                 } else if(ARM_INSN_MATCH(SM, insn[0])) {
213                         uregs = 0x10;
214                         if (ARM_INSN_REG_MR(insn[0], 15)) {
215                                 DBPRINTF ("Unboostable insn %lx, SM\n", insn[0]);
216                                 pc_dep = 1;
217                         }
218                 }
219
220                 // check instructions that can write result to SP andu uses PC
221                 if (pc_dep  && (ARM_INSN_REG_RD(ainsn.insn[0]) == 13)) {
222                         free_insn_slot(page_list, NULL, p->ainsn.insn);
223                         ret = -EFAULT;
224                 } else {
225                         if (uregs && pc_dep) {
226                                 memcpy(insns, pc_dep_insn_execbuf, sizeof(insns));
227                                 if (prep_pc_dep_insn_execbuf(insns, insn[0], uregs) != 0) {
228                                         DBPRINTF ("failed to prepare exec buffer for insn %lx!", insn[0]);
229                                         free_insn_slot(page_list, NULL, p->ainsn.insn);
230                                         return -EINVAL;
231                                 }
232                                 insns[6] = (kprobe_opcode_t)(p->addr + 2);
233                         } else {
234                                 memcpy(insns, gen_insn_execbuf, sizeof(insns));
235                                 insns[KPROBES_TRAMP_INSN_IDX] = insn[0];
236                         }
237                         insns[7] = (kprobe_opcode_t)(p->addr + 1);
238                         DBPRINTF ("arch_prepare_kprobe: insn %lx", insn[0]);
239                         DBPRINTF ("arch_prepare_kprobe: to %p - %lx %lx %lx %lx %lx %lx %lx %lx %lx",
240                                   p->ainsn.insn, insns[0], insns[1], insns[2], insns[3], insns[4],
241                                   insns[5], insns[6], insns[7], insns[8]);
242                         memcpy(p->ainsn.insn, insns, sizeof(insns));
243                         flush_icache_range((long unsigned)p->ainsn.insn, (long unsigned)(p->ainsn.insn) + sizeof(insns));
244 #ifdef BOARD_tegra
245                         flush_cache_all();
246 #endif
247                 }
248         } else {
249                 free_insn_slot(page_list, NULL, p->ainsn.insn);
250                 printk("arch_prepare_kprobe: instruction 0x%lx not instrumentation, addr=0x%p\n", insn[0], p->addr);
251         }
252
253         return ret;
254 }
255
256 void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
257 {
258         if (p->ss_addr) {
259                 regs->ARM_pc = (unsigned long)p->ss_addr;
260                 p->ss_addr = NULL;
261         } else {
262                 regs->ARM_pc = (unsigned long)p->ainsn.insn;
263         }
264 }
265 EXPORT_SYMBOL_GPL(prepare_singlestep);
266
267 void save_previous_kprobe(struct kprobe_ctlblk *kcb, struct kprobe *p_run)
268 {
269         kcb->prev_kprobe.kp = kprobe_running();
270         kcb->prev_kprobe.status = kcb->kprobe_status;
271 }
272
273 void restore_previous_kprobe(struct kprobe_ctlblk *kcb)
274 {
275         __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
276         kcb->kprobe_status = kcb->prev_kprobe.status;
277 }
278
279 void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
280 {
281         __get_cpu_var(current_kprobe) = p;
282         DBPRINTF ("set_current_kprobe: p=%p addr=%p\n", p, p->addr);
283 }
284
285 static int kprobe_handler(struct pt_regs *regs)
286 {
287         struct kprobe *p, *cur;
288         struct kprobe_ctlblk *kcb;
289
290         kcb = get_kprobe_ctlblk();
291         cur = kprobe_running();
292         p = get_kprobe((void *)regs->ARM_pc);
293
294         if (p) {
295                 if (cur) {
296                         /* Kprobe is pending, so we're recursing. */
297                         switch (kcb->kprobe_status) {
298                         case KPROBE_HIT_ACTIVE:
299                         case KPROBE_HIT_SSDONE:
300                                 /* A pre- or post-handler probe got us here. */
301                                 kprobes_inc_nmissed_count(p);
302                                 save_previous_kprobe(kcb, NULL);
303                                 set_current_kprobe(p, 0, 0);
304                                 kcb->kprobe_status = KPROBE_REENTER;
305                                 prepare_singlestep(p, regs);
306                                 restore_previous_kprobe(kcb);
307                                 break;
308                         default:
309                                 /* impossible cases */
310                                 BUG();
311                         }
312                 } else {
313                         set_current_kprobe(p, 0, 0);
314                         kcb->kprobe_status = KPROBE_HIT_ACTIVE;
315
316                         if (!p->pre_handler || !p->pre_handler(p, regs)) {
317                                 kcb->kprobe_status = KPROBE_HIT_SS;
318                                 prepare_singlestep(p, regs);
319                                 reset_current_kprobe();
320                         }
321                 }
322         } else {
323                 goto no_kprobe;
324         }
325
326         return 0;
327
328 no_kprobe:
329         printk("no_kprobe\n");
330         return 1;
331 }
332
333 int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
334 {
335         int ret;
336         unsigned long flags;
337
338 #ifdef SUPRESS_BUG_MESSAGES
339         int swap_oops_in_progress;
340         /* oops_in_progress used to avoid BUG() messages
341          * that slow down kprobe_handler() execution */
342         swap_oops_in_progress = oops_in_progress;
343         oops_in_progress = 1;
344 #endif
345
346         local_irq_save(flags);
347         preempt_disable();
348         ret = kprobe_handler(regs);
349         preempt_enable_no_resched();
350         local_irq_restore(flags);
351
352 #ifdef SUPRESS_BUG_MESSAGES
353         oops_in_progress = swap_oops_in_progress;
354 #endif
355
356         return ret;
357 }
358
359 int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
360 {
361         struct jprobe *jp = container_of(p, struct jprobe, kp);
362         kprobe_pre_entry_handler_t pre_entry = (kprobe_pre_entry_handler_t)jp->pre_entry;
363         entry_point_t entry = (entry_point_t)jp->entry;
364         pre_entry = (kprobe_pre_entry_handler_t)jp->pre_entry;
365
366         if (((unsigned long)p->addr == sched_addr) && sched_rp) {
367                 struct thread_info *tinfo = (struct thread_info *)regs->ARM_r2;
368                 patch_suspended_task(sched_rp, tinfo->task);
369         }
370
371         if (pre_entry) {
372                 p->ss_addr = (void *)pre_entry (jp->priv_arg, regs);
373         }
374
375         if (entry) {
376                 entry(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2,
377                       regs->ARM_r3, regs->ARM_r4, regs->ARM_r5);
378         } else {
379                 dbi_jprobe_return();
380         }
381
382         return 0;
383 }
384
385 void dbi_jprobe_return (void)
386 {
387 }
388
389 int longjmp_break_handler (struct kprobe *p, struct pt_regs *regs)
390 {
391         return 0;
392 }
393 EXPORT_SYMBOL_GPL(longjmp_break_handler);
394
395 void arch_arm_kprobe(struct kprobe *p)
396 {
397         *p->addr = BREAKPOINT_INSTRUCTION;
398         flush_icache_range((unsigned long)p->addr, (unsigned long)p->addr + sizeof(kprobe_opcode_t));
399 }
400
401 void arch_disarm_kprobe(struct kprobe *p)
402 {
403         *p->addr = p->opcode;
404         flush_icache_range((unsigned long)p->addr, (unsigned long)p->addr + sizeof(kprobe_opcode_t));
405 }
406
407 int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
408 {
409         struct kretprobe_instance *ri = NULL;
410         struct hlist_head *head;
411         struct hlist_node *node, *tmp;
412         unsigned long flags, orig_ret_address = 0;
413         unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
414
415         struct kretprobe *crp = NULL;
416         struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
417
418         spin_lock_irqsave(&kretprobe_lock, flags);
419
420         /*
421          * We are using different hash keys (current and mm) for finding kernel
422          * space and user space probes.  Kernel space probes can change mm field in
423          * task_struct.  User space probes can be shared between threads of one
424          * process so they have different current but same mm.
425          */
426         head = kretprobe_inst_table_head(current);
427
428         /*
429          * It is possible to have multiple instances associated with a given
430          * task either because an multiple functions in the call path
431          * have a return probe installed on them, and/or more then one
432          * return probe was registered for a target function.
433          *
434          * We can handle this because:
435          *     - instances are always inserted at the head of the list
436          *     - when multiple return probes are registered for the same
437          *       function, the first instance's ret_addr will point to the
438          *       real return address, and all the rest will point to
439          *       kretprobe_trampoline
440          */
441         hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
442                 if (ri->task != current)
443                         /* another task is sharing our hash bucket */
444                         continue;
445                 if (ri->rp && ri->rp->handler) {
446                         ri->rp->handler(ri, regs, ri->rp->priv_arg);
447                 }
448
449                 orig_ret_address = (unsigned long)ri->ret_addr;
450                 recycle_rp_inst(ri);
451                 if (orig_ret_address != trampoline_address)
452                         /*
453                          * This is the real return address. Any other
454                          * instances associated with this task are for
455                          * other calls deeper on the call stack
456                          */
457                         break;
458         }
459         kretprobe_assert(ri, orig_ret_address, trampoline_address);
460
461         regs->ARM_lr = orig_ret_address;
462         regs->ARM_pc = orig_ret_address;
463
464         if (kcb->kprobe_status == KPROBE_REENTER) {
465                 restore_previous_kprobe(kcb);
466         } else {
467                 reset_current_kprobe();
468         }
469
470         spin_unlock_irqrestore(&kretprobe_lock, flags);
471
472         /*
473          * By returning a non-zero value, we are telling
474          * kprobe_handler() that we don't want the post_handler
475          * to run (and have re-enabled preemption)
476          */
477
478         return 1;
479 }
480 EXPORT_SYMBOL_GPL(trampoline_probe_handler);
481
482 void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs)
483 {
484         struct kretprobe_instance *ri;
485
486         DBPRINTF ("start\n");
487         //TODO: test - remove retprobe after func entry but before its exit
488         if ((ri = get_free_rp_inst(rp)) != NULL) {
489                 ri->rp = rp;
490                 ri->task = current;
491                 ri->ret_addr = (kprobe_opcode_t *)regs->uregs[14];
492                 ri->sp = (kprobe_opcode_t *)regs->ARM_sp; //uregs[13];
493
494                 /* Set flag of current mode */
495                 ri->sp = (kprobe_opcode_t *)((long)ri->sp | !!thumb_mode(regs));
496
497                 /* Replace the return addr with trampoline addr */
498                 regs->uregs[14] = (unsigned long)&kretprobe_trampoline;
499
500 //              DBPRINTF ("ret addr set to %p->%lx\n", ri->ret_addr, regs->uregs[14]);
501                 add_rp_inst(ri);
502         } else {
503                 DBPRINTF ("WARNING: missed retprobe %p\n", rp->kp.addr);
504                 rp->nmissed++;
505         }
506 }
507
508 void swap_register_undef_hook(struct undef_hook *hook)
509 {
510         __swap_register_undef_hook(hook);
511 }
512 EXPORT_SYMBOL_GPL(swap_register_undef_hook);
513
514 void swap_unregister_undef_hook(struct undef_hook *hook)
515 {
516         __swap_unregister_undef_hook(hook);
517 }
518 EXPORT_SYMBOL_GPL(swap_unregister_undef_hook);
519
520 // kernel probes hook
521 static struct undef_hook undef_ho_k = {
522         .instr_mask     = 0xffffffff,
523         .instr_val      = BREAKPOINT_INSTRUCTION,
524         .cpsr_mask      = MODE_MASK,
525         .cpsr_val       = SVC_MODE,
526         .fn             = kprobe_trap_handler
527 };
528
529 int arch_init_kprobes(void)
530 {
531         int ret = 0;
532
533         // Register hooks (kprobe_handler)
534         __swap_register_undef_hook = swap_ksyms("register_undef_hook");
535         if (__swap_register_undef_hook == NULL) {
536                 printk("no register_undef_hook symbol found!\n");
537                 return -1;
538         }
539
540         // Unregister hooks (kprobe_handler)
541         __swap_unregister_undef_hook = swap_ksyms("unregister_undef_hook");
542         if (__swap_unregister_undef_hook == NULL) {
543                 printk("no unregister_undef_hook symbol found!\n");
544                 return -1;
545         }
546
547         swap_register_undef_hook(&undef_ho_k);
548         if ((ret = dbi_register_kprobe (&trampoline_p)) != 0) {
549                 //dbi_unregister_jprobe(&do_exit_p, 0);
550                 return ret;
551         }
552
553         return ret;
554 }
555
556 void arch_exit_kprobes(void)
557 {
558         swap_unregister_undef_hook(&undef_ho_k);
559 }
560
561 /* export symbol for trampoline_arm.h */
562 EXPORT_SYMBOL_GPL(gen_insn_execbuf);
563 EXPORT_SYMBOL_GPL(pc_dep_insn_execbuf);