remarkable-linux/arch/xtensa
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 xtensa: xtfpga: add lx200 SMP DTS and defconfig 2014-10-21 13:28:43 +04:00
configs xtensa: xtfpga: add lx200 SMP DTS and defconfig 2014-10-21 13:28:43 +04:00
include net: sock: allow eBPF programs to be attached to sockets 2014-12-05 21:47:32 -08:00
kernel Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
lib xtensa: clean up files to make them code-style compliant 2012-12-18 21:10:25 -08:00
mm xtensa: support highmem in aliasing cache flushing code 2014-08-14 11:59:23 +04:00
oprofile xtensa: fix oprofile building as module 2013-05-09 01:07:09 -07:00
platforms xtensa: ISS: don't depend on CONFIG_TTY 2014-05-05 09:04:10 -07:00
variants xtensa: fsf: drop nonexistent GPIO32 support 2014-02-21 21:33:40 +04:00
Kconfig xtensa: xtfpga: only select ethoc when ethernet is available 2014-10-06 03:23:53 +04:00
Kconfig.debug xtensa: check TLB sanity on return to userspace 2013-07-08 01:18:56 -07:00
Makefile xtensa: simplify addition of new core variants 2014-08-14 11:59:08 +04:00