Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: <paulmck@kernel.org>, Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: <davem@davemloft.net>, <daniel@iogearbox.net>,
	<netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<kernel-team@fb.com>
Subject: Re: [PATCH v2 bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.
Date: Mon, 31 Aug 2020 09:19:49 -0700	[thread overview]
Message-ID: <0f277bc8-9dca-aca8-c7c3-af2991282588@fb.com> (raw)
In-Reply-To: <20200831161552.GA2855@paulmck-ThinkPad-P72>

On 8/31/20 9:15 AM, Paul E. McKenney wrote:
> On Mon, Aug 31, 2020 at 08:51:55AM -0700, Alexei Starovoitov wrote:
>> From: Alexei Starovoitov <ast@kernel.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@intel.com>
>> Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs")
>> Acked-by: Paul E. McKenney <paulmck@kernel.org>
>> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> 
> Looks good, and unless someone tells me otherwise, I am assuming that
> this one goes up the normal BPF patch route.

Yes. It fixes the issue in bpf-next tree.

  reply	other threads:[~2020-08-31 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 15:51 Alexei Starovoitov
2020-08-31 16:15 ` Paul E. McKenney
2020-08-31 16:19   ` Alexei Starovoitov [this message]
2020-08-31 20:07 ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f277bc8-9dca-aca8-c7c3-af2991282588@fb.com \
    --to=ast@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --subject='Re: [PATCH v2 bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).