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: <20170726091331.GB15833@8bytes.org>
Date:   Wed, 26 Jul 2017 11:13:31 +0200
From:   Joerg Roedel <joro@...tes.org>
To:     David Dillow <dillow@...gle.com>
Cc:     David Woodhouse <dwmw2@...radead.org>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/vt-d: Don't free parent pagetable of the PTE we're
 adding

On Wed, Jun 28, 2017 at 07:42:23PM -0700, David Dillow wrote:
> When adding a large scatterlist entry that covers more than the L3
> superpage size (1GB) but has an alignment such that we must use L2
> superpages (2MB) , we give dma_pte_free_level() a range that causes it
> to free the L3 pagetable we're about to populate. We fix this by telling
> dma_pte_free_pagetable() about the pagetable level we're about to populate
> to prevent freeing it.
> 
> For example, mapping a scatterlist with entry lengths 854MB and 1194MB
> at IOVA 0xffff80000000 would, when processing the 2MB-aligned second
> entry, cause pfn_to_dma_pte() to create a L3 directory to hold L2
> superpages for the mapping at IOVA 0xffffc0000000. We would previously
> call dma_pte_free_pagetable(domain, 0xffffc0000, 0xfffffffff), which
> would free the L3 directory pfn_to_dma_pte() just created for IO PFN
> 0xffffc0000. Telling dma_pte_free_pagetable() to retain the L3
> directories while using L2 superpages avoids the erroneous free.
> 
> Signed-off-by: David Dillow <dillow@...gle.com>
> ---
>  drivers/iommu/intel-iommu.c | 38 ++++++++++++++++++++++++++------------
>  1 file changed, 26 insertions(+), 12 deletions(-)

Applied, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ