lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 31 Aug 2020 22:07:28 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        davem@...emloft.net
Cc:     paulmck@...nel.org, netdev@...r.kernel.org, bpf@...r.kernel.org,
        kernel-team@...com
Subject: Re: [PATCH v2 bpf-next] bpf: Fix build without BPF_SYSCALL, but with
 BPF_JIT.

On 8/31/20 5:51 PM, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@...nel.org>
> 
> When CONFIG_BPF_SYSCALL is not set, but CONFIG_BPF_JIT=y
> the kernel build fails:
> In file included from ../kernel/bpf/trampoline.c:11:
> ../kernel/bpf/trampoline.c: In function ‘bpf_trampoline_update’:
> ../kernel/bpf/trampoline.c:220:39: error: ‘call_rcu_tasks_trace’ undeclared
> ../kernel/bpf/trampoline.c: In function ‘__bpf_prog_enter_sleepable’:
> ../kernel/bpf/trampoline.c:411:2: error: implicit declaration of function ‘rcu_read_lock_trace’
> ../kernel/bpf/trampoline.c: In function ‘__bpf_prog_exit_sleepable’:
> ../kernel/bpf/trampoline.c:416:2: error: implicit declaration of function ‘rcu_read_unlock_trace’
> 
> This is due to:
> obj-$(CONFIG_BPF_JIT) += trampoline.o
> obj-$(CONFIG_BPF_JIT) += dispatcher.o
> There is a number of functions that arch/x86/net/bpf_jit_comp.c is
> using from these two files, but none of them will be used when
> only cBPF is on (which is the case for BPF_SYSCALL=n BPF_JIT=y).
> 
> Add rcu_trace functions to rcupdate_trace.h. The JITed code won't execute them
> and BPF trampoline logic won't be used without BPF_SYSCALL.
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs")
> Acked-by: Paul E. McKenney <paulmck@...nel.org>
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>

Applied, thanks!

Powered by blists - more mailing lists