|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [for-4.15][PATCH v2 4/5] xen/iommu: x86: Don't leak the IOMMU page-tables
Hi Jan, On 10/02/2021 16:12, Jan Beulich wrote: On 10.02.2021 16:04, Julien Grall wrote:On 10/02/2021 14:32, Jan Beulich wrote:On 09.02.2021 16:28, Julien Grall wrote:From: Julien Grall <jgrall@xxxxxxxxxx> The new IOMMU page-tables allocator will release the pages when relinquish the domain resources. However, this is not sufficient when the domain is dying because nothing prevents page-table to be allocated. iommu_alloc_pgtable() is now checking if the domain is dying before adding the page in the list. We are relying on &hd->arch.pgtables.lock to synchronize d->is_dying.As said in reply to an earlier patch, I think suppressing (really: ignoring) new mappings would be better.This is exactly what I suggested in v1 but you wrote: "Ignoring requests there seems fragile to me. Paul - what are your thoughts about bailing early from hvm_add_ioreq_gfn() when the domain is dying?"Was this on the thread of this patch? I didn't find such a reply of mine. I need more context here because you name hvm_add_ioreq_gfn() above, while I refer to iommu_map() (and downwards the call stack). See [1].
Duplicating the check sounds good to me.
We would still need to zap the root page table in the relinquish path. So I am not sure what benefits it would give us to zap the page tables on the first iommu_unmap() afther domain dies. Cheers,[1] https://lore.kernel.org/xen-devel/f21f1f61-5213-55a8-320c-43e5fe80100f@xxxxxxxx/ -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |