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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 Mar 2008 09:46:59 -0700
From:	Grant Grundler <grundler@...isc-linux.org>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc:	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	rth@...ddle.net, ink@...assic.park.msu.ru, kyle@...isc-linux.org,
	matthew@....cx, grundler@...isc-linux.org,
	linux-kernel@...r.kernel.org
Subject: Re: Linux 2.6.25-rc4

On Wed, Mar 05, 2008 at 05:09:30PM +0900, FUJITA Tomonori wrote:
> On Tue, 4 Mar 2008 21:03:44 -0800 (PST)
> Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
> > 
> > It's a few days late, but I was waiting for some updates for some of the 
> > most annoying regressions until releasing it, so the end result is 
> > hopefully more useful as a result.
> 
> Ah, the IOMMU patches (alpha and parisc) that I submitted for -mm have
> been merged somehow.
> 
> The parisc patches were tested but probably the alpha patches not.
> 
> Here's a patch for 32bits arch parisc.
> 
> =
> From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> Subject: [PATCH] parisc: fix IOMMU's device boundary overflow bug on 32bits arch
> 
> On 32bits boxes, boundary_size becomes zero due to a overflow and we
> hit BUG_ON in iommu_is_span_boundary.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> Cc: Kyle McMartin <kyle@...isc-linux.org>
> Cc: Matthew Wilcox <matthew@....cx>
> Cc: Grant Grundler <grundler@...isc-linux.org>

Acked-by: Grant Grundler <grundler@...isc-linux.org>

thanks,
grant

> ---
>  drivers/parisc/ccio-dma.c  |    4 ++--
>  drivers/parisc/sba_iommu.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
> index 60d338c..62db3c3 100644
> --- a/drivers/parisc/ccio-dma.c
> +++ b/drivers/parisc/ccio-dma.c
> @@ -366,8 +366,8 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
>  	** ggg sacrifices another 710 to the computer gods.
>  	*/
>  
> -	boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT);
> -	boundary_size >>= IOVP_SHIFT;
> +	boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1,
> +			      1ULL << IOVP_SHIFT) >> IOVP_SHIFT;
>  
>  	if (pages_needed <= 8) {
>  		/*
> diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
> index e834127..bdbe780 100644
> --- a/drivers/parisc/sba_iommu.c
> +++ b/drivers/parisc/sba_iommu.c
> @@ -341,8 +341,8 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev,
>  	unsigned long shift;
>  	int ret;
>  
> -	boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT);
> -	boundary_size >>= IOVP_SHIFT;
> +	boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1,
> +			      1ULL << IOVP_SHIFT) >> IOVP_SHIFT;
>  
>  #if defined(ZX1_SUPPORT)
>  	BUG_ON(ioc->ibase & ~IOVP_MASK);
> -- 
> 1.5.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ