From: Eduard Zingerman <eddyz87@gmail.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
daniel@iogearbox.net, martin.lau@linux.dev, kernel-team@fb.com,
yonghong.song@linux.dev, mykyta.yatsenko5@gmail.com
Subject: Re: [PATCH bpf-next] selftests/bpf: more precise cpu_mitigations state detection
Date: Tue, 10 Jun 2025 22:31:00 -0700 [thread overview]
Message-ID: <5381e905bb6f782493866a6cf8aa859f2b1e3170.camel@gmail.com> (raw)
In-Reply-To: <CALOAHbDPkbhun3KFXpwTuSKGzOx4PcUBhqDriofMgzwCXxR8_A@mail.gmail.com>
On Wed, 2025-06-11 at 10:54 +0800, Yafang Shao wrote:
[...]
> > + config = gzopen("/proc/config.gz", "rb");
>
> The /proc/config.gz file is not enabled in certain kernel releases.
> Should we also check "/boot/config-$(uname -r)" as an alternative?
>
Oh, my... It's a zoo, on Fedora the config location is:
/usr/lib/modules/$(uname -r)/config
Tbh, I was fixing a problem with tests execution in a specific
environment. Adding a list of common locations for config is an
option.
Another option I tried but discarded is [1], where
kernel/cpu.c:cpu_mitigations variable is read directly by a BPF
program. But this is probably too heavy-handed.
[1] https://github.com/eddyz87/bpf/tree/better-unpriv-disabled-detector
[...]
next prev parent reply other threads:[~2025-06-11 5:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 21:52 [PATCH bpf-next] selftests/bpf: more precise cpu_mitigations state detection Eduard Zingerman
2025-06-11 2:54 ` Yafang Shao
2025-06-11 5:31 ` Eduard Zingerman [this message]
2025-06-11 5:49 ` Yafang Shao
2025-06-12 21:19 ` 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=5381e905bb6f782493866a6cf8aa859f2b1e3170.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=laoar.shao@gmail.com \
--cc=martin.lau@linux.dev \
--cc=mykyta.yatsenko5@gmail.com \
--cc=yonghong.song@linux.dev \
/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