Home
last modified time | relevance | path

Searched refs:sock_filter (Results 1 – 25 of 35) sorted by relevance

12

/Linux-v4.19/include/uapi/linux/netfilter/
Dxt_bpf.h10 #define XT_BPF_PATH_MAX (XT_BPF_MAX_NUM_INSTR * sizeof(struct sock_filter))
16 struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
34 struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
/Linux-v4.19/samples/seccomp/
Dbpf-helper.c20 struct sock_filter *filter, size_t count) in bpf_resolve_jumps()
32 struct sock_filter *instr = &filter[offset]; in bpf_resolve_jumps()
90 void seccomp_bpf_print(struct sock_filter *filter, size_t count) in seccomp_bpf_print()
92 struct sock_filter *end = filter + count; in seccomp_bpf_print()
Ddropper.c30 struct sock_filter filter[] = { in install_filter()
Dbpf-fancy.c35 struct sock_filter filter[] = { in main()
Dbpf-helper.h36 struct sock_filter *filter, size_t count);
38 void seccomp_bpf_print(struct sock_filter *filter, size_t count);
Dbpf-direct.c113 struct sock_filter filter[] = { in install_filter()
/Linux-v4.19/tools/testing/selftests/seccomp/
Dseccomp_bpf.c232 struct sock_filter filter[] = { in TEST()
263 struct sock_filter allow[] = { in TEST()
266 struct sock_filter *filter; in TEST()
300 struct sock_filter allow[] = { in TEST()
303 struct sock_filter *filter; in TEST()
338 struct sock_filter filter[] = { in TEST()
361 struct sock_filter filter[] = { in TEST()
386 struct sock_filter filter[] = { in TEST()
404 struct sock_filter filter[] = { in TEST()
422 struct sock_filter filter[] = { in TEST()
[all …]
Dseccomp_benchmark.c62 struct sock_filter filter[] = { in main()
/Linux-v4.19/arch/um/drivers/
Dvector_user.c558 struct sock_filter *bpf; in uml_vector_default_bpf()
567 sizeof(struct sock_filter) * DEFAULT_BPF_LEN, UM_GFP_KERNEL); in uml_vector_default_bpf()
571 bpf[0] = (struct sock_filter){ 0x20, 0, 0, 0x00000008 }; in uml_vector_default_bpf()
573 bpf[1] = (struct sock_filter){ 0x15, 0, 3, ntohl(*mac1)}; in uml_vector_default_bpf()
575 bpf[2] = (struct sock_filter){ 0x28, 0, 0, 0x00000006 }; in uml_vector_default_bpf()
577 bpf[3] = (struct sock_filter){ 0x15, 0, 1, ntohs(*mac2)}; in uml_vector_default_bpf()
579 bpf[4] = (struct sock_filter){ 0x6, 0, 0, 0x00000000 }; in uml_vector_default_bpf()
581 bpf[5] = (struct sock_filter){ 0x6, 0, 0, 0x00040000 }; in uml_vector_default_bpf()
/Linux-v4.19/include/uapi/linux/
Dfilter.h24 struct sock_filter { /* Filter block */ struct
33 struct sock_filter __user *filter; argument
/Linux-v4.19/tools/testing/selftests/net/
Dpsock_lib.h64 struct sock_filter bpf_filter[] = { in pair_udp_setfilter()
80 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in pair_udp_setfilter()
Dpsock_fanout.c114 struct sock_filter bpf_filter[] = { in sock_fanout_set_cbpf()
121 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in sock_fanout_set_cbpf()
Dreuseport_bpf.c135 struct sock_filter code[] = { in attach_cbpf()
348 struct sock_filter ccode[] = {{ BPF_RET | BPF_A, 0, 0, 0 }}; in test_filter_no_reuseport()
Dreuseport_bpf_cpu.c79 struct sock_filter code[] = { in attach_bpf()
/Linux-v4.19/tools/bpf/
Dbpf_dbg.c131 static struct sock_filter bpf_image[BPF_MAXINSNS + 1];
216 static void bpf_disasm(const struct sock_filter f, unsigned int i) in bpf_disasm()
438 static void bpf_dump_curr(struct bpf_regs *r, struct sock_filter *f) in bpf_dump_curr()
480 static void bpf_disasm_all(const struct sock_filter *f, unsigned int len) in bpf_disasm_all()
488 static void bpf_dump_all(const struct sock_filter *f, unsigned int len) in bpf_dump_all()
498 static bool bpf_runnable(struct sock_filter *f, unsigned int len) in bpf_runnable()
632 static void bpf_single_step(struct bpf_regs *r, struct sock_filter *f, in bpf_single_step()
854 static bool bpf_handle_breakpoint(struct bpf_regs *r, struct sock_filter *f, in bpf_handle_breakpoint()
866 static int bpf_run_all(struct sock_filter *f, uint16_t bpf_len, uint8_t *pkt, in bpf_run_all()
886 static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len, in bpf_run_stepping()
[all …]
/Linux-v4.19/net/sched/
Dact_bpf.c28 struct sock_filter *bpf_ops;
107 sizeof(struct sock_filter)); in tcf_bpf_dump_bpf_info()
183 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
188 struct sock_filter *bpf_ops; in tcf_bpf_init_from_ops()
Dcls_bpf.c50 struct sock_filter *bpf_ops;
65 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
338 struct sock_filter *bpf_ops; in cls_bpf_prog_from_ops()
547 sizeof(struct sock_filter)); in cls_bpf_dump_bpf_info()
/Linux-v4.19/include/linux/
Dfilter.h340 ((struct sock_filter) BPF_STMT(CODE, K))
343 ((struct sock_filter) BPF_JUMP(CODE, K, JT, JF))
470 struct sock_filter *filter;
502 struct sock_filter insns[0];
743 typedef int (*bpf_aux_classic_check_t)(struct sock_filter *filter,
757 int sk_get_filter(struct sock *sk, struct sock_filter __user *filter,
1015 static inline bool bpf_needs_clear_a(const struct sock_filter *first) in bpf_needs_clear_a()
1034 static inline u16 bpf_anc_helper(const struct sock_filter *ftest) in bpf_anc_helper()
/Linux-v4.19/include/net/tc_act/
Dtc_bpf.h23 struct sock_filter *bpf_ops;
/Linux-v4.19/net/core/
Dptp_classifier.c120 static struct sock_filter ptp_filter[] __initdata = { in ptp_classifier_init()
/Linux-v4.19/samples/bpf/
Dtracex5_user.c17 struct sock_filter filter[] = { in install_accept_all_seccomp()
/Linux-v4.19/drivers/net/team/
Dteam_mode_loadbalance.c259 sizeof(struct sock_filter); in lb_bpf_func_get()
268 struct sock_filter *filter = (struct sock_filter *) data; in __fprog_create()
270 if (data_len % sizeof(struct sock_filter)) in __fprog_create()
280 fprog->len = data_len / sizeof(struct sock_filter); in __fprog_create()
/Linux-v4.19/net/netfilter/
Dxt_bpf.c27 static int __bpf_mt_check_bytecode(struct sock_filter *insns, __u16 len, in __bpf_mt_check_bytecode()
/Linux-v4.19/kernel/
Dseccomp.c72 #define MAX_INSNS_PER_PATH ((1 << 18) / sizeof(struct sock_filter))
108 static int seccomp_check_filter(struct sock_filter *filter, unsigned int flen) in seccomp_check_filter()
112 struct sock_filter *ftest = &filter[pc]; in seccomp_check_filter()
377 BUG_ON(INT_MAX / fprog->len < sizeof(struct sock_filter)); in seccomp_prepare_filter()
/Linux-v4.19/arch/powerpc/net/
Dbpf_jit_comp.c32 const struct sock_filter *filter = fp->insns; in bpf_jit_build_prologue()
118 const struct sock_filter *filter = fp->insns; in bpf_jit_build_body()

12