linux-sg2042/arch/powerpc
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
..
boot Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-10-11 20:34:00 -04:00
configs netpoll: delete defconfig references to obsolete NETPOLL_TRAP 2014-11-29 21:13:48 -08:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include net: sock: allow eBPF programs to be attached to sockets 2014-12-05 21:47:32 -08:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-11-27 18:23:41 -08:00
kvm Fixes and features for 3.18. 2014-10-08 05:27:39 -04:00
lib powerpc: Implement emulation of string loads and stores 2014-09-25 23:14:52 +10:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc: Fix section mismatch warning 2014-10-30 11:22:33 +11:00
net PPC: bpf_jit_comp: Unify BPF_MOD | BPF_X and BPF_DIV | BPF_X 2014-11-18 13:20:09 -05:00
oprofile powerpc: Ensure global functions include their prototype 2014-09-25 23:14:42 +10:00
perf perf: Fix and clean up initialization of pmu::event_idx 2014-10-28 10:51:01 +01:00
platforms Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-11-27 18:23:41 -08:00
sysdev powerpc/fsl_msi: mark the msi cascade handler IRQF_NO_THREAD 2014-11-17 22:00:30 -06:00
xmon powerpc/pseries: Fix endiannes issue in RTAS call from xmon 2014-11-27 09:32:57 +11:00
Kconfig powerpc/cell: Move spu_handle_mm_fault() out of cell platform 2014-10-08 20:14:54 +11:00
Kconfig.debug Patch queue for ppc - 2014-08-01 2014-08-05 09:58:11 +02:00
Makefile powerpc: Add POWER8 CPU selection 2014-09-25 23:14:49 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00