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: <20251118204313.GI2441659@ZenIV>
Date: Tue, 18 Nov 2025 20:43:13 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Bart Van Assche <bvanassche@....org>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	ksummit@...ts.linux.dev, Dan Williams <dan.j.williams@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: Clarifying confusion of our variable placement rules caused by
 cleanup.h

On Tue, Nov 18, 2025 at 11:14:21AM -0800, Linus Torvalds wrote:

> It's not exactly uncommon to have code like this:
> 
>     struct xyz *abc = kzalloc(sizeof(struct xyz), GPF_KERNEL);
> 
> and I don't think there's any actual *value* in stating that "struct
> xyz" twice (or in stating the sizeof()).

Depends...  "Need to find all places where we have struct xyz instances
allocated" does happen on code audit; making it harder to find...

Pet peeve: I really wish we had a decent way to say that pointers to
this particular type are _not_ to be converted without an explicit
(and searchable) cast...   Tricks like wrapping pointer into a struct
do work to an extent, but not when you need to dereference it in a lot
of places ;-/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ