bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: bpf@vger.kernel.org, "Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	"Martin KaFai Lau" <kafai@fb.com>,
	"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Maxim Mikityanskiy" <maximmi@nvidia.com>,
	"Pablo Neira Ayuso" <pablo@netfilter.org>,
	"Florian Westphal" <fw@strlen.de>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests
Date: Thu, 26 May 2022 10:45:35 +0530	[thread overview]
Message-ID: <20220526051227.bqoejq7kyymfxba4@apollo.legion> (raw)
In-Reply-To: <Yo7Wc2xGyuq/1tq1@d3>

On Thu, May 26, 2022 at 06:52:59AM IST, Benjamin Poirier wrote:
> On 2022-01-14 22:09 +0530, Kumar Kartikeya Dwivedi wrote:
> > Use the prog_test kfuncs to test the referenced PTR_TO_BTF_ID kfunc
> > support, and PTR_TO_CTX, PTR_TO_MEM argument passing support. Also
> > testing the various failure cases for invalid kfunc prototypes.
> >
> > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> > ---
> >  net/bpf/test_run.c                            | 129 +++++++++++++++++-
> >  .../selftests/bpf/prog_tests/kfunc_call.c     |   6 +
> >  .../selftests/bpf/progs/kfunc_call_test.c     |  52 ++++++-
> >  tools/testing/selftests/bpf/verifier/calls.c  |  75 ++++++++++
> >  4 files changed, 258 insertions(+), 4 deletions(-)
> >
>
> It looks like this patch broke building the bpf tests:
>
> tools/testing/selftests/bpf$ make
>   CLNG-BPF [test_maps] kfunc_call_test.o
> progs/kfunc_call_test.c:13:46: error: declaration of 'struct prog_test_pass1' will not be visible outside of this function [-Werror,-Wvisibility]
> extern void bpf_kfunc_call_test_pass1(struct prog_test_pass1 *p) __ksym;
>                                              ^
>
> The only definition of struct prog_test_pass1 that I see is in
> net/bpf/test_run.c. How is this supposed to work?
>
>
> commit 87091063df5d ("selftests/bpf: Add test for unstable CT lookup
> API") from the same series added a similar problem in
> progs/test_bpf_nf.c:
>
> progs/test_bpf_nf.c:31:21: error: variable has incomplete type 'struct bpf_ct_opts'
>         struct bpf_ct_opts opts_def = { .l4proto = IPPROTO_TCP, .netns_id = -1 };
>

Both of them should have their definition in vmlinux.h. Can you check? Also for
BPF selftests we require conntrack to be built into the kernel, instead of as a
module.

--
Kartikeya

  reply	other threads:[~2022-05-26  5:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 16:39 [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 01/10] bpf: Fix UAF due to race between btf_try_get_module and load_module Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 02/10] bpf: Populate kfunc BTF ID sets in struct btf Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 03/10] bpf: Remove check_kfunc_call callback and old kfunc BTF ID API Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 04/10] bpf: Introduce mem, size argument pair support for kfunc Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 05/10] bpf: Add reference tracking support to kfunc Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 06/10] net/netfilter: Add unstable CT lookup helpers for XDP and TC-BPF Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 07/10] selftests/bpf: Add test for unstable CT lookup API Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 08/10] selftests/bpf: Add test_verifier support to fixup kfunc call insns Kumar Kartikeya Dwivedi
2022-01-14 16:39 ` [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests Kumar Kartikeya Dwivedi
2022-05-26  1:22   ` Benjamin Poirier
2022-05-26  5:15     ` Kumar Kartikeya Dwivedi [this message]
2022-05-26  6:19       ` Benjamin Poirier
2022-01-14 16:39 ` [PATCH bpf-next v8 10/10] selftests/bpf: Add test for race in btf_try_get_module Kumar Kartikeya Dwivedi
2022-01-18 22:52   ` Alexei Starovoitov
2022-02-18 20:19 ` [PATCH bpf-next v8 00/10] Introduce unstable CT lookup helpers Alexander Egorenkov
2022-02-18 22:20   ` Kumar Kartikeya Dwivedi
2022-02-19  7:39     ` Alexander Egorenkov
2022-02-19  8:20       ` Kumar Kartikeya Dwivedi
2022-02-20  1:13       ` Andrii Nakryiko

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=20220526051227.bqoejq7kyymfxba4@apollo.legion \
    --to=memxor@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=benjamin.poirier@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=fw@strlen.de \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=maximmi@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).