lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <your-ad-here.call-01743418719-ext-6354@work.hours>
Date: Mon, 31 Mar 2025 12:58:39 +0200
From: Vasily Gorbik <gor@...ux.ibm.com>
To: Niklas Schnelle <schnelle@...ux.ibm.com>
Cc: Matthew Rosato <mjrosato@...ux.ibm.com>, Joerg Roedel <jroedel@...e.de>,
        Will Deacon <will@...nel.org>, Gerd Bayer <gbayer@...ux.ibm.com>,
        Jason Gunthorpe <jgg@...pe.ca>, Heiko Carstens <hca@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: Re: [PATCH v2] s390/pci: Fix dev.dma_range_map missing sentinel
 element

On Thu, Mar 27, 2025 at 03:51:50PM +0100, Vasily Gorbik wrote:
> On Thu, Mar 27, 2025 at 10:45:40AM +0100, Niklas Schnelle wrote:
> > On Wed, 2025-03-12 at 11:32 +0100, Niklas Schnelle wrote:
> > > The fixed commit sets up dev.dma_range_map but missed that this is
> > > supposed to be an array of struct bus_dma_region with a sentinel element
> > > with the size field set to 0 at the end. This would lead to overruns in
> > > e.g. dma_range_map_min(). It could also result in wrong translations
> > > instead of DMA_MAPPING_ERROR in translate_phys_to_dma() if the paddr
> > > were to not fit in the aperture. Fix this by using the
> > > dma_direct_set_offset() helper which creates a sentinel for us.
> > > 
> > > Fixes: d236843a6964 ("s390/pci: store DMA offset in bus_dma_region")
> > > Reviewed-by: Matthew Rosato <mjrosato@...ux.ibm.com>
> > > Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> > > ---
> > > Note: Based on iommu/next
> > > 
> > > v1 -> v2:
> > > - Fixed typo, added trailers
> > > - Link to v1: https://lore.kernel.org/r/20250306-fix_dma_map_alloc-v1-1-b4fa44304eac@linux.ibm.com
> > > ---
> > >  arch/s390/pci/pci_bus.c | 24 +++++++++++-------------
> > >  1 file changed, 11 insertions(+), 13 deletions(-)
> > > 
> > 
> > With the IOMMU pull request for Linux v6.15 the fixed commit is now in
> > Linus tree (with the SHA as cited) but this fix isn't. Since this fix
> > only touches s390 specific code I think it could go through the s390
> > tree but that currently doesn't carry the fixed commit so would have to
> > wait until the s390 tree pulls in v6.15-rc1. 
> > 
> > I don't think any breakage from the missing sentinel is visible outside
> > of guests using the new IOMMU passthrough mode so I guess waiting until
> > after v6.15-rc1 would be okay.
> > 
> > Heiko, Vasily, Alexander what do you think?
> 
> Sure, I'll pick it up in the s390 tree for rc1 or rc2, depending on
> whether there will be a second s390 tree pull request during the merge
> window.

Applied, thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ