[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ed6o7gsr.fsf@intel.com>
Date: Fri, 16 Aug 2024 16:12:20 +0300
From: Jani Nikula <jani.nikula@...el.com>
To: Kees Cook <kees@...nel.org>
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 Thu, 15 Aug 2024, Kees Cook <kees@...nel.org> wrote:
> 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>
Thanks for the reviews. I've gone ahead and merged both to
drm-misc-next, heading for the next merge window.
BR,
Jani.
--
Jani Nikula, Intel
Powered by blists - more mailing lists