Re: [RFC PATCH 1/5] bug: Core support for suppressing warning backtraces

2024-03-05 Thread Guenter Roeck
On 3/5/24 11:54, Kees Cook wrote: On Tue, Mar 05, 2024 at 10:40:29AM -0800, Guenter Roeck wrote: [...] warning = (bug->flags & BUGFLAG_WARNING) != 0; once = (bug->flags & BUGFLAG_ONCE) != 0; done = (bug->flags & BUGFLAG_DONE) != 0; + if (warning && IS_SUPPRESSED_WARNIN

Re: [RFC PATCH 1/5] bug: Core support for suppressing warning backtraces

2024-03-05 Thread Kees Cook
On Tue, Mar 05, 2024 at 10:40:29AM -0800, Guenter Roeck wrote: > [...] > warning = (bug->flags & BUGFLAG_WARNING) != 0; > once = (bug->flags & BUGFLAG_ONCE) != 0; > done = (bug->flags & BUGFLAG_DONE) != 0; > > + if (warning && IS_SUPPRESSED_WARNING(function)) > +

[RFC PATCH 1/5] bug: Core support for suppressing warning backtraces

2024-03-05 Thread Guenter Roeck
Some unit tests intentionally trigger warning backtraces by passing bad parameters to API functions. Such unit tests typically check the return value from those calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desirable nor useful for a