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, 5 Dec 2023 21:57:29 +0000
From: Al Viro <>
Cc: Kees Cook <>, Andy Shevchenko <>,,,
	Nick DeSaulniers <>,
	Andrew Morton <>,
Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU

On Tue, Dec 05, 2023 at 09:38:07PM +0000, Al Viro wrote:

> It also breeds includes of asm/*.h, by the look of the output, which is
> not a good thing in general ;-/  E.g. #include <asm/uaccess.h> *anywhere*
> outside of linux/uaccess.h is a bad idea.

Let me elaborate a bit:

Consider e.g. a situation when we have linux/foo.h pulling asm/foo.h;
among the things declared there is foo_bar(), which is identical in
18 instances of asm/foo.h (out of current 21).

At some point we notice that; the obvious approach would be to have
3 unusual architectures have their asm/foo.h define _ARCH_HAS_ODD_FOO_BAR
and put the common variant in linux/foo.h under ifndef _ARCH_HAS_ODD_FOO_BAR.

Except that any file that pulls asm/foo.h will get broken by that.
And something like your tool might convert the users of linux/foo.h to
asm/foo.h - all it takes is using only the primitives that currently
happen to be in asm/foo.h on all architectures.

This is not an artifical example, BTW - look at the history of uaccess.h and

Powered by blists - more mailing lists