Lines Matching defs:fprog
665 * @fprog: BPF program to install
669 static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog)
680 if (fprog->len == 0 || fprog->len > BPF_MAXINSNS)
683 BUG_ON(INT_MAX / fprog->len < sizeof(struct sock_filter));
701 ret = bpf_prog_create_from_user(&sfilter->prog, fprog,
724 struct sock_fprog fprog;
732 fprog.len = fprog32.len;
733 fprog.filter = compat_ptr(fprog32.filter);
736 if (copy_from_user(&fprog, user_filter, sizeof(fprog)))
738 filter = seccomp_prepare_filter(&fprog);
766 * @fprog: The BPF programs
770 static bool seccomp_is_const_allow(struct sock_fprog_kern *fprog,
777 if (WARN_ON_ONCE(!fprog))
784 for (pc = 0; pc < fprog->len; pc++) {
785 struct sock_filter *insn = &fprog->filter[pc];
851 struct sock_fprog_kern *fprog = sfilter->prog->orig_prog;
872 if (seccomp_is_const_allow(fprog, &sd))
2215 struct sock_fprog_kern *fprog;
2227 fprog = filter->prog->orig_prog;
2228 if (!fprog) {
2237 ret = fprog->len;
2241 if (copy_to_user(data, fprog->filter, bpf_classic_proglen(fprog)))