lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250530092507.GC21197@noisy.programming.kicks-ass.net>
Date: Fri, 30 May 2025 11:25:07 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Kees Cook <kees@...nel.org>
Cc: Alessandro Carminati <acarmina@...hat.com>,
	linux-kselftest@...r.kernel.org,
	Dan Carpenter <dan.carpenter@...aro.org>,
	Daniel Diaz <daniel.diaz@...aro.org>,
	David Gow <davidgow@...gle.com>,
	Arthur Grillo <arthurgrillo@...eup.net>,
	Brendan Higgins <brendan.higgins@...ux.dev>,
	Naresh Kamboju <naresh.kamboju@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Maxime Ripard <mripard@...nel.org>,
	Ville Syrjala <ville.syrjala@...ux.intel.com>,
	Daniel Vetter <daniel@...ll.ch>, Guenter Roeck <linux@...ck-us.net>,
	Alessandro Carminati <alessandro.carminati@...il.com>,
	Jani Nikula <jani.nikula@...el.com>,
	Jeff Johnson <jeff.johnson@....qualcomm.com>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Shuah Khan <skhan@...uxfoundation.org>,
	Linux Kernel Functional Testing <lkft@...aro.org>,
	dri-devel@...ts.freedesktop.org, kunit-dev@...glegroups.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/5] bug/kunit: Core support for suppressing warning
 backtraces

On Thu, May 29, 2025 at 10:46:15AM -0700, Kees Cook wrote:

> Doing it on the other end doesn't look great (see the other reply).  I was
> suggesting it's not on fast path because the added code is a dependant
> conditional following an "unlikley" conditional. But if you wanted to
> push it totally out of line, we'd likely need to pass __func__ into
> warn_slowpath_fmt() and __warn_printk(), and then have __warn_printk()

warn_slowpath_fmt() already uses buildin_return_address(0), and then it
can use kallsyms to find the symbol name. No need to pass __func__ as a
string.

> return bool to make the call to __WARN_FLAGS() conditional. e.g.:
> 
> -		warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \
> +		warn_slowpath_fmt(__FILE__, __LINE__, __func__, taint, arg); \
> 
> and:
> 
> -		__warn_printk(arg);					\
> -		__WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
> +		if (__warn_printk(__func__, arg))			\
> +			__WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
> 
> But it still leaves bare __WARN unhandled...

Nah, don't propagate, just eat the __WARN and handle things in
__report_bug(), which is where they all end up.

But the real purpose here seems to be to supress printk output, so why
not use 'suppress_printk' ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ