Re: [PATCH] kbuild: add -fdiagnostics-show-inlining-chain for FORTIFY_SOURCE
From: Justin Stitt
Date: Mon Mar 30 2026 - 20:18:00 EST
Hi,
On Mon, Mar 30, 2026 at 11:56 AM Kees Cook <kees@xxxxxxxxxx> wrote:
>
> On Mon, Mar 30, 2026 at 07:36:04AM +0200, Nathan Chancellor wrote:
> > On Sun, Mar 29, 2026 at 08:59:51PM -0700, Kees Cook wrote:
> > > On Fri, Mar 27, 2026 at 03:29:18PM -0700, Justin Stitt wrote:
> > > > On Fri, Mar 27, 2026 at 3:18 PM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> > > > The compile time impact is not measurable (within expected noise). The
> > > > peak memory usage may increase by somewhere in the 0.5% to 1.5% range
> > > > depending on build configuration.
> > > >
> > > > I bundled this under fortify to limit initial impact as its had
> > > > virtually no real-world testing and may produce unhelpful diagnostic
> > > > notes under its heuristic mode. I don't expect folks to use `-g1` in
> > > > the kernel (which would enable full-proof diagnostic notes).
> > > >
> > > > > If not, maybe worth adding a Kconfig option that is force selected by FORTIFY_SOURCE with
> > > > > clang or can be optionally enabled by a user?
> > > >
> > > > I'll defer to you on this one. We could add
> > > > CONFIG_SHOW_INLINING_CHAIN_NOTES or something similar?
> > >
> > > I would prefer to just unconditionally enable this when it is supported.
> >
> > Agreed. It cannot possibly be worse than the status quo, right? :) This
> > feels very similar to -fdiagnostics-show-context=2, so maybe add it near
> > there?
>
> Yeah, similar. That'd be a good place for it. :)
Thanks both of you for the suggestion:
Here's [v2] :)
>
> --
> Kees Cook
[v2]: https://lore.kernel.org/all/20260330-kbuild-show-inlining-v2-1-c0c481a4ea7b@xxxxxxxxxx/
Justin