Re: [PATCH v4 06/14] x86: Add support for suppressing warning backtraces

Peter Zijlstra
2025-04-02T07:49:42Z

On Tue, Apr 01, 2025 at 10:53:46AM -0700, Guenter Roeck wrote:

> > > @@ -92,7 +102,8 @@ do { \
> > > do { \
> > > __auto_type __flags = BUGFLAG_WARNING|(flags); \
> > > instrumentation_begin(); \
> > > - _BUG_FLAGS(ASM_UD2, __flags, ANNOTATE_REACHABLE(1b)); \
> > > + if (!KUNIT_IS_SUPPRESSED_WARNING(__func__)) \
> > > + _BUG_FLAGS(ASM_UD2, __flags, ANNOTATE_REACHABLE(1b)); \
> > > instrumentation_end(); \
> > > } while (0)
> >
> > NAK, this grows the BUG site for now appreciable reason.
>
> Only if CONFIG_KUNIT_SUPPRESS_BACKTRACE is enabled. Why does that warrant a NACK ?

And isn't that something distros will want enabled? All I'm seeing is
bloating every single UD2 site, and no real justification. As Josh said,
this should be done on the other side of the trap if at all.