[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdki0aUFLOgEhDxtHdHk_6x7WZdt3k2rSCxTB5hkPfKYWw@mail.gmail.com>
Date: Tue, 5 Dec 2023 13:57:38 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>, tanzirh@...gle.com,
Kees Cook <keescook@...omium.org>,
Andy Shevchenko <andy@...nel.org>,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
Nick DeSaulniers <nnn@...gle.com>, llvm@...ts.linux.dev
Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU
On Tue, Dec 5, 2023 at 1:44 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> On Tue, Dec 05, 2023 at 01:39:47PM -0800, Nick Desaulniers wrote:
>
> > The tooling Tanzir is working on does wrap IWYU, and does support such
> > mapping (of 'low level' to 'high level' headers; more so, if it
> > recommends X you can override to suggest Y instead).
> >
> > arch/nios/ also doesn't provide a bug.h, which this patch is
> > suggesting we include directly. I guess the same goes for
> > asm/rwonce.h.
>
> See include/asm-generic/Kbuild:
> mandatory-y += bug.h
> ...
> mandatory-y += rwonce.h
>
> IOW, sh will have asm/bug.h and as/rwonce.h copied from asm-generic.
Ah, right, Ard had mentioned this file to me once. And mandatory-y is
documented in Documentation/kbuild/makefiles.rst.
Ok, so we can use include/asm-generic/Kbuild to know that if the .h
files listed there are recommended to include as asm/*.h, then we
should replace that recommendation with linux/*.h. Our tooling has
something where we can automate that.
>
> Still, includes of asm/*.h had been a massive headache historically
> and breeding more of those shouldn't be overdone.
>
> More painful problem is arch- and config-dependent stuff, though...
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists