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: Thu, 1 Feb 2024 10:08:22 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org,
	Tanzir Hasan <tanzhasanwork@...il.com>,
	Kees Cook <keescook@...gle.com>
Subject: Re: [PATCH 00/28] Fast kernel headers: reduce header dependencies

On Wed, Jan 31, 2024 at 11:00:27PM +0100, Max Kellermann wrote:
> On Wed, Jan 31, 2024 at 10:44 PM Randy Dunlap <rdunlap@...radead.org> wrote:
> > How were these (a) missing and (b) unnecessary includes
> > found or determined?
> > Did you use some tool for that? If so, which one?
> 
> No tool, just stgit to edit the patches (in arbitrary order). I
> reduced header dependencies, but got lots of build errors because
> symbols were missing in different sources, which were previously
> fulfilled by indirect includes that were now removed. I fixed all
> those build errors by adding missing includes to those headers, moving
> those changes to the first patch.
> 
> I found the unnecessary includes manually along the way by using "git
> grep" to find all include directives for a certain header; I checked
> the source for the reason why this header was included, and whether
> the include could be replaced with "X_types.h" instead. Sometimes, I
> found that not even "X_types.h" was necessary, but no include at all,
> so I removed the include completely and had those changes in the
> second patch.
> 
> The first two patches grew along the way. It was refreshed over and
> over (with stgit), while I was editing the other patches.
> 
> I know there's the "iwyu" tool, and it may be helpful eventually, but
> there's so much low-hanging fruit in the kernel, iwyu is not useful
> yet I think.

We just wrapped up an internship where Tanzir was looking into getting IWYU
working on the kernel.  He presented about it at Linux Plumbers Conf '23
recently.

https://youtu.be/eFq_oqLiXPM?si=0VhuMnwjHnMPJeaR
https://youtu.be/XMVLSEzbpQ8?si=_2DQpS7JBlEC4FK1
https://github.com/ClangBuiltLinux/IWYUScripts
https://lore.kernel.org/lkml/?q=f%3Atanzirh%40google.com

Some of his patches have landed, others had requests from maintainers that
weren't reasonable to satisfy in the short duration of an internship. But still
worth pursuing. Happy to chat more about the general problem sometime.

> 
> Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ