Linux block layer
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Yao Sang <sangyao@kylinos.cn>
Cc: linux-block@vger.kernel.org, dwagner@suse.de
Subject: Re: [PATCH blktests] nvme/070: add multipath command effects log lifetime test
Date: Wed, 19 Aug 2026 17:21:19 +0900	[thread overview]
Message-ID: <aoVkX-G5f4WNiU8e@shinhome> (raw)
In-Reply-To: <20260814070019.3860097-1-sangyao@kylinos.cn>

On Aug 14, 2026 / 15:00, Yao Sang wrote:
> Add a regression test for namespace head command effects log lifetime.
> 
> Create a two-path loop subsystem, remove the first controller, and issue
> an I/O passthrough command through the namespace-head character device.
> Kernels that keep the command effects log pointer in the shared namespace
> head report the stale access through KASAN.
> 
> Signed-off-by: Yao Sang <sangyao@kylinos.cn>

Thanks for the patch. I ran the test case, and confirmed it recreates the KASAN
slab-use-after-free that was mentioned in your kernel side fix patch [*]. I also
confirmed that the kernel fix avoids the KASAN. The test case looks valuable :)

[*] https://lore.kernel.org/linux-nvme/20260814070651.3973067-1-sangyao@kylinos.cn/

It's the better to mention the kernel side fix in the commit log above and the
test case script header comment. Let's wait until the kernel patch gets
applied before making the changes, so that we can note the git hash of the
kernel fix commit.

Also please find in-line comments.

> ---
>  tests/nvme/070     | 57 ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/nvme/070.out |  2 ++
>  2 files changed, 59 insertions(+)
>  create mode 100755 tests/nvme/070
>  create mode 100644 tests/nvme/070.out
> 
> diff --git a/tests/nvme/070 b/tests/nvme/070
> new file mode 100755
> index 0000000..39195be
> --- /dev/null
> +++ b/tests/nvme/070
> @@ -0,0 +1,57 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-3.0+
> +# Copyright (C) 2026 Yao Sang <sangyao@kylinos.cn>
> +#
> +# Test NVMe multipath command effects log lifetime.
> +
> +. tests/nvme/rc
> +
> +nvme_trtype=loop

Is there any reason to run this test only for loop transport type?
If not, I suggest to drop the line above and add set_conditions() to
run this test case for all transport types.

  set_conditions() {
          _set_nvme_trtype "$@"
  }

> +
> +DESCRIPTION="test NVMe multipath command effects log lifetime"
> +QUICK=1
> +CHECK_DMESG=1
> +
> +requires() {
> +	_nvme_requires
> +	_have_loop
> +	_have_module_param_value nvme_core multipath Y
> +	_require_nvme_trtype_is_loop

If this case is not restricted to loop transport, the line above will not be
required.

> +	_have_kernel_options KASAN

Certain amount of blktests users do not enable KASAN. I think this test case
is still worth running under such conditions, so suggest to drop the line above.

  reply	other threads:[~2026-08-19  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  7:00 [PATCH blktests] nvme/070: add multipath command effects log lifetime test Yao Sang
2026-08-19  8:21 ` Shin'ichiro Kawasaki [this message]
2026-08-20  0:55   ` Yao Sang
2026-08-20  5:25     ` Shin'ichiro Kawasaki

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=aoVkX-G5f4WNiU8e@shinhome \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=sangyao@kylinos.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox