mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] nvmet: fix stale log page data and a ZNS Identify error
@ 2026-11-05 13:57 shao.mingyin
  2026-11-05 13:57 ` [PATCH 1/2] nvmet: zero out unused data of fixed-size log pages shao.mingyin
  2026-11-05 13:58 ` [PATCH 2/2] nvmet: zns: return the namespace lookup error for Identify shao.mingyin
  0 siblings, 2 replies; 7+ messages in thread
From: shao.mingyin @ 2026-11-05 13:57 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, linux-nvme; +Cc: linux-kernel, stable

This series fixes two issues in the nvmet Identify and Get Log Page
paths.  Both patches are independent and can be applied on their own or
as a subset.

Patch 1 zeroes the unused part of the fixed-size Get Log Page replies.
The transfer length is supplied by the host, and the transports send the
whole buffer back, so a request larger than the log page used to return
stale kernel memory.  It covers the Supported Log Pages, Commands
Supported and Effects, Supported Features, Endurance Group, Reservation
and Rotational Media Information pages, and clamps the Error log ring
walk to the requested length while keeping the most recent error first,
as the specification requires.

Patch 2 returns the namespace lookup error for an Identify command with
CNS 05h and CSI 02h on a namespace that does not exist, instead of
overwriting it with the status of the identify buffer copy.

Both patches were runtime-tested on 7.3.0-next-20261030 (QEMU/TCG
guest).  Patch 1 was tested with an nvmet-tcp target and a file-backed
namespace, using a 4096-byte Get Log Page; patch 2 with the loop
transport and CONFIG_BLK_DEV_ZONED.  The Rotational Media Information
and Reservation log changes of patch 1 are not runtime-tested: the test
guest has no rotational namespace and no persistent-reservation setup.

Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-06 10:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 13:57 [PATCH 0/2] nvmet: fix stale log page data and a ZNS Identify error shao.mingyin
2026-11-05 13:57 ` [PATCH 1/2] nvmet: zero out unused data of fixed-size log pages shao.mingyin
2026-11-06 10:39   ` Christoph Hellwig
2026-11-06 10:54     ` shao.mingyin
2026-11-05 13:58 ` [PATCH 2/2] nvmet: zns: return the namespace lookup error for Identify shao.mingyin
2026-11-06 10:40   ` Christoph Hellwig
2026-11-06 10:54     ` shao.mingyin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®