Re: [PATCH] kbuild: add -fdiagnostics-show-inlining-chain for FORTIFY_SOURCE
From: Nathan Chancellor
Date: Mon Mar 30 2026 - 01:40:30 EST
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?
Cheers,
Nathan