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:	Sun, 14 Sep 2008 03:47:06 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	daniel.blueman@...il.com
Cc:	fujita.tomonori@....ntt.co.jp, mingo@...e.hu,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	jbeulich@...ell.com, jens.axboe@...cle.com, tony.luck@...el.com,
	akpm@...ux-foundation.org
Subject: Re: [2.6.27-rc6, patch] fix SWIOTLB oops...

On Sat, 13 Sep 2008 18:53:13 +0100
"Daniel J Blueman" <daniel.blueman@...il.com> wrote:

> >> Fix back-off path when memory allocation fails
> >> Signed-off-by: Daniel J Blueman <daniel.blueman@...il.com>
> >>
> >> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> >> index 977edbd..8826fdf 100644
> >> --- a/lib/swiotlb.c
> >> +++ b/lib/swiotlb.c
> >> @@ -491,7 +491,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
> >>                * the lowest available address range.
> >>                */
> >>               dma_addr_t handle;
> >> -             handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
> >> +             handle = swiotlb_map_single(hwdev, NULL, size, DMA_FROM_DEVICE);
> >
> > I think that it's better to use map_single instead of
> > swiotlb_map_single since we always need swiotlb memory here.
> >
> > http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/0043.html
> 
> Thanks Fujita; this looks a better way of doing this. I've tested the
> three patches you posted and they address the original issue I bumped
> into, so seem an appropriate fix for -rc7. Not sure if preceding
> comments need tweaking though.
> 
> Our work isn't done yet though, since we see unexpected page state [5]
> on the release path. Calling the appropriate IOMMU/SWIOTLB release
> function [6] corrects this. Verified on x86-64 Intel system with
> SWIOTLB in use due to large memory; without this, processes end up
> hosed, so I'd say it's -rc7 material.

Are you sure your patch doesn't break other x86 IOMMU implementations
(note that this patch affects all the IOMMUs)?

x86 IOMMU coherent code has been broken for a long time. The coherent
code was completely rewritten for 2.6.28 to fix all the issues.

git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git

I think it's too late to try to fix v2.6.27.
--
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