lists.openwall.net   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 <usama.anjum@...labora.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>, jeffxu@...omium.org,
 akpm@...ux-foundation.org, keescook@...omium.org, jannh@...gle.com,
 sroettger@...gle.com, willy@...radead.org, gregkh@...uxfoundation.org,
 torvalds@...ux-foundation.org, jeffxu@...gle.com, jorgelo@...omium.org,
 groeck@...omium.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, linux-mm@...ck.org, surenb@...gle.com,
 alex.sierra@....com, apopple@...dia.com, aneesh.kumar@...ux.ibm.com,
 axelrasmussen@...gle.com, ben@...adent.org.uk, catalin.marinas@....com,
 david@...hat.com, dwmw@...zon.co.uk, ying.huang@...el.com, hughd@...gle.com,
 joey.gouly@....com, corbet@....net, wangkefeng.wang@...wei.com,
 Liam.Howlett@...cle.com, lstoakes@...il.com, mawupeng1@...wei.com,
 linmiaohe@...wei.com, namit@...are.com, peterx@...hat.com,
 ryan.roberts@....com, shr@...kernel.io, vbabka@...e.cz,
 xiujianfeng@...wei.com, yu.ma@...el.com, zhangpeng362@...wei.com,
 dave.hansen@...el.com, luto@...nel.org, linux-hardening@...r.kernel.org
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
history:

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.


-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists