Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread John Garry
On 18/01/2021 12:59, Robin Murphy wrote: for cpu_rcaches too, and get a similar abort at runtime. It's not specifically that we expect them (allocation failures for the loaded magazine), rather we should make safe against it. So could you be more specific in your concern for the cpu_rcache

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread Robin Murphy
On 2021-01-18 10:55, John Garry wrote: On 18/01/2021 10:08, Jean-Philippe Brucker wrote: Any idea why that's happening?  This fix seems ok but if we're expecting allocation failures for the loaded magazine then we could easily get it for cpu_rcaches too, and get a similar abort at runtime.

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread Jean-Philippe Brucker
On Mon, Jan 18, 2021 at 10:55:52AM +, John Garry wrote: > On 18/01/2021 10:08, Jean-Philippe Brucker wrote: > > > > Any idea why that's happening? This fix seems ok but if we're expecting > > > > allocation failures for the loaded magazine then we could easily get it > > > > for cpu_rcaches

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread John Garry
On 18/01/2021 10:08, Jean-Philippe Brucker wrote: Any idea why that's happening? This fix seems ok but if we're expecting allocation failures for the loaded magazine then we could easily get it for cpu_rcaches too, and get a similar abort at runtime. It's not specifically that we expect them

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread Jean-Philippe Brucker
On Mon, Jan 18, 2021 at 09:24:17AM +, John Garry wrote: > On 15/01/2021 17:30, Jean-Philippe Brucker wrote: > > On Thu, Dec 10, 2020 at 02:23:08AM +0800, John Garry wrote: > > > A similar crash to the following could be observed if initial CPU rcache > > > magazine allocations fail in

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-18 Thread John Garry
On 15/01/2021 17:30, Jean-Philippe Brucker wrote: On Thu, Dec 10, 2020 at 02:23:08AM +0800, John Garry wrote: A similar crash to the following could be observed if initial CPU rcache magazine allocations fail in init_iova_rcaches(): thanks for having a look Any idea why that's happening?

Re: [PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2021-01-15 Thread Jean-Philippe Brucker
On Thu, Dec 10, 2020 at 02:23:08AM +0800, John Garry wrote: > A similar crash to the following could be observed if initial CPU rcache > magazine allocations fail in init_iova_rcaches(): Any idea why that's happening? This fix seems ok but if we're expecting allocation failures for the loaded

[PATCH v4 2/3] iommu/iova: Avoid double-negatives in magazine helpers

2020-12-09 Thread John Garry
A similar crash to the following could be observed if initial CPU rcache magazine allocations fail in init_iova_rcaches(): Unable to handle kernel NULL pointer dereference at virtual address Mem abort info: free_iova_fast+0xfc/0x280 iommu_dma_free_iova+0x64/0x70