Re: [PATCH] intel-iommu: Fix off-by-one in pagetable freeing

2014-01-23 Thread Marcelo Tosatti
On Fri, Dec 20, 2013 at 12:33:43PM -0700, Alex Williamson wrote: > dma_pte_free_level() has an off-by-one error when checking whether a > pte is completely covered by a range. Take for example the case of > attempting to free pfn 0x0 - 0x1ff, ie. 512 entries covering the first > 2M superpage. The

[PATCH] intel-iommu: Fix off-by-one in pagetable freeing

2013-12-20 Thread Alex Williamson
dma_pte_free_level() has an off-by-one error when checking whether a pte is completely covered by a range. Take for example the case of attempting to free pfn 0x0 - 0x1ff, ie. 512 entries covering the first 2M superpage. The level_size() is 0x200 and we test: static void dma_pte_free_level(...