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: <CAADnVQKBg0ESvDRvs_cHHrwLrpkar9bAZ9JJRnxUwe4zfGym6w@mail.gmail.com>
Date: Sun, 30 Mar 2025 14:49:25 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: bpf <bpf@...r.kernel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...nel.org>, 
	Andrew Morton <akpm@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>, 
	Vlastimil Babka <vbabka@...e.cz>, Sebastian Sewior <bigeasy@...utronix.de>, 
	Steven Rostedt <rostedt@...dmis.org>, Michal Hocko <mhocko@...e.com>, 
	Shakeel Butt <shakeel.butt@...ux.dev>, linux-mm <linux-mm@...ck.org>, 
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] Introduce try_alloc_pages for 6.15

On Sun, Mar 30, 2025 at 1:56 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> But I do think that the lock name needs fixing.
>
> "localtry_lock_t" is not a good name, and spreading that odd
> "localtry" into the actual (non-try) locking functions makes the
> naming actively insane.
>
> If the *only* operation you could do on the lock was "trylock", then
> "localtry" would be fine. Then the lock literally is a "only try"
> thing. But as it is, the naming now ends up actively broken.
>
> Honestly, the lock name should probably reflect the fact that it can
> be used from any context (with a "trylock"), not about the trylock
> part itself.
>
> So maybe "nmisafe_local_lock_t" or something in that vein?
>
> Please fix this up, There aren't *that* many users of
> "localtry_xyzzy", let's get this fixed before there are more of them.

Ok. Agree with the reasoning that the name doesn't quite fit.

nmisafe_local_lock_t name works for me,
though nmisafe_local_lock_irqsave() is a bit verbose.

Don't have better name suggestions at the moment.

Sebastian, Vlastimil,
what do you prefer ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ