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]
Message-ID: <20250827155223.GA10519@horms.kernel.org>
Date: Wed, 27 Aug 2025 16:52:23 +0100
From: Simon Horman <horms@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com, andrew+netdev@...n.ch,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
	dhowells@...hat.com, kees@...nel.org, gustavoars@...nel.org,
	aleksander.lobakin@...el.com, tstruk@...aio.com
Subject: Re: [PATCH net-next v2] uapi: wrap compiler_types.h in an ifdef
 instead of the implicit strip

On Mon, Aug 25, 2025 at 01:18:28PM -0700, Jakub Kicinski wrote:
> The uAPI stddef header includes compiler_types.h, a kernel-only
> header, to make sure that kernel definitions of annotations
> like __counted_by() take precedence.
> 
> There is a hack in scripts/headers_install.sh which strips includes
> of compiler.h and compiler_types.h when installing uAPI headers.
> While explicit handling makes sense for compiler.h, which is included
> all over the uAPI, compiler_types.h is only included by stddef.h
> (within the uAPI, obviously it's included in kernel code a lot).
> 
> Remove the stripping from scripts/headers_install.sh and wrap
> the include of compiler_types.h in #ifdef __KERNEL__ instead.
> This should be equivalent functionally, but is easier to understand
> to a casual reader of the code. It also makes it easier to work
> with kernel headers directly from under tools/
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> v2:
>  - remove the hack from scripts/headers_install.sh
>  - wrap in __KERNEL__ instead of removing
> v1: https://lore.kernel.org/20250818181848.799566-1-kuba@kernel.org

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ