All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Guixin Liu <kanie@linux.alibaba.com>,
	shinichiro.kawasaki@wdc.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>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH blktests] nvme/070: add a test for Identify CNS 07h NULL pointer dereference
Date: Sat, 1 Aug 2026 19:31:37 +0530	[thread overview]
Message-ID: <6f4a1b76-50f4-45f8-9a56-e6f66637d7e7@linux.ibm.com> (raw)
In-Reply-To: <20260731032601.1100664-1-kanie@linux.alibaba.com>

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 ?

Thanks,
--Nilay


  reply	other threads:[~2026-08-01 14:02 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 [this message]
2026-08-03  4:14   ` Shin'ichiro Kawasaki
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=6f4a1b76-50f4-45f8-9a56-e6f66637d7e7@linux.ibm.com \
    --to=nilay@linux.ibm.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=sagi@grimberg.me \
    --cc=shinichiro.kawasaki@wdc.com \
    /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.