linux-stable/arch
Alexei Starovoitov 5226bb3b95 bpf: fix bpf_tail_call() x64 JIT
[ upstream commit 90caccdd8c ]

- bpf prog_array just like all other types of bpf array accepts 32-bit index.
  Clarify that in the comment.
- fix x64 JIT of bpf_tail_call which was incorrectly loading 8 instead of 4 bytes
- tighten corresponding check in the interpreter to stay consistent

The JIT bug can be triggered after introduction of BPF_F_NUMA_NODE flag
in commit 96eabe7a40 in 4.14. Before that the map_flags would stay zero and
though JIT code is wrong it will check bounds correctly.
Hence two fixes tags. All other JITs don't have this problem.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Fixes: 96eabe7a40 ("bpf: Allow selecting numa node during map creation")
Fixes: b52f00e6a7 ("x86: bpf_jit: implement bpf_tail_call() helper")
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 12:55:56 +01:00
..
alpha alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ 2017-09-07 08:35:40 +02:00
arc ARC: uaccess: dont use "l" gcc inline asm constraint modifier 2018-01-10 09:29:53 +01:00
arm KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2 2018-01-31 12:55:51 +01:00
arm64 arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls 2018-01-23 19:57:09 +01:00
avr32
blackfin pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:07:32 +01:00
c6x
cris
frv mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
h8300
hexagon
ia64
m32r
m68k m68k: fix ColdFire node shift size calculation 2017-12-09 22:01:48 +01:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 15:44:46 +02:00
microblaze
mips MIPS: AR7: ensure the port type's FCR value is used 2018-01-23 19:57:10 +01:00
mn10300 mn10300: fix build error of missing fpu_save() 2017-06-17 06:41:56 +02:00
nios2 nios2: reserve boot memory for device tree 2017-04-12 12:41:14 +02:00
openrisc openrisc: fix issue handling 8 byte get_user calls 2017-12-20 10:07:22 +01:00
parisc parisc: qemu idle sleep support 2018-01-10 09:29:54 +01:00
powerpc powerpc/perf: Dereference BHRB entries safely 2017-12-29 17:43:00 +01:00
s390 kernel: make groups_sort calling a responsibility group_info allocators 2018-01-10 09:29:52 +01:00
score
sh serial: sh-sci: Fix register offsets for the IRDA serial port 2017-11-15 15:53:14 +01:00
sparc sparc32: Export vac_cache_size to fix build error 2017-12-25 14:23:47 +01:00
tile mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
um um: link vmlinux with -no-pie 2018-01-31 12:55:53 +01:00
unicore32
x86 bpf: fix bpf_tail_call() x64 JIT 2018-01-31 12:55:56 +01:00
xtensa xtensa: don't limit csum_partial export by CONFIG_NET 2017-08-16 13:43:16 -07:00
.gitignore
Kconfig