Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Chao Shi <coshi036@gmail.com>,
	linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>, Jens Axboe <axboe@kernel.dk>,
	Tatsuya Sasaki <tatsuya6.sasaki@kioxia.com>,
	Maurizio Lombardi <mlombard@arkamax.eu>,
	linux-kernel@vger.kernel.org, Sungwoo Kim <iam@sung-woo.kim>,
	Dave Tian <daveti@purdue.edu>, Weidong Zhu <weizhu@fiu.edu>
Subject: Re: [PATCH v5] nvme: reject passthrough of driver-managed Set Features
Date: Thu, 28 May 2026 10:43:03 +0200	[thread overview]
Message-ID: <20260528084303.GA8199@lst.de> (raw)
In-Reply-To: <ahcAaPTOH9ELlAA4@kbusch-mbp>

On Wed, May 27, 2026 at 08:32:08AM -0600, Keith Busch wrote:
> On Sat, May 23, 2026 at 06:56:29PM -0400, Chao Shi wrote:
> > +			switch (le32_to_cpu(c->features.fid) & 0xff) {
> > +			case NVME_FEAT_KATO:
> > +				if (ctrl->ops->flags & NVME_F_FABRICS)
> > +					break;
> > +				fallthrough;
> > +			case NVME_FEAT_HOST_BEHAVIOR:
> > +			case NVME_FEAT_HOST_MEM_BUF:
> > +			case NVME_FEAT_NUM_QUEUES:
> > +			case NVME_FEAT_AUTO_PST:
> 
> I may have been overly restrictive with suggesting AUTO_PST for this
> filter. Messing with the other features will break something, but power
> state is just user policy. The driver may undo the user setting on a
> controller reset, but so what?

There's really no point in allowing it.  Just as we should have never
allowed low-level config of any kind, but unfortunately nvme admin
commands are a horrible grab all.


      reply	other threads:[~2026-05-28  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 22:56 [PATCH v5] nvme: reject passthrough of driver-managed Set Features Chao Shi
2026-05-25 15:34 ` Tokunori Ikegami
2026-05-25 15:49   ` Keith Busch
2026-05-25 16:49     ` Tokunori Ikegami
2026-05-27 14:16 ` Christoph Hellwig
2026-05-27 14:32 ` Keith Busch
2026-05-28  8:43   ` Christoph Hellwig [this message]

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=20260528084303.GA8199@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=coshi036@gmail.com \
    --cc=daveti@purdue.edu \
    --cc=iam@sung-woo.kim \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mlombard@arkamax.eu \
    --cc=sagi@grimberg.me \
    --cc=tatsuya6.sasaki@kioxia.com \
    --cc=weizhu@fiu.edu \
    /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