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: <CAHp75Ve0vyOv3KNY_7286wLKd8u6HOvu0Trm17rs46h-BOGsfA@mail.gmail.com>
Date: Mon, 27 May 2024 16:19:35 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jani Nikula <jani.nikula@...el.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	intel-gfx@...ts.freedesktop.org, Kees Cook <keescook@...omium.org>, 
	Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH 2/2] drm: use mem_is_zero() instead of !memchr_inv(s, 0, n)

On Mon, May 27, 2024 at 12:43 PM Jani Nikula <jani.nikula@...el.com> wrote:
>
> Use the mem_is_zero() helper where possible.

..

> -       if (memchr_inv(guid, 0, 16) == NULL) {
> +       if (mem_is_zero(guid, 16)) {
>                 tmp64 = get_jiffies_64();
>                 memcpy(&guid[0], &tmp64, sizeof(u64));
>                 memcpy(&guid[8], &tmp64, sizeof(u64));

What is the type of guid? Shouldn't it be guid_t with the respective
guid_is_null()

..

> -       if (memchr_inv(guid, 0, 16))
> +       if (!mem_is_zero(guid, 16))
>                 return true;

Ditto.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ