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: <CAKPOu+8QQnMaZG33wyR1EzoifHD5kjSmjf2FQ9Y9gGdYN9dgJw@mail.gmail.com>
Date: Wed, 31 Jan 2024 23:00:27 +0100
From: Max Kellermann <max.kellermann@...os.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/28] Fast kernel headers: reduce header dependencies

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.

Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ