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] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Jun 2024 13:54:41 -0700
From: John Hubbard <jhubbard@...dia.com>
To: David Hildenbrand <david@...hat.com>, Andrew Morton
	<akpm@...ux-foundation.org>, Jeff Xu <jeffxu@...omium.org>, Shuah Khan
	<shuah@...nel.org>
CC: Andrei Vagin <avagin@...gle.com>, Axel Rasmussen
	<axelrasmussen@...gle.com>, Christian Brauner <brauner@...nel.org>, Kees Cook
	<kees@...nel.org>, Kent Overstreet <kent.overstreet@...ux.dev>, "Liam R .
 Howlett" <Liam.Howlett@...cle.com>, Muhammad Usama Anjum
	<usama.anjum@...labora.com>, Peter Xu <peterx@...hat.com>, Rich Felker
	<dalias@...c.org>, <linux-mm@...ck.org>, <linux-kselftest@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/5] cleanups, fixes, and progress towards avoiding "make
 headers"

On 6/11/24 2:36 AM, David Hildenbrand wrote:
> On 08.06.24 04:10, John Hubbard wrote:
>> Eventually, once the build succeeds on a sufficiently old distro, the
>> idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then
>> after that, from selftests/lib.mk and all of the other selftest builds.
>>
>> For now, this series merely achieves a clean build of selftests/mm on a
>> not-so-old distro: Ubuntu 23.04:
> 
> Wasn't the plan to rely on the tools/include headers, and pull in there whatever we need?

Yes, it is. You are correct.

> 
>>
>> 1. Add __NR_mseal.
>>
> 
> For example, making sure that tools/include/uapi/asm-generic/unistd.h is updated to contain __NR_mseal?

Well, here it gets less clear cut, because the selftests pull in *lots* of
system headers. In this case /usr/include/unistd.h gets pulled in. If we
force tools/include/uapi/asm-generic/unistd.h to be included, then we'll
get many many warnings of redefinitions of __NR_* items.

So what's really going on here is that we have this uneasy mix of system
headers from the test machine, and newer versions of some of those headers
in the kernel tree. And some of those are easier to combine with system
headers, than others. unistd.h is clearly not going quietly, which is
why, I believe, the "#ifndef __NR_* " approach has flowered in the
selftests.

> 
> ... to avoid hand-crafted defines we have to maintain for selftests.
> 
> But maybe I am remembering something outdated.
> 

You remembered correctly, but the situation is slighly muddier than
one would prefer. :)


thanks,
-- 
John Hubbard
NVIDIA


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ