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]
Date: Sun, 9 Jun 2024 14:03:41 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Leesoo Ahn <lsahn@...eel.net>
Cc: Leesoo Ahn <lsahn@...akecorp.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...nel.org>
Subject: Re: [PATCH] mm: sparse: clarify a variable name and its value

On Sun,  9 Jun 2024 00:21:14 +0900 Leesoo Ahn <lsahn@...eel.net> wrote:

> Setting 'limit' variable to 0 might seem like it means "no limit". But
> in the memblock API, 0 actually means the 'MEMBLOCK_ALLOC_ACCESSIBLE'
> enum, which limits the physical address range based on
> 'memblock.current_limit'. This can be confusing.

Does it?  From my reading, this meaning applies to the range end
address, in memblock_find_in_range_node()?  If your interpretation is
correct, this should be documented in the relevant memblock kerneldoc.

> To make things clearer, I suggest renaming the variable to
> 'limit_or_flag'. This name shows that the variable can either be a
> number for limits or an enum for a flag. This way, readers will easily
> understand what kind of value is being passed to the memblock API and
> how it works without needing to look into the API details.
> 

I think I'll cc Mike and run away ;)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ