Home
last modified time | relevance | path

Searched refs:fprog (Results 1 – 4 of 4) sorted by relevance

/net/core/
Dsock_diag.c74 struct sock_fprog_kern *fprog; in sock_diag_put_filterinfo() local
90 fprog = filter->prog->orig_prog; in sock_diag_put_filterinfo()
91 if (!fprog) in sock_diag_put_filterinfo()
94 flen = bpf_classic_proglen(fprog); in sock_diag_put_filterinfo()
102 memcpy(nla_data(attr), fprog->filter, flen); in sock_diag_put_filterinfo()
Dfilter.c1130 const struct sock_fprog *fprog) in bpf_prog_store_orig_filter() argument
1132 unsigned int fsize = bpf_classic_proglen(fprog); in bpf_prog_store_orig_filter()
1140 fkprog->len = fprog->len; in bpf_prog_store_orig_filter()
1154 struct sock_fprog_kern *fprog = fp->orig_prog; in bpf_release_orig_filter() local
1156 if (fprog) { in bpf_release_orig_filter()
1157 kfree(fprog->filter); in bpf_release_orig_filter()
1158 kfree(fprog); in bpf_release_orig_filter()
1358 int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog) in bpf_prog_create() argument
1360 unsigned int fsize = bpf_classic_proglen(fprog); in bpf_prog_create()
1364 if (!bpf_check_basics_ok(fprog->filter, fprog->len)) in bpf_prog_create()
[all …]
Dsock.c1066 struct sock_fprog fprog; in sock_setsockopt() local
1068 ret = copy_bpf_fprog_from_user(&fprog, optval, optlen); in sock_setsockopt()
1070 ret = sk_attach_filter(&fprog, sk); in sock_setsockopt()
1087 struct sock_fprog fprog; in sock_setsockopt() local
1089 ret = copy_bpf_fprog_from_user(&fprog, optval, optlen); in sock_setsockopt()
1091 ret = sk_reuseport_attach_filter(&fprog, sk); in sock_setsockopt()
/net/packet/
Daf_packet.c1557 struct sock_fprog fprog; in fanout_set_data_cbpf() local
1563 ret = copy_bpf_fprog_from_user(&fprog, data, len); in fanout_set_data_cbpf()
1567 ret = bpf_prog_create_from_user(&new, &fprog, NULL, false); in fanout_set_data_cbpf()