Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7144F18E74D for ; Fri, 18 Oct 2024 08:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729241378; cv=none; b=bRXJCikz8WFB/WtlTSTamWo/vOVmo1JWoT5Q1TfAd5IRHSQ3mxc7bJL0MmhonU/jevwrJmMlUXWPg1/VWSI+JHdS9OnoVz/GNlAtRFCuZZ7XK+lLP3AIt0g6msyczaQh11L6ogxq3ma80mSXx2k3FdVsLAdezCV5NYY8zCPvaPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729241378; c=relaxed/simple; bh=c0GpjwIsbZdM9CRxEhlW+x8BR4baY6JErWFjliDA0bA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FoYRK+Uekpflv/K6ed2WHbCazDqpKztososDY3ruy3Z38MWO1aPAgZIQrQVVAa9HsNVn5K+5j22NSz3b0Lu5yLjth3uY/TnH0qlyelBgOlvbi2sky0fsWOI1tfR7wi/UtrLoYCYkx7LpfYKfMb1DHcF1pyuQdk0LuXRycsmB32I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EaaKvKW8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EaaKvKW8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E077C4CEC3; Fri, 18 Oct 2024 08:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729241377; bh=c0GpjwIsbZdM9CRxEhlW+x8BR4baY6JErWFjliDA0bA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EaaKvKW8Qthz0BoczJXbaz3kedq+83YcWBOmGC9JPMPLgHOEvwTk3HqYHgoqHVTTJ J6UqnxTY6WlVJNpVfKjqtjsoEz9REx8ZElmzhFoOvf4XFmQVNvoa2j4KOsgCbJ1s3z EZz/Hj7zwqM6rP7w3A4uwAv10tcEAr5gAQIqGq8Q= Date: Fri, 18 Oct 2024 10:49:34 +0200 From: Greg Kroah-Hartman To: Puranjay Mohan Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, stable@vger.kernel.org, puranjay12@gmail.com, amazon-linux-kernel@amazon.com Subject: Re: [PATCH 6.1.y] nvme: fix metadata handling in nvme-passthrough Message-ID: <2024101848-paparazzi-cornea-6389@gregkh> References: <20241016090739.43470-1-pjy@amazon.com> Precedence: bulk X-Mailing-List: stable@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: <20241016090739.43470-1-pjy@amazon.com> On Wed, Oct 16, 2024 at 09:07:39AM +0000, Puranjay Mohan wrote: > [ Upstream commit 7c2fd76048e95dd267055b5f5e0a48e6e7c81fd9 ] > > On an NVMe namespace that does not support metadata, it is possible to > send an IO command with metadata through io-passthru. This allows issues > like [1] to trigger in the completion code path. > nvme_map_user_request() doesn't check if the namespace supports metadata > before sending it forward. It also allows admin commands with metadata to > be processed as it ignores metadata when bdev == NULL and may report > success. > > Reject an IO command with metadata when the NVMe namespace doesn't > support it and reject an admin command if it has metadata. > > [1] https://lore.kernel.org/all/mb61pcylvnym8.fsf@amazon.com/ > > Suggested-by: Christoph Hellwig > Reviewed-by: Christoph Hellwig > Reviewed-by: Sagi Grimberg > Reviewed-by: Anuj Gupta > Signed-off-by: Keith Busch > [ Minor changes to make it work on 6.1 ] What about 6.6? And 5.15? We can't take patches for only some branches, otherwise when you upgrade you would have regressions. Please send ALL needed patches and then we will be glad to queue them up. I've dropped the two submissions you sent for now. thanks, greg k-h