From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: Guixin Liu <kanie@linux.alibaba.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Hannes Reinecke <hare@suse.de>,
Chaitanya Kulkarni <kch@nvidia.com>,
Kanchan Joshi <joshi.k@samsung.com>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH blktests] nvme/070: add a test for Identify CNS 07h NULL pointer dereference
Date: Mon, 3 Aug 2026 13:14:44 +0900 [thread overview]
Message-ID: <anAUf3S78MSSr-LJ@shinmob> (raw)
In-Reply-To: <6f4a1b76-50f4-45f8-9a56-e6f66637d7e7@linux.ibm.com>
On Aug 01, 2026 / 19:31, Nilay Shroff wrote:
> On 7/31/26 8:56 AM, Guixin Liu wrote:
> > +test() {
> > + echo "Running ${TEST_NAME}"
> > +
> > + _setup_nvmet
> > +
> > + _nvmet_target_setup
> > +
> > + _nvme_connect_subsys
> > +
> > + local nvmedev
> > + nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
> > +
> > + # CNS 07h == Active Namespace ID list for the specified I/O Command Set.
> > + # CDW10 bits[7:0] hold the CNS; CDW11 bits[31:24] hold the CSI (0 == NVM).
> > + # Request from NSID 0 so the enabled namespace (NSID 1) is listed, which
> > + # is exactly the condition that used to dereference the NULL req->ns.
> > + if ! nvme admin-passthru "/dev/${nvmedev}" --opcode=0x06 \
> > + --namespace-id=0 --cdw10=0x07 --cdw11=0 --data-len=4096 -r \
> > + >> "${FULL}" 2>&1; then
> > + echo "Error: Identify CNS 07h failed"
> > + fi
>
> The nvme admin-passthru ... works but why instead not use the existing
> "nvme list-ns /dev/<nvmedev> --csi=0 ?
The patch looks good to me. I also confirmed that the test case recreates the
NULL pointer dereference that the kernel patch "nvmet: fix NULL pointer
dereference in nvmet_execute_identify_nslist()" fixes. Good.
I also confirmed that "nvme list-ns /dev/<nvmedev> --csi=0" can recreate the
NULL pointer dereference. I'm okay either way admin-passthru or list-ns. I
would like to know Guixin's view about it.
next prev parent reply other threads:[~2026-08-03 4:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 3:26 [PATCH blktests] nvme/070: add a test for Identify CNS 07h NULL pointer dereference Guixin Liu
2026-08-01 14:01 ` Nilay Shroff
2026-08-03 4:14 ` Shin'ichiro Kawasaki [this message]
2026-08-04 2:37 ` Guixin Liu
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=anAUf3S78MSSr-LJ@shinmob \
--to=shinichiro.kawasaki@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--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.