From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0263037187B for ; Thu, 28 May 2026 08:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779957788; cv=none; b=A5cZ3ycLDW1Sj54+ZZIAJI2D2pzqWIcBvIBZSwXFC3AHvd9seY03ek6/QJJlHnG9wYCahG63cTv1hr/H1BLwyMfzQagMsTqDCOdEmeEAEpCeO28dzdrGGtXzGXfjMOqjGaH7iDr6/ion4RNuCimZ5jgk7/G+Xz36ka1rIUslnC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779957788; c=relaxed/simple; bh=DGvf82Jw8NvfZ7cpwcGs2iTax4rt9ddm9t/f7Yr2LdM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bJ6yjr2R9m5QeI18N5hqWJ0iV8CDjpek23UamX09SMz7Nq3gb9P4B9kC8A+JEIGUDExQmHMsUxGUpfrhdCv+wGi9FWsm1j3uQYD6Kn9SUK0b3HZEJvajuji5WarXRgQc2tSOj63/qcy4UoA9l4DS3otWODS4iv3KhUWxvceTC1U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 2AAC468B05; Thu, 28 May 2026 10:43:04 +0200 (CEST) Date: Thu, 28 May 2026 10:43:03 +0200 From: Christoph Hellwig To: Keith Busch Cc: Chao Shi , linux-nvme@lists.infradead.org, Christoph Hellwig , Sagi Grimberg , Jens Axboe , Tatsuya Sasaki , Maurizio Lombardi , linux-kernel@vger.kernel.org, Sungwoo Kim , Dave Tian , Weidong Zhu Subject: Re: [PATCH v5] nvme: reject passthrough of driver-managed Set Features Message-ID: <20260528084303.GA8199@lst.de> References: <20260523225629.3964037-1-coshi036@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) 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.