remarkable-linux/arch/mn10300
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 MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
include net: sock: allow eBPF programs to be attached to sockets 2014-12-05 21:47:32 -08:00
kernel mn10300: Use sigsp() 2014-08-06 13:04:31 +02:00
lib Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
mm arch,mn10300: Convert smp_mb__*() 2014-04-18 14:20:39 +02:00
oprofile MN10300: Kill MN10300's own profiling Kconfig 2009-04-09 10:53:16 -07:00
proc-mn2ws0050 Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
proc-mn103e010 MN10300: Create general kernel debugger cache flushing 2011-03-18 16:54:30 +00:00
unit-asb2303 mn10300: move setup_jiffies_interrupt() to cevt-mn10300.c 2012-07-11 16:04:41 -07:00
unit-asb2305 PCI: Turn pcibios_penalize_isa_irq() into a weak function 2014-05-27 16:23:58 -06:00
unit-asb2364 mn10300: Remove deprecated IRQF_DISABLED 2014-03-04 21:47:51 +01:00
Kconfig Remove MN10300_PROC_MN2WS0038 2014-09-26 11:15:18 +02:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile mn10300: Remove redundant debugging info flag 2014-01-28 10:57:06 +01:00