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:   Mon, 12 Jun 2017 12:50:55 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Johannes Thumshirn <jthumshirn@...e.de>
Cc:     Christoph Hellwig <hch@....de>,
        Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] nvme: use uuid_t in nvme_ns

On Mon, Jun 12, 2017 at 12:12 PM, Johannes Thumshirn <jthumshirn@...e.de> wrote:
> struct nvme_ns still uses u u8 uuid[16], change it to using uuid_t and
> use the UUID API.

Thanks for an update.

See my further comments below.

>                         len = NVME_NIDT_UUID_LEN;
> -                       memcpy(ns->uuid, data + pos + sizeof(*cur), len);
> +                       uuid_copy(&ns->uuid, data + pos + sizeof(*cur));

So, this reveals two thins:
1) shall we define NVME_NIDT_UUID_LEN to be UUID_LEN or substitute it
completely with the latter?
2) Is the len variable used later in the function?

> -               if (!memchr_inv(ns->uuid, 0, sizeof(ns->uuid)) ||
> +               if (uuid_is_null(&ns->uuid) ||
>                     !memchr_inv(ns->nguid, 0, sizeof(ns->nguid)))

>         u8 nguid[16];
> -       u8 uuid[16];
> +       uuid_t uuid;

Do you plan to switch nguid to be guid_t / uuid_t ?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ