BPF List
 help / color / mirror / Atom feed
From: sdf@google.com
To: "Daniel Müller" <deso@posteo.net>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>, Mykola Lysenko <mykolal@fb.com>
Subject: Re: [PATCH bpf-next 1/3] selftests/bpf: Copy over libbpf configs
Date: Tue, 12 Jul 2022 15:33:26 -0700	[thread overview]
Message-ID: <Ys32tgTtkfeECzLc@google.com> (raw)
In-Reply-To: <20220712215322.rw3z6eoix3yagi2q@muellerd-fedora-MJ0AC3F3>

On 07/12, Daniel M�ller wrote:
> On Tue, Jul 12, 2022 at 02:27:47PM -0700, Alexei Starovoitov wrote:
> > On Tue, Jul 12, 2022 at 2:21 PM Daniel M�ller <deso@posteo.net> wrote:
> > >
> > > This change integrates the libbpf maintained configurations and
> > > black/white lists [0] into the repository, co-located with the BPF
> > > selftests themselves. The only differences from the source is that we
> > > replaced the terms blacklist & whitelist with denylist and allowlist,
> > > respectively.
> > >
> > > [0]  
> https://github.com/libbpf/libbpf/tree/20f03302350a4143825cedcbd210c4d7112c1898/travis-ci/vmtest/configs
> > >
> > > Signed-off-by: Daniel M�ller <deso@posteo.net>
> > > ---
> > >  .../bpf/configs/allowlist/ALLOWLIST-4.9.0     |    8 +
> > >  .../bpf/configs/allowlist/ALLOWLIST-5.5.0     |   55 +
> > >  .../selftests/bpf/configs/config-latest.s390x | 2711 +++++++++++++++
> > >  .../bpf/configs/config-latest.x86_64          | 3073  
> +++++++++++++++++
> >
> > Instead of checking in the full config please trim it to
> > relevant dependencies like existing selftests/bpf/config.
> > Otherwise every update/addition would trigger massive patches.

> Thanks for taking a look. Sure. Do we have some kind of tooling for that  
> or are
> there any suggestions on the best approach to minimize?

I would be interested to know as well if somebody knows some tricks on
how to deal with kconfig. I've spent some time yesterday manually
crafting various minimal bpf configs (for build tests), running make
olddefconfig and then verifying that all my options are still present in
the final config file.

It seems like kconfig tool can resolve some of the dependencies,
but there is a lot of if/endif that can break in non-obvious ways.
For example, putting CONFIG_TRACING=y and doing 'make olddefconfig'
won't get you CONFIG_TRACING=y in the final .config

So the only thing, for me, that helped, was to manually go through
the kconfig files trying to see what the dependencies are.
I've tried scripts/kconfig/merge_config.sh, but it doesn't
seem to bring anything new to the table..

So here is what I ended up with, I don't think it will help you that
much, but at least can highlight the moving parts (I was thinking that
maybe we can eventually put them in the CI as well to make sure all weird
configurations are build-tested?):

.config+all:CONFIG_MODULES=y
.config+all:CONFIG_HAVE_EBPF_JIT=y
.config+all:CONFIG_BPF=y
.config+all:CONFIG_BPF_SYSCALL=y
.config+all:CONFIG_BPF_JIT=y
.config+all:CONFIG_BPF_JIT_ALWAYS_ON=y
.config+all:CONFIG_BPF_JIT_DEFAULT_ON=y
.config+all:CONFIG_CGROUPS=y
.config+all:CONFIG_CGROUP_BPF=y
.config+all:CONFIG_SECURITY=y
.config+all:CONFIG_KPROBES=y
.config+all:CONFIG_TRACING=y
.config+all:CONFIG_FTRACE=y
.config+all:CONFIG_BPF_KPROBE_OVERRIDE=y
.config+all:CONFIG_BPF_EVENTS=y
.config+all:CONFIG_BPF_LSM=y
.config+all:CONFIG_NET=y
.config+all:CONFIG_INET=y
.config+all:CONFIG_NET_SCHED=y
.config+all:CONFIG_NET_CLS_ACT=y
.config+all:CONFIG_BPF_STREAM_PARSER=y
.config+all:CONFIG_NET_ACT_BPF=y
.config+all:CONFIG_NET_CLS_BPF=y
.config+all:CONFIG_TEST_BPF=y

.config-all:CONFIG_BPFILTER=n
.config-all:CONFIG_BPF=n
.config-all:CONFIG_BPF_JIT=n
.config-all:CONFIG_BPF_SYSCALL=n
.config-all:CONFIG_HAVE_EBPF_JIT=n
.config-all:CONFIG_NET_ACT_BPF=n
.config-all:CONFIG_NET_CLS_BPF=n
.config-all:CONFIG_TEST_BPF=n

.config-net:CONFIG_MODULES=y
.config-net:CONFIG_HAVE_EBPF_JIT=y
.config-net:CONFIG_BPF=y
.config-net:CONFIG_BPF_SYSCALL=y
.config-net:CONFIG_BPF_JIT=y
.config-net:CONFIG_BPF_JIT_ALWAYS_ON=y
.config-net:CONFIG_BPF_JIT_DEFAULT_ON=y
.config-net:CONFIG_CGROUPS=y
.config-net:CONFIG_CGROUP_BPF=y
.config-net:CONFIG_SECURITY=y
.config-net:CONFIG_KPROBES=y
.config-net:CONFIG_TRACING=y
.config-net:CONFIG_FTRACE=y
.config-net:CONFIG_BPF_KPROBE_OVERRIDE=y
.config-net:CONFIG_BPF_EVENTS=y
.config-net:CONFIG_BPF_LSM=y
.config-net:CONFIG_NET=n
.config-net:CONFIG_INET=n
.config-net:CONFIG_NET_SCHED=n
.config-net:CONFIG_NET_CLS_ACT=n
.config-net:CONFIG_BPF_STREAM_PARSER=n
.config-net:CONFIG_NET_ACT_BPF=n
.config-net:CONFIG_NET_CLS_BPF=n
.config-net:CONFIG_TEST_BPF=n

.config-cg-lsm:CONFIG_MODULES=y
.config-cg-lsm:CONFIG_HAVE_EBPF_JIT=y
.config-cg-lsm:CONFIG_BPF=y
.config-cg-lsm:CONFIG_BPF_SYSCALL=y
.config-cg-lsm:CONFIG_BPF_JIT=y
.config-cg-lsm:CONFIG_BPF_JIT_ALWAYS_ON=y
.config-cg-lsm:CONFIG_BPF_JIT_DEFAULT_ON=y
.config-cg-lsm:CONFIG_SECURITY=y
.config-cg-lsm:CONFIG_KPROBES=y
.config-cg-lsm:CONFIG_TRACING=n
.config-cg-lsm:CONFIG_FTRACE=n
.config-cg-lsm:CONFIG_BPF_EVENTS=n
.config-cg-lsm:CONFIG_BPF_LSM=n
.config-cg-lsm:CONFIG_CGROUP_BPF=n

.config+classic:CONFIG_MODULES=y
.config+classic:CONFIG_HAVE_EBPF_JIT=y
.config+classic:CONFIG_BPF=y
.config+classic:CONFIG_BPF_SYSCALL=n
.config+classic:CONFIG_BPF_JIT=y
.config+classic:CONFIG_BPF_JIT_ALWAYS_ON=n
.config+classic:CONFIG_BPF_JIT_DEFAULT_ON=n
.config+classic:CONFIG_SECURITY=n
.config+classic:CONFIG_KPROBES=n
.config+classic:CONFIG_TRACING=n
.config+classic:CONFIG_FTRACE=n
.config+classic:CONFIG_BPF_EVENTS=n
.config+classic:CONFIG_BPF_LSM=n
.config+classic:CONFIG_CGROUP_BPF=n
.config+classic:CONFIG_NET=y
.config+classic:CONFIG_INET=y

.config+syscall:CONFIG_MODULES=y
.config+syscall:CONFIG_HAVE_EBPF_JIT=y
.config+syscall:CONFIG_BPF=y
.config+syscall:CONFIG_BPF_SYSCALL=y
.config+syscall:CONFIG_BPF_JIT=n
.config+syscall:CONFIG_BPF_JIT_ALWAYS_ON=n
.config+syscall:CONFIG_BPF_JIT_DEFAULT_ON=n
.config+syscall:CONFIG_SECURITY=n
.config+syscall:CONFIG_KPROBES=n
.config+syscall:CONFIG_TRACING=n
.config+syscall:CONFIG_FTRACE=n
.config+syscall:CONFIG_BPF_EVENTS=n
.config+syscall:CONFIG_BPF_LSM=n
.config+syscall:CONFIG_CGROUP_BPF=n

.config-cg+lsm:CONFIG_MODULES=y
.config-cg+lsm:CONFIG_HAVE_EBPF_JIT=y
.config-cg+lsm:CONFIG_BPF=y
.config-cg+lsm:CONFIG_BPF_SYSCALL=y
.config-cg+lsm:CONFIG_BPF_JIT=y
.config-cg+lsm:CONFIG_BPF_JIT_ALWAYS_ON=y
.config-cg+lsm:CONFIG_BPF_JIT_DEFAULT_ON=y
.config-cg+lsm:CONFIG_SECURITY=y
.config-cg+lsm:CONFIG_KPROBES=y
.config-cg+lsm:CONFIG_TRACING=y
.config-cg+lsm:CONFIG_FTRACE=y
.config-cg+lsm:CONFIG_BPF_EVENTS=y
.config-cg+lsm:CONFIG_BPF_LSM=y
.config-cg+lsm:CONFIG_CGROUP_BPF=n

  reply	other threads:[~2022-07-12 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 21:21 [PATCH bpf-next 0/3] Maintain selftest configuration in-tree Daniel Müller
2022-07-12 21:21 ` [PATCH bpf-next 2/3] selftests/bpf: Integrate vmtest configs Daniel Müller
2022-07-14  5:07   ` Andrii Nakryiko
2022-07-14 14:04     ` Daniel Müller
2022-07-14 18:51       ` Andrii Nakryiko
2022-07-12 21:21 ` [PATCH bpf-next 3/3] selftests/bpf: Adjust vmtest.sh to use local kernel configuration Daniel Müller
     [not found] ` <20220712212124.3180314-2-deso@posteo.net>
2022-07-12 21:27   ` [PATCH bpf-next 1/3] selftests/bpf: Copy over libbpf configs Alexei Starovoitov
2022-07-12 21:53     ` Daniel Müller
2022-07-12 22:33       ` sdf [this message]
2022-07-12 23:01         ` Daniel Müller
2022-07-14  4:48           ` Andrii Nakryiko
2022-07-14 14:36             ` Daniel Müller
2022-07-14 18:20               ` Andrii Nakryiko
2022-07-14 21:17                 ` Ilya Leoshkevich
2022-07-14 16:43           ` Daniel Müller

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=Ys32tgTtkfeECzLc@google.com \
    --to=sdf@google.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=deso@posteo.net \
    --cc=kernel-team@fb.com \
    --cc=mykolal@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