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 [...]