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: <202408150907.5B5C5FCDF@keescook>
Date: Thu, 15 Aug 2024 09:07:41 -0700
From: Kees Cook <kees@...nel.org>
To: Jani Nikula <jani.nikula@...el.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	intel-gfx@...ts.freedesktop.org, Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH v2 2/2] drm: use mem_is_zero() instead of !memchr_inv(s,
 0, n)

On Wed, Aug 14, 2024 at 01:00:35PM +0300, Jani Nikula wrote:
> Use the mem_is_zero() helper where possible.
> 
> Conversion done using cocci:
> 
> | @@
> | expression PTR;
> | expression SIZE;
> | @@
> |
> |   <...
> | (
> | - memchr_inv(PTR, 0, SIZE) == NULL
> | + mem_is_zero(PTR, SIZE)
> | |
> | - !memchr_inv(PTR, 0, SIZE)
> | + mem_is_zero(PTR, SIZE)
> | |
> | - memchr_inv(PTR, 0, SIZE)
> | + !mem_is_zero(PTR, SIZE)
> | )
> |   ...>
> 
> Signed-off-by: Jani Nikula <jani.nikula@...el.com>

Thanks for these patches! Since drm is the first user, feel free to
carry it there unless you'd prefer I carry it in my trees?

Reviewed-by: Kees Cook <kees@...nel.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ