remarkable-linux/drivers
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
..
accessibility
acpi ACPI / video: Add use_native_backlight quirk for HP ProBook 4540s 2014-07-16 14:16:30 +02:00
amba
ata libata: introduce ata_host->n_tags to avoid oops on SAS controllers 2014-07-23 10:30:34 -04:00
atm
auxdisplay
base platform_get_irq: Revert to platform_get_resource if of_irq_get fails 2014-07-11 18:06:36 -07:00
bcma bcma: add support for BCM43217 found in Tenda W322E (14e4:43a9) 2014-07-18 13:45:24 -04:00
block zram: avoid lockdep splat by revalidate_disk 2014-07-23 15:10:54 -07:00
bluetooth Bluetooth: Add support for Broadcom device of Asus Z97-DELUXE motherboard 2014-07-21 15:07:08 +03:00
bus
cdrom
char Fix a BUG splat found by trinity. 2014-07-18 20:26:46 -10:00
clk This batch of fixes is for a handful of clock drivers from Allwinner, 2014-07-13 12:21:04 -07:00
clocksource
connector
cpufreq cpufreq: move policy kobj to policy->cpu at resume 2014-07-17 14:23:22 +02:00
cpuidle
crypto crypto: caam - fix memleak in caam_jr module 2014-07-10 16:59:13 +08:00
dca
devfreq
dio
dma
edac
eisa
extcon
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-30 13:25:49 -07:00
firmware efi: fdt: Do not report an error during boot if UEFI is not available 2014-07-10 11:02:48 +01:00
fmc
gpio Pin control fixes for v3.16: 2014-07-23 17:42:37 -07:00
gpu drm/radeon: fix cut and paste issue for hawaii. 2014-07-25 09:17:35 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-07-07 13:13:03 -07:00
hsi net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
hv Drivers: hv: hv_fcopy: fix a race condition for SMP guest 2014-07-17 18:43:10 -07:00
hwmon hwmon: (smsc47m192) Fix temperature limit and vrm write operations 2014-07-24 06:25:25 -07:00
hwspinlock
i2c
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2014-07-21 22:44:24 -07:00
idle
iio iio: mma8452: Use correct acceleration units. 2014-07-12 13:18:55 +01:00
infiniband mlx5: Adjust events to use unsigned long param instead of void * 2014-07-30 14:00:06 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-07-23 15:42:53 -07:00
iommu iommu/fsl: Fix the error condition during iommu group 2014-07-07 10:30:02 +02:00
ipack
irqchip irqchip: gic: Fix core ID calculation when topology is read from DT 2014-07-18 13:13:41 +00:00
isdn net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
leds
lguest
macintosh
mailbox
mcb
md Fix the dm-thinp and dm-cache targets to disallow changing the data 2014-07-18 06:25:05 -10:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-22 00:44:59 -07:00
memory
memstick
message
mfd
misc net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
mmc
mtd Two UBI fastmap-related fixes for v3.16: 2014-07-18 06:23:34 -10:00
net net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
nfc
ntb
nubus
of of: Add memory limiting function for flattened devicetrees 2014-07-29 21:26:45 -06:00
oprofile
parisc
parport parport: fix menu breakage 2014-07-25 18:00:23 -07:00
pci
pcmcia
phy USB fixes for 3.16-rc5 2014-07-12 14:13:10 -07:00
pinctrl pinctrl: st: Fix irqmux handler 2014-07-15 20:55:15 +02:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
regulator
remoteproc
reset
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-22 00:44:59 -07:00
sbus
scsi libcxgbi:cxgb4i Guard ipv6 code with a config check 2014-07-20 00:45:54 -07:00
sfi
sh
sn
soc
spi
spmi
ssb ssb: extract power info from SPROM revs 4 and 5 2014-07-18 13:45:24 -04:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-22 00:44:59 -07:00
target
tc
thermal
tty Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-16 14:09:34 -07:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-22 00:44:59 -07:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen Fix BUG when trying to expand the grant table. This seems to occur 2014-07-30 09:00:20 -07:00
zorro
Kconfig
Makefile