linux-stable/arch/x86
Hou Tao 356ed64991 bpf: Handle return value of BPF_PROG_TYPE_STRUCT_OPS prog
Currently if a function ptr in struct_ops has a return value, its
caller will get a random return value from it, because the return
value of related BPF_PROG_TYPE_STRUCT_OPS prog is just dropped.

So adding a new flag BPF_TRAMP_F_RET_FENTRY_RET to tell bpf trampoline
to save and return the return value of struct_ops prog if ret_size of
the function ptr is greater than 0. Also restricting the flag to be
used alone.

Fixes: 85d33df357 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210914023351.3664499-1-houtao1@huawei.com
2021-09-14 11:09:50 -07:00
..
boot Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
configs
crypto crypto: aesni - xts_crypt() return if walk.nbytes is 0 2021-08-27 16:30:19 +08:00
entry Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
events perf/x86/amd/ibs: Add bitfield definitions in new <asm/amd-ibs.h> header 2021-08-26 09:14:36 +02:00
hyperv x86/hyperv: fix root partition faults when writing to VP assist page MSR 2021-08-04 11:56:53 +00:00
ia32 binfmt: remove in-tree usage of MAP_DENYWRITE 2021-09-03 18:42:01 +02:00
include ARM: 2021-09-07 13:40:51 -07:00
kernel ARM: 2021-09-07 13:40:51 -07:00
kvm ARM: 2021-09-07 13:40:51 -07:00
lib x86: Add support for 0x22/0x23 port I/O configuration space 2021-08-10 23:31:43 +02:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
net bpf: Handle return value of BPF_PROG_TYPE_STRUCT_OPS prog 2021-09-14 11:09:50 -07:00
pci x86: Avoid magic number with ELCR register accesses 2021-08-10 23:31:43 +02:00
platform EFI changes: two driver API cleanups, and a log message tweak. 2021-06-28 11:34:16 -07:00
power x86/power: Fix kernel-doc warnings in cpu.c 2021-08-12 10:15:40 +02:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
tools - Remove cc-option checks which are old and already supported by the 2021-08-30 13:27:16 -07:00
um
video
xen xen: remove stray preempt_disable() from PV AP startup code 2021-09-01 10:39:27 +02:00
.gitignore
Kbuild
Kconfig Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu x86: remove cc-option-yn test for -mtune= 2021-09-03 08:17:20 +09:00