Re: [PATCH] iommu/iova: Don't BUG on invalid PFNs

2020-06-10 Thread guptap
On 2020-06-02 18:38, Robin Murphy wrote: Unlike the other instances which represent a complete loss of consistency within the rcache mechanism itself, or a fundamental and obvious misconfiguration by an IOMMU driver, the BUG_ON() in iova_magazine_free_pfns() can be provoked at more or less any

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-06-03 Thread guptap
On 2020-06-02 18:37, Robin Murphy wrote: On 2020-05-26 08:19, gup...@codeaurora.org wrote: On 2020-05-22 14:54, Robin Murphy wrote: On 2020-05-22 07:25, gup...@codeaurora.org wrote: On 2020-05-22 01:46, Robin Murphy wrote: On 2020-05-21 12:30, Prakash Gupta wrote: Sorry for delayed

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-06-02 Thread guptap
On 2020-05-26 12:49, gup...@codeaurora.org wrote: On 2020-05-22 14:54, Robin Murphy wrote: On 2020-05-22 07:25, gup...@codeaurora.org wrote: On 2020-05-22 01:46, Robin Murphy wrote: On 2020-05-21 12:30, Prakash Gupta wrote: I agree, we shouldn't be freeing the partial iova. Instead just

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-05-26 Thread guptap
On 2020-05-22 14:54, Robin Murphy wrote: On 2020-05-22 07:25, gup...@codeaurora.org wrote: On 2020-05-22 01:46, Robin Murphy wrote: On 2020-05-21 12:30, Prakash Gupta wrote: I agree, we shouldn't be freeing the partial iova. Instead just making sure if unmap was successful should be

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-05-22 Thread guptap
On 2020-05-22 01:46, Robin Murphy wrote: On 2020-05-21 12:30, Prakash Gupta wrote: Limit the iova size while freeing based on unmapped size. In absence of this even with unmap failure, invalid iova is pushed to iova rcache and subsequently can cause panic while rcache magazine is freed. Can