Go to file
Stanislav Fomichev df1a2cb7c7 bpf/test_run: fix unkillable BPF_PROG_TEST_RUN
Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0xffffffff
makes process unkillable. The problem is that when CONFIG_PREEMPT is
enabled, we never see need_resched() return true. This is due to the
fact that preempt_enable() (which we do in bpf_test_run_one on each
iteration) now handles resched if it's needed.

Let's disable preemption for the whole run, not per test. In this case
we can properly see whether resched is needed.
Let's also properly return -EINTR to the userspace in case of a signal
interrupt.

See recent discussion:
http://lore.kernel.org/netdev/CAH3MdRWHr4N8jei8jxDppXjmw-Nw=puNDLbu1dQOFQHxfU2onA@mail.gmail.com

I'll follow up with the same fix bpf_prog_test_run_flow_dissector in
bpf-next.

Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-02-19 00:17:03 +01:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-02-16 22:34:07 -08:00
block for-linus-20190215 2019-02-15 09:12:28 -08:00
certs
crypto net: crypto set sk to NULL when af_alg_release. 2019-02-18 12:01:24 -08:00
Documentation doc: Mention MSG_ZEROCOPY implementation for UDP 2019-02-17 15:30:02 -08:00
drivers net/mlx4_en: fix spelling mistake: "quiting" -> "quitting" 2019-02-18 12:06:42 -08:00
firmware
fs Revert "exec: load_script: don't blindly truncate shebang string" 2019-02-14 15:02:18 -08:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-02-16 22:34:07 -08:00
init Revert "mm: use early_pfn_to_nid in page_ext_init" 2019-02-12 16:33:18 -08:00
ipc
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-02-16 22:34:07 -08:00
lib
LICENSES
mm mm: Use fixed constant in page_frag_alloc instead of size + 1 2019-02-17 15:48:43 -08:00
net bpf/test_run: fix unkillable BPF_PROG_TEST_RUN 2019-02-19 00:17:03 +01:00
samples
scripts
security
sound sound fixes for 5.0-rc7 2019-02-12 10:18:08 -08:00
tools Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 08:00:11 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS sound fixes for 5.0-rc7 2019-02-12 10:18:08 -08:00
Makefile
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.