Home
last modified time | relevance | path

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

/linux-4.1.27/samples/seccomp/
Dbpf-helper.c19 struct sock_filter *filter, size_t count) in bpf_resolve_jumps()
21 struct sock_filter *begin = filter; in bpf_resolve_jumps()
89 void seccomp_bpf_print(struct sock_filter *filter, size_t count) in seccomp_bpf_print()
91 struct sock_filter *end = filter + count; in seccomp_bpf_print()
Ddropper.c30 struct sock_filter filter[] = { in install_filter()
Dbpf-fancy.c34 struct sock_filter filter[] = { in main()
Dbpf-helper.h35 struct sock_filter *filter, size_t count);
37 void seccomp_bpf_print(struct sock_filter *filter, size_t count);
Dbpf-direct.c112 struct sock_filter filter[] = { in install_filter()
/linux-4.1.27/include/linux/
Dfilter.h300 struct sock_filter *filter;
320 struct sock_filter insns[0];
366 int bpf_convert_filter(struct sock_filter *prog, int len,
387 int bpf_check_classic(const struct sock_filter *filter, unsigned int flen);
388 int sk_get_filter(struct sock *sk, struct sock_filter __user *filter,
431 static inline bool bpf_needs_clear_a(const struct sock_filter *first) in bpf_needs_clear_a()
450 static inline u16 bpf_anc_helper(const struct sock_filter *ftest) in bpf_anc_helper()
/linux-4.1.27/include/uapi/linux/
Dfilter.h23 struct sock_filter { /* Filter block */ struct
32 struct sock_filter __user *filter; argument
/linux-4.1.27/tools/testing/selftests/net/
Dpsock_lib.h42 struct sock_filter bpf_filter[] = { in pair_udp_setfilter()
55 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in pair_udp_setfilter()
/linux-4.1.27/net/sched/
Dact_bpf.c29 struct sock_filter *bpf_ops;
101 sizeof(struct sock_filter)); in tcf_bpf_dump_bpf_info()
167 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
172 struct sock_filter *bpf_ops; in tcf_bpf_init_from_ops()
Dcls_bpf.c47 struct sock_filter *bpf_ops;
59 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
187 struct sock_filter *bpf_ops; in cls_bpf_prog_from_ops()
391 sizeof(struct sock_filter)); in cls_bpf_dump_bpf_info()
/linux-4.1.27/kernel/
Dseccomp.c64 #define MAX_INSNS_PER_PATH ((1 << 18) / sizeof(struct sock_filter))
100 static int seccomp_check_filter(struct sock_filter *filter, unsigned int flen) in seccomp_check_filter()
104 struct sock_filter *ftest = &filter[pc]; in seccomp_check_filter()
351 struct sock_filter *fp; in seccomp_prepare_filter()
357 BUG_ON(INT_MAX / fprog->len < sizeof(struct sock_filter)); in seccomp_prepare_filter()
358 fp_size = fprog->len * sizeof(struct sock_filter); in seccomp_prepare_filter()
/linux-4.1.27/tools/net/
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 …]
Dbpf_exp.y593 static struct sock_filter out[BPF_MAXINSNS];
/linux-4.1.27/include/uapi/linux/netfilter/
Dxt_bpf.h13 struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
/linux-4.1.27/include/net/tc_act/
Dtc_bpf.h23 struct sock_filter *bpf_ops;
/linux-4.1.27/net/core/
Dptp_classifier.c120 static struct sock_filter ptp_filter[] __initdata = { in ptp_classifier_init()
Dfilter.c204 static bool convert_bpf_extensions(struct sock_filter *fp, in convert_bpf_extensions()
358 int bpf_convert_filter(struct sock_filter *prog, int len, in bpf_convert_filter()
363 struct sock_filter *fp; in bpf_convert_filter()
621 static int check_load_and_stores(const struct sock_filter *filter, int flen) in check_load_and_stores()
754 int bpf_check_classic(const struct sock_filter *filter, unsigned int flen) in bpf_check_classic()
764 const struct sock_filter *ftest = &filter[pc]; in bpf_check_classic()
932 struct sock_filter *old_prog; in bpf_migrate_filter()
941 BUILD_BUG_ON(sizeof(struct sock_filter) != in bpf_migrate_filter()
948 old_prog = kmemdup(fp->insns, old_len * sizeof(struct sock_filter), in bpf_migrate_filter()
1520 int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, in sk_get_filter()
Dsock.c1217 len = sk_get_filter(sk, (struct sock_filter __user *)optval, len); in sock_getsockopt()
/linux-4.1.27/drivers/net/team/
Dteam_mode_loadbalance.c239 sizeof(struct sock_filter); in lb_bpf_func_get()
248 struct sock_filter *filter = (struct sock_filter *) data; in __fprog_create()
250 if (data_len % sizeof(struct sock_filter)) in __fprog_create()
260 fprog->len = data_len / sizeof(struct sock_filter); in __fprog_create()
/linux-4.1.27/arch/powerpc/net/
Dbpf_jit_comp.c33 const struct sock_filter *filter = fp->insns; in bpf_jit_build_prologue()
119 const struct sock_filter *filter = fp->insns; in bpf_jit_build_body()
/linux-4.1.27/drivers/net/ppp/
Dppp_generic.c540 static int get_filter(void __user *arg, struct sock_filter **p) in get_filter()
543 struct sock_filter *code = NULL; in get_filter()
554 len = uprog.len * sizeof(struct sock_filter); in get_filter()
754 struct sock_filter *code; in ppp_ioctl()
780 struct sock_filter *code; in ppp_ioctl()
/linux-4.1.27/drivers/isdn/i4l/
Disdn_ppp.c447 static int get_filter(void __user *arg, struct sock_filter **p) in get_filter()
450 struct sock_filter *code = NULL; in get_filter()
462 len = uprog.len * sizeof(struct sock_filter); in get_filter()
636 struct sock_filter *code; in isdn_ppp_ioctl()
660 struct sock_filter *code; in isdn_ppp_ioctl()
/linux-4.1.27/arch/sparc/net/
Dbpf_jit_comp.c367 const struct sock_filter *filter = fp->insns; in bpf_jit_compile()
/linux-4.1.27/Documentation/networking/
Dcdc_mbim.txt241 static struct sock_filter dssfilter[] = {
Dfilter.txt64 struct sock_filter { /* Filter block */
77 struct sock_filter __user *filter;
93 struct sock_filter code[] = {
/linux-4.1.27/arch/arm/net/
Dbpf_jit_32.c484 const struct sock_filter *inst; in build_body()
/linux-4.1.27/lib/
Dtest_bpf.c68 struct sock_filter insns[MAX_INSNS];
1861 static int probe_filter_length(struct sock_filter *fp) in probe_filter_length()
/linux-4.1.27/arch/mips/net/
Dbpf_jit.c741 const struct sock_filter *inst; in build_body()