linux/arch/avr32
Alexei Starovoitov 89aa075832 net: sock: allow eBPF programs to be attached to sockets
introduce new setsockopt() command:

setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd, sizeof(prog_fd))

where prog_fd was received from syscall bpf(BPF_PROG_LOAD, attr, ...)
and attr->prog_type == BPF_PROG_TYPE_SOCKET_FILTER

setsockopt() calls bpf_prog_get() which increments refcnt of the program,
so it doesn't get unloaded while socket is using the program.

The same eBPF program can be attached to multiple sockets.

User task exit automatically closes socket which calls sk_filter_uncharge()
which decrements refcnt of eBPF program

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-05 21:47:32 -08:00
..
boards ARM: SoC driver changes for 3.17 2014-08-08 11:34:32 -07:00
boot avr32: fix out-of-range jump in large kernels 2013-11-20 09:53:21 +01:00
configs avr32: update defconfig to use the generic PWM framework 2014-07-09 15:13:34 +02:00
include net: sock: allow eBPF programs to be attached to sockets 2014-12-05 21:47:32 -08:00
kernel avr32: Replace __get_cpu_var with __this_cpu_write 2014-08-26 13:45:55 -04:00
lib ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
mach-at32ap dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces 2014-09-11 11:48:12 +05:30
mm arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using 2014-03-31 08:41:52 +02:00
oprofile oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
Kconfig Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
Kconfig.debug [AVR32] Include instrumentation menu 2008-01-25 08:31:40 +01:00
Makefile avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use 2014-02-17 11:24:43 +01:00