From: Klaus Jensen <its@irrelevant.dk>
To: Christoph Hellwig <hch@lst.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH 4/4] nvme: check that EUI/GUID/UUID are globally unique
Date: Mon, 11 Apr 2022 08:01:51 +0200 [thread overview]
Message-ID: <YlPET+kw4EVWfPRy@apples> (raw)
In-Reply-To: <20220411055455.GA14480@lst.de>
[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]
On Apr 11 07:54, Christoph Hellwig wrote:
> On Mon, Apr 11, 2022 at 07:05:33AM +0200, Christoph Hellwig wrote:
> > > However, what I'm seeing seems to show that the uuid is same uuid as
> > > well when not using -device nvme-ns but just -device nvme (this is
> > > called legacy now it seems?) without the uuid set you end up in the
> > > situation I described. I just destroyed my guests and started from
> > > scratch a set up using qemu-system-x86_64 v6.2.0 on debian-testing,
> > > and end up in a different situation but it is still a bit perplexing.
> >
> > With my usual qemu test setup (built from a git a few weeks ago), no
> > uuid shows up unless explicitly set.
>
> Digging a bit deeper this was "fixed" by:
>
> 5f4884c4412318a1adc105dea9cc28f7625ce730
> Author: Klaus Jensen <k.jensen@samsung.com>
> Date: Mon Aug 9 12:34:40 2021 +0200
>
> hw/nvme: fix missing variable initializers
>
> Coverity found that 'uuid', 'csi' and 'eui64' are uninitialized.
> While we set most of the fields, we do not explicitly set the rsvd2
> field in the NvmeIdNsDescr header.
>
> Fix this by explicitly zero-initializing the variables.
>
> Note that even with the fix the uuid field is always reported, even
> when it shouldn't - it just is that Linux handles a 0 UUID gracefully.
>
Right.
> I can also not find any code that would assign a different uuid
> when using a different command line syntax, but given how unusable
> the new syntax is I've not actually been able to try it.
>
Are you referring to -device nvme-ns "syntax"? Using -device nvme, you
cannot set uuid.
> So I think for now we'll just need to disable identifier on qemu.
>
> It would be great if qemu could switch to a new PCI ID after this is
> fixed as that simplifies the quirking.
Luckily we can do that easier now since we moved away from the Intel id
(which got rid of a bunch of quirks at that time).
I'll see what we can come up with to fix this properly in QEMU.
Thanks for looking into it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-04-11 6:02 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 19:28 properly validate the nvme uniqueue identifiers are unique v2 Christoph Hellwig
2022-02-24 19:28 ` [PATCH 1/4] nvme: cleanup __nvme_check_ids Christoph Hellwig
2022-02-24 22:50 ` Chaitanya Kulkarni
2022-02-24 19:28 ` [PATCH 2/4] nvme: fix the check for duplicate unique identifiers Christoph Hellwig
2022-02-24 22:51 ` Chaitanya Kulkarni
2022-02-24 19:28 ` [PATCH 3/4] nvme: check for duplicate identifiers earlier Christoph Hellwig
2022-02-24 22:52 ` Chaitanya Kulkarni
2022-02-24 19:28 ` [PATCH 4/4] nvme: check that EUI/GUID/UUID are globally unique Christoph Hellwig
2022-02-24 22:54 ` Chaitanya Kulkarni
2022-04-08 1:04 ` Luis Chamberlain
2022-04-08 5:29 ` Christoph Hellwig
2022-04-08 7:19 ` Klaus Jensen
2022-04-08 16:10 ` Christoph Hellwig
2022-04-08 17:46 ` Luis Chamberlain
2022-04-11 5:05 ` Christoph Hellwig
2022-04-11 5:54 ` Christoph Hellwig
2022-04-11 6:01 ` Klaus Jensen [this message]
2022-04-11 6:09 ` Christoph Hellwig
2022-04-11 6:11 ` Klaus Jensen
2022-04-12 18:46 ` Luis Chamberlain
2022-04-18 23:30 ` Alan Adamson
2022-04-20 7:36 ` Christoph Hellwig
2022-06-06 20:35 ` Alan Adamson
2022-06-06 21:38 ` Keith Busch
2022-06-06 21:51 ` Alan Adamson
2022-06-06 21:58 ` Keith Busch
2022-06-06 23:11 ` Alan Adamson
2022-06-07 19:01 ` Keith Busch
2022-06-08 7:48 ` Christoph Hellwig
2022-06-08 7:52 ` Christoph Hellwig
2022-06-08 18:11 ` Alan Adamson
2022-06-08 19:04 ` Keith Busch
2022-06-09 0:30 ` Chaitanya Kulkarni
2022-06-09 15:11 ` Alan Adamson
2022-06-09 3:53 ` Christoph Hellwig
2022-06-10 0:27 ` Alan Adamson
2022-06-10 14:12 ` Keith Busch
2022-06-15 20:15 ` Alan Adamson
2022-06-17 9:01 ` Christoph Hellwig
2022-06-21 18:40 ` Alan Adamson
2022-06-21 19:11 ` Keith Busch
2022-06-21 20:39 ` Alan Adamson
2022-06-22 11:00 ` Christoph Hellwig
2022-06-22 15:45 ` Alan Adamson
2022-02-24 19:38 ` properly validate the nvme uniqueue identifiers are unique v2 Keith Busch
-- strict thread matches above, loose matches on Subject: below --
2022-06-05 1:58 [PATCH 4/4] nvme: check that EUI/GUID/UUID are globally unique Stefan
2022-06-06 6:40 ` Christoph Hellwig
2022-06-06 12:42 ` Stefan
2022-06-06 15:03 ` Christoph Hellwig
2022-06-06 14:51 ` Keith Busch
2022-06-06 15:06 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YlPET+kw4EVWfPRy@apples \
--to=its@irrelevant.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mcgrof@kernel.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.