lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 20 Oct 2023 21:33:23 +0500
From: Muhammad Usama Anjum <>
To: Peter Zijlstra <>
Cc: Muhammad Usama Anjum <>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Subject: Re: [RFC PATCH v2 8/8] selftest mm/mseal mprotect/munmap/mremap/mmap

On 10/20/23 8:23 PM, Peter Zijlstra wrote:
> On Fri, Oct 20, 2023 at 07:24:03PM +0500, Muhammad Usama Anjum wrote:
>> Please remove these. These macros would be picked up from the kernel
>> headers automatically.
> As per the previous discussions, how does that work if you have O= build
> directories?
Then headers should be prepared in that O= directory first.
make headers O=abc && make -C tools/testing/selftests O=abc

> I find this push to force people to do 'make headers' in order to use
> simple selftests quite misguided. You're making it *harder* to use,
> leading to less use.
I'm just following what we have been doing over selftests mailing list to
fix build issues in different use cases and kselfest.rst. Let me share the

Around 2 years ago, selftest Makefile used to prepare kernel headers from
source automatically and include them to build selftests. It had several
bugs. So they separated the header preparation from selftest build. After a
while people started getting build failures because they weren't building
headers which were previously built automatically. So someone had written a
patch (already in v6.6-rc6) to show informative error if headers aren't
present. So now selftests can't be built until headers are built.

The understanding here is that selftests come with kernel source and they
should be built using in-source kernel headers as people don't always have
updated headers. I think, if someone want to build just one selftest
without doing make headers, he should install kernel headers from source
before doing so instead of adding duplicate defines in the test itself. It
helps while development to not to keep the duplicate copy of these macros
in selftest as well.

Muhammad Usama Anjum

Powered by blists - more mailing lists