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.c1131 const struct sock_fprog *fprog) in bpf_prog_store_orig_filter() argument
1133 unsigned int fsize = bpf_classic_proglen(fprog); in bpf_prog_store_orig_filter()
1141 fkprog->len = fprog->len; in bpf_prog_store_orig_filter()
1155 struct sock_fprog_kern *fprog = fp->orig_prog; in bpf_release_orig_filter() local
1157 if (fprog) { in bpf_release_orig_filter()
1158 kfree(fprog->filter); in bpf_release_orig_filter()
1159 kfree(fprog); in bpf_release_orig_filter()
1359 int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog) in bpf_prog_create() argument
1361 unsigned int fsize = bpf_classic_proglen(fprog); in bpf_prog_create()
1365 if (!bpf_check_basics_ok(fprog->filter, fprog->len)) in bpf_prog_create()
[all …]
Dsock.c1165 struct sock_fprog fprog; in sock_setsockopt() local
1167 ret = copy_bpf_fprog_from_user(&fprog, optval, optlen); in sock_setsockopt()
1169 ret = sk_attach_filter(&fprog, sk); in sock_setsockopt()
1186 struct sock_fprog fprog; in sock_setsockopt() local
1188 ret = copy_bpf_fprog_from_user(&fprog, optval, optlen); in sock_setsockopt()
1190 ret = sk_reuseport_attach_filter(&fprog, sk); in sock_setsockopt()
/net/packet/
Daf_packet.c1559 struct sock_fprog fprog; in fanout_set_data_cbpf() local
1565 ret = copy_bpf_fprog_from_user(&fprog, data, len); in fanout_set_data_cbpf()
1569 ret = bpf_prog_create_from_user(&new, &fprog, NULL, false); in fanout_set_data_cbpf()