[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] nvme-pci: fix parameter order in nvme_free_sgls() call


  • To: Christoph Hellwig <hch@xxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 28 Jan 2026 10:10:08 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=54vf6Bq93w0LFu6OqkxOXei4nsBbddB8cIhtbTU/yF8=; b=TcXm0zz68xG0JH/oqT7OQ8N5ozVTJSQjmDa3X9V/DqAZ7xRN0EwpCVfMMEOBIMpggLkb7TkNMtPOL8AQsqR5CXP6IT38R1Glg/v01gQttsm8OPlGV8q/m+MLGRvsEtwal+mDJ6GgEVdUo9Anfbk0zeMej2lA4ZYPbY978XutEy4UtgYF1XxdlZutmStve7Hh0aL1d/qPFNF5u0wePInmeMO0oSxqKcr1DSkSbUex1ga/KTH6pLB454FCFkZlwF243Osb/NB9ks6PKXypY8MG+Zx2wHLY7BqT753q7gT1GrA0QkewlNOlOM8pj/HpostBW9O3is9zNxO215femLq99g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Sx+bpLx5cOKDyvMJ6R067Tth54Y7hHhph2h2IbBXose66yflkB8ePVXjqv33r53d1H5oUKMdjLAA9bZUHNPg3F/34/SckwgwiAKiXatA8YxxSYj0IZv0X8b6jeKBuZpEGWItHRmXvT9AB/J25YgARF7GK+NCFTANe6LUsgtvO8eb5tJ/cVi+wF+v+LK3LA783LwdaeOL+NdtxtuwDKFEv9uaffTR4OKcaV49q4hc8JDtujUwDx6pqX4u8wIgTSUjoFuaRgvUydGRYrR9XdOUx+UfpSmMpGmUV7eHql2wyFCKgIwWoJYnJz3/MvU5De5SAkfcTOAGPPmk4FAVktHxQg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jens Axboe <axboe@xxxxxxxxx>, Keith Busch <kbusch@xxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Sagi Grimberg <sagi@xxxxxxxxxxx>
  • Delivery-date: Wed, 28 Jan 2026 09:10:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jan 28, 2026 at 09:49:58AM +0100, Christoph Hellwig wrote:
> On Tue, Jan 27, 2026 at 08:59:06PM +0100, Roger Pau Monne wrote:
> > The call to nvme_free_sgls() in nvme_unmap_data() has the sg_list and sge
> > parameters swapped.  This wasn't noticed by the compiler because both share
> > the same type.  On a Xen PV hardware domain, and possibly any other
> > architectures that takes that path, this leads to corruption of the NVMe
> > contents.
> > 
> > Fixes: f0887e2a52d4 ("nvme-pci: create common sgl unmapping helper")
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> > If possible it would be good for this to go in 6.19.0-rc8, as corruption of
> > the root device as part of a kernel update is unexpected. Sadly 6.18
> > already contained this issue, and no-one noticed, so its impact is limited?
> 
> This only affects non-IOMMU paths with a non-noop dma_unmap_phys.
> So it is a very common setup, but very severe for those.  Because of

Do you mean a "not very common setup"?  Otherwise I can't parse the
sentence.

> that we should get into 6.19-rc and -stable ASAP.
> 
> The fix looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks.

> but maybe we can reword the subject to sound less harmless, e.g.:
> 
> nvme-pci: DMA unmap the correct regions in nvme_free_sgls

Fine with me.  I think I was more focused on describing the logical
change rather that the actual effect of it.  Can you adjust it when
picking up?

Regards, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.