The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Alexei Starovoitov 13fac1d851 bpf: Fix trampoline generation for fmod_ret programs
fmod_ret progs are emitted as:

start = __bpf_prog_enter();
call fmod_ret
*(u64 *)(rbp - 8) = rax
__bpf_prog_exit(, start);
test eax, eax
jne do_fexit

That 'test eax, eax' is working by accident. The compiler is free to use rax
inside __bpf_prog_exit() or inside functions that __bpf_prog_exit() is calling.
Which caused "test_progs -t modify_return" to sporadically fail depending on
compiler version and kconfig. Fix it by using 'cmp [rbp - 8], 0' instead of
'test eax, eax'.

Fixes: ae24082331 ("bpf: Introduce BPF_MODIFY_RETURN")
Reported-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: KP Singh <kpsingh@google.com>
Link: https://lore.kernel.org/bpf/20200311003906.3643037-1-ast@kernel.org
2020-03-11 14:07:32 +01:00
Documentation bpf, doc: Add BPF JIT for RV32G to BPF documentation 2020-03-05 16:13:47 +01:00
LICENSES
arch bpf: Fix trampoline generation for fmod_ret programs 2020-03-11 14:07:32 +01:00
block
certs
crypto
drivers mvneta: add XDP ethtool errors stats for TX to driver 2020-03-02 11:29:37 -08:00
fs
include bpf: Add bpf_link_new_file that doesn't install FD 2020-03-11 14:02:48 +01:00
init
ipc
kernel bpf: Add bpf_link_new_file that doesn't install FD 2020-03-11 14:02:48 +01:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-02-29 15:53:35 -08:00
mm
net bpf: sockmap: Add UDP support 2020-03-09 22:34:58 +01:00
samples
scripts kbuild: Remove debug info from kallsyms linking 2020-03-04 18:36:33 +01:00
security
sound
tools bpftool: Fix typo in bash-completion 2020-03-10 00:04:21 +01:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS bpf, doc: Update maintainers for L7 BPF 2020-03-09 22:34:59 +01:00
Makefile
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.