linux/arch/s390
Alexei Starovoitov 7ae457c1e5 net: filter: split 'struct sk_filter' into socket and bpf parts
clean up names related to socket filtering and bpf in the following way:
- everything that deals with sockets keeps 'sk_*' prefix
- everything that is pure BPF is changed to 'bpf_*' prefix

split 'struct sk_filter' into
struct sk_filter {
	atomic_t        refcnt;
	struct rcu_head rcu;
	struct bpf_prog *prog;
};
and
struct bpf_prog {
        u32                     jited:1,
                                len:31;
        struct sock_fprog_kern  *orig_prog;
        unsigned int            (*bpf_func)(const struct sk_buff *skb,
                                            const struct bpf_insn *filter);
        union {
                struct sock_filter      insns[0];
                struct bpf_insn         insnsi[0];
                struct work_struct      work;
        };
};
so that 'struct bpf_prog' can be used independent of sockets and cleans up
'unattached' bpf use cases

split SK_RUN_FILTER macro into:
    SK_RUN_FILTER to be used with 'struct sk_filter *' and
    BPF_PROG_RUN to be used with 'struct bpf_prog *'

__sk_filter_release(struct sk_filter *) gains
__bpf_prog_release(struct bpf_prog *) helper function

also perform related renames for the functions that work
with 'struct bpf_prog *', since they're on the same lines:

sk_filter_size -> bpf_prog_size
sk_filter_select_runtime -> bpf_prog_select_runtime
sk_filter_free -> bpf_prog_free
sk_unattached_filter_create -> bpf_prog_create
sk_unattached_filter_destroy -> bpf_prog_destroy
sk_store_orig_filter -> bpf_prog_store_orig_filter
sk_release_orig_filter -> bpf_release_orig_filter
__sk_migrate_filter -> bpf_migrate_filter
__sk_prepare_filter -> bpf_prepare_filter

API for attaching classic BPF to a socket stays the same:
sk_attach_filter(prog, struct sock *)/sk_detach_filter(struct sock *)
and SK_RUN_FILTER(struct sk_filter *, ctx) to execute a program
which is used by sockets, tun, af_packet

API for 'unattached' BPF programs becomes:
bpf_prog_create(struct bpf_prog **)/bpf_prog_destroy(struct bpf_prog *)
and BPF_PROG_RUN(struct bpf_prog *, ctx) to execute a program
which is used by isdn, ppp, team, seccomp, ptp, xt_bpf, cls_bpf, test_bpf

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-02 15:03:58 -07:00
..
appldata s390/appldata: add slab.h for kzalloc/kfree 2014-05-20 08:58:51 +02:00
boot s390/boot: fix boot of compressed kernel built with gcc 4.9 2014-05-27 10:26:04 +02:00
configs s390: update default configuration 2014-06-11 10:13:30 +02:00
crypto crypto: s390 - fix aes,des ctr mode concurrency finding. 2014-05-08 21:46:09 +08:00
hypfs hypfs: Add clarification for "weight_min" attribute 2014-03-17 15:53:03 +01:00
include s390: fix restore of invalid floating-point-control 2014-07-16 10:48:12 +02:00
kernel s390/ptrace: fix PSW mask check 2014-07-16 10:48:11 +02:00
kvm At over 200 commits, covering almost all supported architectures, this 2014-06-04 08:47:12 -07:00
lib s390/spinlock: refactor arch_spin_lock_wait[_flags] 2014-05-20 08:58:55 +02:00
math-emu s390: fix save and restore of the floating-point-control register 2013-10-24 17:17:11 +02:00
mm hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
net net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
oprofile s390/oprofile: make return of 0 explicit 2014-05-27 10:26:00 +02:00
pci s390/MSI: Use standard mask and unmask funtions 2014-07-16 10:48:10 +02:00
defconfig s390: update default configuration 2014-06-11 10:13:30 +02:00
Kbuild s390/pci: base support 2012-11-30 15:40:45 +01:00
Kconfig s390/dump: Remove CONFIG_ZFCPDUMP 2014-05-20 08:58:43 +02:00
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile s390: allow to set gcc -mtune flag 2013-10-31 09:54:01 +01:00