2 * BPF Jit compiler for s390.
4 * Copyright IBM Corp. 2012
6 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
8 #include <linux/moduleloader.h>
9 #include <linux/netdevice.h>
10 #include <linux/filter.h>
11 #include <asm/cacheflush.h>
12 #include <asm/processor.h>
17 * %r3 = offset parameter
18 * %r4 = scratch register / length parameter
19 * %r5 = BPF A accumulator
20 * %r8 = return address
21 * %r9 = save register for skb pointer
23 * %r11 = skb->len - skb->data_len (headlen)
24 * %r12 = BPF X accumulator
25 * %r13 = literal pool pointer
26 * 0(%r15) - 63(%r15) scratch memory array with BPF_MEMWORDS
28 int bpf_jit_enable __read_mostly;
31 * assembly code in arch/x86/net/bpf_jit.S
33 extern u8 sk_load_word[], sk_load_half[], sk_load_byte[], sk_load_byte_msh[];
34 extern u8 sk_load_word_ind[], sk_load_half_ind[], sk_load_byte_ind[];
46 unsigned int off_load_word;
47 unsigned int off_load_half;
48 unsigned int off_load_byte;
49 unsigned int off_load_bmsh;
50 unsigned int off_load_iword;
51 unsigned int off_load_ihalf;
52 unsigned int off_load_ibyte;
55 #define BPF_SIZE_MAX 4096 /* Max size for program */
57 #define SEEN_DATAREF 1 /* might call external helpers */
58 #define SEEN_XREG 2 /* ebx is used */
59 #define SEEN_MEM 4 /* use mem[] for temporary storage */
60 #define SEEN_RET0 8 /* pc_ret0 points to a valid return 0 */
61 #define SEEN_LITERAL 16 /* code uses literals */
62 #define SEEN_LOAD_WORD 32 /* code uses sk_load_word */
63 #define SEEN_LOAD_HALF 64 /* code uses sk_load_half */
64 #define SEEN_LOAD_BYTE 128 /* code uses sk_load_byte */
65 #define SEEN_LOAD_BMSH 256 /* code uses sk_load_byte_msh */
66 #define SEEN_LOAD_IWORD 512 /* code uses sk_load_word_ind */
67 #define SEEN_LOAD_IHALF 1024 /* code uses sk_load_half_ind */
68 #define SEEN_LOAD_IBYTE 2048 /* code uses sk_load_byte_ind */
72 if (jit->prg + 2 <= jit->mid) \
73 *(u16 *) jit->prg = op; \
79 if (jit->prg + 4 <= jit->mid) \
80 *(u32 *) jit->prg = op; \
84 #define EMIT4_DISP(op, disp) \
86 unsigned int __disp = (disp) & 0xfff; \
90 #define EMIT4_IMM(op, imm) \
92 unsigned int __imm = (imm) & 0xffff; \
96 #define EMIT4_PCREL(op, pcrel) \
98 long __pcrel = ((pcrel) >> 1) & 0xffff; \
99 EMIT4(op | __pcrel); \
102 #define EMIT6(op1, op2) \
104 if (jit->prg + 6 <= jit->mid) { \
105 *(u32 *) jit->prg = op1; \
106 *(u16 *) (jit->prg + 4) = op2; \
111 #define EMIT6_DISP(op1, op2, disp) \
113 unsigned int __disp = (disp) & 0xfff; \
114 EMIT6(op1 | __disp, op2); \
117 #define EMIT_CONST(val) \
120 ret = (unsigned int) (jit->lit - jit->base_ip); \
121 jit->seen |= SEEN_LITERAL; \
122 if (jit->lit + 4 <= jit->end) \
123 *(u32 *) jit->lit = val; \
128 #define EMIT_FN_CONST(bit, fn) \
131 ret = (unsigned int) (jit->lit - jit->base_ip); \
132 if (jit->seen & bit) { \
133 jit->seen |= SEEN_LITERAL; \
134 if (jit->lit + 8 <= jit->end) \
135 *(void **) jit->lit = fn; \
141 static void bpf_jit_prologue(struct bpf_jit *jit)
143 /* Save registers and create stack frame if necessary */
144 if (jit->seen & SEEN_DATAREF) {
145 /* stmg %r8,%r15,88(%r15) */
146 EMIT6(0xeb8ff058, 0x0024);
149 /* ahi %r15,<offset> */
150 EMIT4_IMM(0xa7fa0000, (jit->seen & SEEN_MEM) ? -112 : -80);
151 /* stg %r14,152(%r15) */
152 EMIT6(0xe3e0f098, 0x0024);
153 } else if ((jit->seen & SEEN_XREG) && (jit->seen & SEEN_LITERAL))
154 /* stmg %r12,%r13,120(%r15) */
155 EMIT6(0xebcdf078, 0x0024);
156 else if (jit->seen & SEEN_XREG)
157 /* stg %r12,120(%r15) */
158 EMIT6(0xe3c0f078, 0x0024);
159 else if (jit->seen & SEEN_LITERAL)
160 /* stg %r13,128(%r15) */
161 EMIT6(0xe3d0f080, 0x0024);
163 /* Setup literal pool */
164 if (jit->seen & SEEN_LITERAL) {
167 jit->base_ip = jit->prg;
169 jit->off_load_word = EMIT_FN_CONST(SEEN_LOAD_WORD, sk_load_word);
170 jit->off_load_half = EMIT_FN_CONST(SEEN_LOAD_HALF, sk_load_half);
171 jit->off_load_byte = EMIT_FN_CONST(SEEN_LOAD_BYTE, sk_load_byte);
172 jit->off_load_bmsh = EMIT_FN_CONST(SEEN_LOAD_BMSH, sk_load_byte_msh);
173 jit->off_load_iword = EMIT_FN_CONST(SEEN_LOAD_IWORD, sk_load_word_ind);
174 jit->off_load_ihalf = EMIT_FN_CONST(SEEN_LOAD_IHALF, sk_load_half_ind);
175 jit->off_load_ibyte = EMIT_FN_CONST(SEEN_LOAD_IBYTE, sk_load_byte_ind);
177 /* Filter needs to access skb data */
178 if (jit->seen & SEEN_DATAREF) {
179 /* l %r11,<len>(%r2) */
180 EMIT4_DISP(0x58b02000, offsetof(struct sk_buff, len));
181 /* s %r11,<data_len>(%r2) */
182 EMIT4_DISP(0x5bb02000, offsetof(struct sk_buff, data_len));
183 /* lg %r10,<data>(%r2) */
184 EMIT6_DISP(0xe3a02000, 0x0004,
185 offsetof(struct sk_buff, data));
189 static void bpf_jit_epilogue(struct bpf_jit *jit)
192 if (jit->seen & SEEN_RET0) {
193 jit->ret0_ip = jit->prg;
197 jit->exit_ip = jit->prg;
198 /* Restore registers */
199 if (jit->seen & SEEN_DATAREF)
200 /* lmg %r8,%r15,<offset>(%r15) */
201 EMIT6_DISP(0xeb8ff000, 0x0004,
202 (jit->seen & SEEN_MEM) ? 200 : 168);
203 else if ((jit->seen & SEEN_XREG) && (jit->seen & SEEN_LITERAL))
204 /* lmg %r12,%r13,120(%r15) */
205 EMIT6(0xebcdf078, 0x0004);
206 else if (jit->seen & SEEN_XREG)
207 /* lg %r12,120(%r15) */
208 EMIT6(0xe3c0f078, 0x0004);
209 else if (jit->seen & SEEN_LITERAL)
210 /* lg %r13,128(%r15) */
211 EMIT6(0xe3d0f080, 0x0004);
217 * make sure we dont leak kernel information to user
219 static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter)
221 /* Clear temporary memory if (seen & SEEN_MEM) */
222 if (jit->seen & SEEN_MEM)
223 /* xc 0(64,%r15),0(%r15) */
224 EMIT6(0xd73ff000, 0xf000);
225 /* Clear X if (seen & SEEN_XREG) */
226 if (jit->seen & SEEN_XREG)
229 /* Clear A if the first register does not set it. */
230 switch (filter[0].code) {
238 case BPF_S_LDX_B_MSH:
242 case BPF_S_ANC_PROTOCOL:
243 case BPF_S_ANC_PKTTYPE:
244 case BPF_S_ANC_IFINDEX:
246 case BPF_S_ANC_QUEUE:
247 case BPF_S_ANC_HATYPE:
248 case BPF_S_ANC_RXHASH:
251 /* first instruction sets A register */
259 static int bpf_jit_insn(struct bpf_jit *jit, struct sock_filter *filter,
260 unsigned int *addrs, int i, int last)
267 switch (filter->code) {
268 case BPF_S_ALU_ADD_X: /* A += X */
269 jit->seen |= SEEN_XREG;
273 case BPF_S_ALU_ADD_K: /* A += K */
278 EMIT4_IMM(0xa75a0000, K);
280 /* a %r5,<d(K)>(%r13) */
281 EMIT4_DISP(0x5a50d000, EMIT_CONST(K));
283 case BPF_S_ALU_SUB_X: /* A -= X */
284 jit->seen |= SEEN_XREG;
288 case BPF_S_ALU_SUB_K: /* A -= K */
293 EMIT4_IMM(0xa75a0000, -K);
295 /* s %r5,<d(K)>(%r13) */
296 EMIT4_DISP(0x5b50d000, EMIT_CONST(K));
298 case BPF_S_ALU_MUL_X: /* A *= X */
299 jit->seen |= SEEN_XREG;
303 case BPF_S_ALU_MUL_K: /* A *= K */
306 EMIT4_IMM(0xa75c0000, K);
308 /* ms %r5,<d(K)>(%r13) */
309 EMIT4_DISP(0x7150d000, EMIT_CONST(K));
311 case BPF_S_ALU_DIV_X: /* A /= X */
312 jit->seen |= SEEN_XREG | SEEN_RET0;
316 EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg));
322 case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K) */
323 /* m %r4,<d(K)>(%r13) */
324 EMIT4_DISP(0x5c40d000, EMIT_CONST(K));
328 case BPF_S_ALU_AND_X: /* A &= X */
329 jit->seen |= SEEN_XREG;
333 case BPF_S_ALU_AND_K: /* A &= K */
334 /* n %r5,<d(K)>(%r13) */
335 EMIT4_DISP(0x5450d000, EMIT_CONST(K));
337 case BPF_S_ALU_OR_X: /* A |= X */
338 jit->seen |= SEEN_XREG;
342 case BPF_S_ALU_OR_K: /* A |= K */
343 /* o %r5,<d(K)>(%r13) */
344 EMIT4_DISP(0x5650d000, EMIT_CONST(K));
346 case BPF_S_ALU_LSH_X: /* A <<= X; */
347 jit->seen |= SEEN_XREG;
348 /* sll %r5,0(%r12) */
351 case BPF_S_ALU_LSH_K: /* A <<= K */
355 EMIT4_DISP(0x89500000, K);
357 case BPF_S_ALU_RSH_X: /* A >>= X; */
358 jit->seen |= SEEN_XREG;
359 /* srl %r5,0(%r12) */
362 case BPF_S_ALU_RSH_K: /* A >>= K; */
366 EMIT4_DISP(0x88500000, K);
368 case BPF_S_ALU_NEG: /* A = -A */
372 case BPF_S_JMP_JA: /* ip += K */
373 offset = addrs[i + K] + jit->start - jit->prg;
374 EMIT4_PCREL(0xa7f40000, offset);
376 case BPF_S_JMP_JGT_K: /* ip += (A > K) ? jt : jf */
377 mask = 0x200000; /* jh */
379 case BPF_S_JMP_JGE_K: /* ip += (A >= K) ? jt : jf */
380 mask = 0xa00000; /* jhe */
382 case BPF_S_JMP_JEQ_K: /* ip += (A == K) ? jt : jf */
383 mask = 0x800000; /* je */
384 kbranch: /* Emit compare if the branch targets are different */
385 if (filter->jt != filter->jf) {
388 EMIT4_IMM(0xa75e0000, K);
390 /* c %r5,<d(K)>(%r13) */
391 EMIT4_DISP(0x5950d000, EMIT_CONST(K));
393 branch: if (filter->jt == filter->jf) {
397 offset = addrs[i + filter->jt] + jit->start - jit->prg;
398 EMIT4_PCREL(0xa7f40000, offset);
401 if (filter->jt != 0) {
402 /* brc <mask>,<jt> */
403 offset = addrs[i + filter->jt] + jit->start - jit->prg;
404 EMIT4_PCREL(0xa7040000 | mask, offset);
406 if (filter->jf != 0) {
407 /* brc <mask^15>,<jf> */
408 offset = addrs[i + filter->jf] + jit->start - jit->prg;
409 EMIT4_PCREL(0xa7040000 | (mask ^ 0xf00000), offset);
412 case BPF_S_JMP_JSET_K: /* ip += (A & K) ? jt : jf */
413 mask = 0x700000; /* jnz */
414 /* Emit test if the branch targets are different */
415 if (filter->jt != filter->jf) {
419 /* n %r4,<d(K)>(%r13) */
420 EMIT4_DISP(0x5440d000, EMIT_CONST(K));
423 EMIT4_IMM(0xa7510000, K);
426 case BPF_S_JMP_JGT_X: /* ip += (A > X) ? jt : jf */
427 mask = 0x200000; /* jh */
429 case BPF_S_JMP_JGE_X: /* ip += (A >= X) ? jt : jf */
430 mask = 0xa00000; /* jhe */
432 case BPF_S_JMP_JEQ_X: /* ip += (A == X) ? jt : jf */
433 mask = 0x800000; /* je */
434 xbranch: /* Emit compare if the branch targets are different */
435 if (filter->jt != filter->jf) {
436 jit->seen |= SEEN_XREG;
441 case BPF_S_JMP_JSET_X: /* ip += (A & X) ? jt : jf */
442 mask = 0x700000; /* jnz */
443 /* Emit test if the branch targets are different */
444 if (filter->jt != filter->jf) {
445 jit->seen |= SEEN_XREG;
452 case BPF_S_LD_W_ABS: /* A = *(u32 *) (skb->data+K) */
453 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_WORD;
454 offset = jit->off_load_word;
456 case BPF_S_LD_H_ABS: /* A = *(u16 *) (skb->data+K) */
457 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_HALF;
458 offset = jit->off_load_half;
460 case BPF_S_LD_B_ABS: /* A = *(u8 *) (skb->data+K) */
461 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_BYTE;
462 offset = jit->off_load_byte;
463 load_abs: if ((int) K < 0)
465 call_fn: /* lg %r1,<d(function)>(%r13) */
466 EMIT6_DISP(0xe310d000, 0x0004, offset);
467 /* l %r3,<d(K)>(%r13) */
468 EMIT4_DISP(0x5830d000, EMIT_CONST(K));
472 EMIT4_PCREL(0xa7740000, (jit->ret0_ip - jit->prg));
474 case BPF_S_LD_W_IND: /* A = *(u32 *) (skb->data+K+X) */
475 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_IWORD;
476 offset = jit->off_load_iword;
478 case BPF_S_LD_H_IND: /* A = *(u16 *) (skb->data+K+X) */
479 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_IHALF;
480 offset = jit->off_load_ihalf;
482 case BPF_S_LD_B_IND: /* A = *(u8 *) (skb->data+K+X) */
483 jit->seen |= SEEN_DATAREF | SEEN_RET0 | SEEN_LOAD_IBYTE;
484 offset = jit->off_load_ibyte;
486 case BPF_S_LDX_B_MSH:
487 /* X = (*(u8 *)(skb->data+K) & 0xf) << 2 */
488 jit->seen |= SEEN_RET0;
491 EMIT4_PCREL(0xa7f40000, (jit->ret0_ip - jit->prg));
494 jit->seen |= SEEN_DATAREF | SEEN_LOAD_BMSH;
495 offset = jit->off_load_bmsh;
497 case BPF_S_LD_W_LEN: /* A = skb->len; */
498 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4);
499 /* l %r5,<d(len)>(%r2) */
500 EMIT4_DISP(0x58502000, offsetof(struct sk_buff, len));
502 case BPF_S_LDX_W_LEN: /* X = skb->len; */
503 jit->seen |= SEEN_XREG;
504 /* l %r12,<d(len)>(%r2) */
505 EMIT4_DISP(0x58c02000, offsetof(struct sk_buff, len));
507 case BPF_S_LD_IMM: /* A = K */
510 EMIT4_IMM(0xa7580000, K);
512 /* l %r5,<d(K)>(%r13) */
513 EMIT4_DISP(0x5850d000, EMIT_CONST(K));
515 case BPF_S_LDX_IMM: /* X = K */
516 jit->seen |= SEEN_XREG;
519 EMIT4_IMM(0xa7c80000, K);
521 /* l %r12,<d(K)>(%r13) */
522 EMIT4_DISP(0x58c0d000, EMIT_CONST(K));
524 case BPF_S_LD_MEM: /* A = mem[K] */
525 jit->seen |= SEEN_MEM;
526 /* l %r5,<K>(%r15) */
527 EMIT4_DISP(0x5850f000,
528 (jit->seen & SEEN_DATAREF) ? 160 + K*4 : K*4);
530 case BPF_S_LDX_MEM: /* X = mem[K] */
531 jit->seen |= SEEN_XREG | SEEN_MEM;
532 /* l %r12,<K>(%r15) */
533 EMIT4_DISP(0x58c0f000,
534 (jit->seen & SEEN_DATAREF) ? 160 + K*4 : K*4);
536 case BPF_S_MISC_TAX: /* X = A */
537 jit->seen |= SEEN_XREG;
541 case BPF_S_MISC_TXA: /* A = X */
542 jit->seen |= SEEN_XREG;
548 jit->seen |= SEEN_RET0;
552 EMIT4_PCREL(0xa7f40000, jit->ret0_ip - jit->prg);
556 EMIT4_IMM(0xa7290000, K);
558 /* llgf %r2,<K>(%r13) */
559 EMIT6_DISP(0xe320d000, 0x0016, EMIT_CONST(K));
561 if (last && !(jit->seen & SEEN_RET0))
563 EMIT4_PCREL(0xa7f40000, jit->exit_ip - jit->prg);
570 EMIT4_PCREL(0xa7f40000, jit->exit_ip - jit->prg);
572 case BPF_S_ST: /* mem[K] = A */
573 jit->seen |= SEEN_MEM;
574 /* st %r5,<K>(%r15) */
575 EMIT4_DISP(0x5050f000,
576 (jit->seen & SEEN_DATAREF) ? 160 + K*4 : K*4);
578 case BPF_S_STX: /* mem[K] = X : mov %ebx,off8(%rbp) */
579 jit->seen |= SEEN_XREG | SEEN_MEM;
580 /* st %r12,<K>(%r15) */
581 EMIT4_DISP(0x50c0f000,
582 (jit->seen & SEEN_DATAREF) ? 160 + K*4 : K*4);
584 case BPF_S_ANC_PROTOCOL: /* A = ntohs(skb->protocol); */
585 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, protocol) != 2);
588 /* icm %r5,3,<d(protocol)>(%r2) */
589 EMIT4_DISP(0xbf532000, offsetof(struct sk_buff, protocol));
591 case BPF_S_ANC_IFINDEX: /* if (!skb->dev) return 0;
592 * A = skb->dev->ifindex */
593 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4);
594 jit->seen |= SEEN_RET0;
595 /* lg %r1,<d(dev)>(%r2) */
596 EMIT6_DISP(0xe3102000, 0x0004, offsetof(struct sk_buff, dev));
600 EMIT4_PCREL(0xa7840000, jit->ret0_ip - jit->prg);
601 /* l %r5,<d(ifindex)>(%r1) */
602 EMIT4_DISP(0x58501000, offsetof(struct net_device, ifindex));
604 case BPF_S_ANC_MARK: /* A = skb->mark */
605 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
606 /* l %r5,<d(mark)>(%r2) */
607 EMIT4_DISP(0x58502000, offsetof(struct sk_buff, mark));
609 case BPF_S_ANC_QUEUE: /* A = skb->queue_mapping */
610 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, queue_mapping) != 2);
613 /* icm %r5,3,<d(queue_mapping)>(%r2) */
614 EMIT4_DISP(0xbf532000, offsetof(struct sk_buff, queue_mapping));
616 case BPF_S_ANC_HATYPE: /* if (!skb->dev) return 0;
617 * A = skb->dev->type */
618 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, type) != 2);
619 jit->seen |= SEEN_RET0;
620 /* lg %r1,<d(dev)>(%r2) */
621 EMIT6_DISP(0xe3102000, 0x0004, offsetof(struct sk_buff, dev));
625 EMIT4_PCREL(0xa7840000, jit->ret0_ip - jit->prg);
628 /* icm %r5,3,<d(type)>(%r1) */
629 EMIT4_DISP(0xbf531000, offsetof(struct net_device, type));
631 case BPF_S_ANC_RXHASH: /* A = skb->rxhash */
632 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4);
633 /* l %r5,<d(rxhash)>(%r2) */
634 EMIT4_DISP(0x58502000, offsetof(struct sk_buff, rxhash));
636 case BPF_S_ANC_CPU: /* A = smp_processor_id() */
638 /* l %r5,<d(cpu_nr)> */
639 EMIT4_DISP(0x58500000, offsetof(struct _lowcore, cpu_nr));
645 default: /* too complex, give up */
648 addrs[i] = jit->prg - jit->start;
654 void bpf_jit_compile(struct sk_filter *fp)
656 unsigned long size, prg_len, lit_len;
657 struct bpf_jit jit, cjit;
663 addrs = kmalloc(fp->len * sizeof(*addrs), GFP_KERNEL);
666 memset(addrs, 0, fp->len * sizeof(*addrs));
667 memset(&jit, 0, sizeof(cjit));
668 memset(&cjit, 0, sizeof(cjit));
670 for (pass = 0; pass < 10; pass++) {
674 bpf_jit_prologue(&jit);
675 bpf_jit_noleaks(&jit, fp->insns);
676 for (i = 0; i < fp->len; i++) {
677 if (bpf_jit_insn(&jit, fp->insns + i, addrs, i,
681 bpf_jit_epilogue(&jit);
683 WARN_ON(jit.prg > cjit.prg || jit.lit > cjit.lit);
684 if (memcmp(&jit, &cjit, sizeof(jit)) == 0)
686 } else if (jit.prg == cjit.prg && jit.lit == cjit.lit) {
687 prg_len = jit.prg - jit.start;
688 lit_len = jit.lit - jit.mid;
689 size = max_t(unsigned long, prg_len + lit_len,
690 sizeof(struct work_struct));
691 if (size >= BPF_SIZE_MAX)
693 jit.start = module_alloc(size);
696 jit.prg = jit.mid = jit.start + prg_len;
697 jit.lit = jit.end = jit.start + prg_len + lit_len;
698 jit.base_ip += (unsigned long) jit.start;
699 jit.exit_ip += (unsigned long) jit.start;
700 jit.ret0_ip += (unsigned long) jit.start;
704 if (bpf_jit_enable > 1) {
705 pr_err("flen=%d proglen=%lu pass=%d image=%p\n",
706 fp->len, jit.end - jit.start, pass, jit.start);
708 printk(KERN_ERR "JIT code:\n");
709 print_fn_code(jit.start, jit.mid - jit.start);
710 print_hex_dump(KERN_ERR, "JIT literals:\n",
711 DUMP_PREFIX_ADDRESS, 16, 1,
712 jit.mid, jit.end - jit.mid, false);
716 fp->bpf_func = (void *) jit.start;
721 static void jit_free_defer(struct work_struct *arg)
723 module_free(NULL, arg);
726 /* run from softirq, we must use a work_struct to call
727 * module_free() from process context
729 void bpf_jit_free(struct sk_filter *fp)
731 struct work_struct *work;
733 if (fp->bpf_func == sk_run_filter)
735 work = (struct work_struct *)fp->bpf_func;
736 INIT_WORK(work, jit_free_defer);