linux_dsm_epyc7002/tools/include/uapi/linux
Joe Stringer f71c6143c2 bpf: Support sk lookup in netns with id 0
David Ahern and Nicolas Dichtel report that the handling of the netns id
0 is incorrect for the BPF socket lookup helpers: rather than finding
the netns with id 0, it is resolving to the current netns. This renders
the netns_id 0 inaccessible.

To fix this, adjust the API for the netns to treat all negative s32
values as a lookup in the current netns (including u64 values which when
truncated to s32 become negative), while any values with a positive
value in the signed 32-bit integer space would result in a lookup for a
socket in the netns corresponding to that id. As before, if the netns
with that ID does not exist, no socket will be found. Any netns outside
of these ranges will fail to find a corresponding socket, as those
values are reserved for future usage.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Joey Pabalinas <joeypabalinas@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-11-30 17:17:38 -08:00
..
tc_act tools/bpftool: copy a few net uapi headers to tools directory 2018-11-09 08:18:31 +01:00
bpf_common.h bpf: Sync kernel ABI header with tooling header for bpf_common.h 2018-02-09 00:24:38 +01:00
bpf_perf_event.h selftests/bpf: sync kernel headers and introduce arch support in Makefile 2017-12-05 15:02:41 +01:00
bpf.h bpf: Support sk lookup in netns with id 0 2018-11-30 17:17:38 -08:00
btf.h bpf: btf: Sync uapi btf.h to tools 2018-07-25 06:57:55 +02:00
erspan.h tools, include: Grab a copy of linux/erspan.h 2018-04-30 17:56:24 +02:00
fcntl.h tools/headers: Synchronize kernel ABI headers 2017-11-04 09:27:46 +01:00
fs.h tools include uapi: Update linux/fs.h copy 2018-10-31 09:57:51 -03:00
hw_breakpoint.h tools/headers: Synchronize kernel ABI headers 2017-11-04 09:27:46 +01:00
if_link.h tools headers uapi: Update linux/if_link.h header copy 2018-10-31 09:57:54 -03:00
in.h tools include uapi: Grab a copy of linux/in.h 2018-07-31 10:52:37 -03:00
kcmp.h tools headers: Synchronize kernel ABI headers wrt SPDX tags 2017-11-28 14:29:20 -03:00
kvm.h tools headers: Sync the various kvm.h header copies 2018-10-31 09:57:53 -03:00
lirc.h bpf: add selftest for lirc_mode2 type program 2018-05-30 12:40:14 +02:00
mman.h tools include uapi: Update linux/mmap.h copy 2018-10-31 09:57:53 -03:00
netlink.h tools headers uapi: Update linux/netlink.h header copy 2018-10-31 09:57:54 -03:00
perf_event.h perf tools: Don't clone maps from parent when synthesizing forks 2018-10-31 10:18:01 -03:00
pkt_cls.h tools/bpftool: copy a few net uapi headers to tools directory 2018-11-09 08:18:31 +01:00
prctl.h docs: Fix some broken references 2018-06-15 18:10:01 -03:00
sched.h tools headers: Synchronize uapi/linux/sched.h 2018-02-02 17:17:13 -03:00
seg6_local.h selftests/bpf: missing headers test_lwt_seg6local 2018-05-28 17:41:00 +02:00
seg6.h selftests/bpf: missing headers test_lwt_seg6local 2018-05-28 17:41:00 +02:00
stat.h tools/headers: Synchronize kernel ABI headers 2017-11-04 09:27:46 +01:00
tls.h bpf, tls: add tls header to tools infrastructure 2018-10-16 08:10:01 -07:00
vhost.h tools headers uapi: Update tools's copy of linux/vhost.h 2018-09-11 13:12:40 -03:00