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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6bcb10536005fd36966a97574e424c17cde1105.camel@linux.ibm.com>
Date: Thu, 27 Mar 2025 10:45:40 +0100
From: Niklas Schnelle <schnelle@...ux.ibm.com>
To: 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>,
        Vasily Gorbik
 <gor@...ux.ibm.com>,
        Alexander Gordeev	 <agordeev@...ux.ibm.com>
Cc: 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 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?

Thanks,
Niklas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ