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] [day] [month] [year] [list]
Message-ID: <aUT1SCTniYr7PA07@kernel.org>
Date: Fri, 19 Dec 2025 08:48:40 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mm_init: Replace simple_strtoul with kstrtobool in
 set_hashdist

On Wed, Dec 17, 2025 at 12:02:13PM +0100, Thorsten Blum wrote:
> Use bool for 'hashdist' and replace simple_strtoul() with kstrtobool()
> for parsing the 'hashdist=' boot parameter. Unlike simple_strtoul(),
> which returns an unsigned long, kstrtobool() converts the string
> directly to bool and avoids implicit casting.
> 
> Check the return value of kstrtobool() and reject invalid values. This
> adds error handling while preserving behavior for existing values, and
> removes use of the deprecated simple_strtoul() helper. The current code
> silently sets 'hashdist = 0' if parsing fails, instead of leaving the
> default value (HASHDIST_DEFAULT) unchanged.
> 
> Additionally, kstrtobool() accepts common boolean strings such as "on"
> and "off".
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@...nel.org>

> ---
>  include/linux/memblock.h | 4 ++--
>  mm/mm_init.c             | 9 +++------
>  2 files changed, 5 insertions(+), 8 deletions(-)

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ