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:	Thu, 18 Sep 2008 18:39:11 +0200
From:	Joerg Roedel <joerg.roedel@....com>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC:	linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org
Subject: Re: [PATCH 18/23] AMD IOMMU: simplify dma_mask_to_pages

On Fri, Sep 19, 2008 at 12:57:36AM +0900, FUJITA Tomonori wrote:
> On Thu, 18 Sep 2008 09:32:32 +0200
> Joerg Roedel <joerg.roedel@....com> wrote:
> 
> > On Thu, Sep 18, 2008 at 04:20:20AM +0900, FUJITA Tomonori wrote:
> > > On Wed, 17 Sep 2008 18:52:52 +0200
> > > Joerg Roedel <joerg.roedel@....com> wrote:
> > > 
> > > > The current calculation is very complicated. This patch replaces it with
> > > > a much simpler version.
> > > > 
> > > > Signed-off-by: Joerg Roedel <joerg.roedel@....com>
> > > > ---
> > > >  arch/x86/kernel/amd_iommu.c |    3 +--
> > > >  1 files changed, 1 insertions(+), 2 deletions(-)
> > > 
> > > I think that you can use iommu_device_max_index() for what
> > > dma_mask_to_pages does.
> > 
> > Hmm, in theory yes. But iommu_device_max_index() returns a size in bytes
> > and not in pages.
> 
> It doesn't return a size in bytes. You could use like:
> 
> limit = iommu_device_max_index(dom->aperture_size >> PAGE_SHIFT, 0,
> 				dma_get_mask(dev) >> PAGE_SHIFT);

Hmm, ok, makes sense if we remove this line too:

	limit = limit < size ? limit : size;

This is the logic in iommu_device_max_index().

> Anyway, it's not urgent at all. I'll send a patch for this after your
> patchset is merged.

Ok, fine.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

--
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