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: <20231129015705.54zmp3xpqxfmo2fx@moria.home.lan>
Date: Tue, 28 Nov 2023 20:57:05 -0500
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Laight <David.Laight@...LAB.COM>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Thomas Graf <tgraf@...g.ch>,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH] rhashtable: Better error message on allocation failure

On Tue, Nov 28, 2023 at 05:35:36PM -0800, Jakub Kicinski wrote:
> On Sat, 25 Nov 2023 15:23:49 +0000 David Laight wrote:
> > > +	new_tbl = bucket_table_alloc(ht, size, GFP_KERNEL|__GFP_NOWARN);
> > > +	if (new_tbl == NULL) {
> > > +		WARN("rhashtable bucket table allocation failure for %ps",  
> > 
> > Won't WARN() be a panic on systems with PANICK_ON_WARN set?
> 
> Yes, that's problematic :(
> Let's leave out the GFP_NOWARN and add a pr_warn() instead of
> the WARN()?

pr_warn() instead of WARN() is fine, but the stack trace from
warn_alloc() will be entirely useless.

Perhaps if we had a GFP flag to just suppress the backtrace in
warn_alloc() - we could even stash a backtrace in the rhashtable at
rhashtable_init() time, if we want to print out a more useful one.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ