Re: [PATCH] iommu/io-pgtable-arm: Fix IOVA validation for 32-bit

2020-03-02 Thread Stephan Gerhold
Hi Robin, On Fri, Feb 28, 2020 at 02:18:55PM +, Robin Murphy wrote: > Since we ony support the TTB1 quirk for AArch64 contexts, and > consequently only for 64-bit builds, the sign-extension aspect of the > "are all bits above IAS consistent?" check should implicitly only apply > to 64-bit

Re: [PATCH] iommu/io-pgtable-arm: Fix IOVA validation for 32-bit

2020-03-02 Thread Will Deacon
On Mon, Mar 02, 2020 at 05:11:23PM +0100, Joerg Roedel wrote: > On Mon, Mar 02, 2020 at 11:53:01AM +, Will Deacon wrote: > > On Fri, Feb 28, 2020 at 02:18:55PM +, Robin Murphy wrote: > > > Since we ony support the TTB1 quirk for AArch64 contexts, and > > > consequently only for 64-bit

Re: [PATCH] iommu/io-pgtable-arm: Fix IOVA validation for 32-bit

2020-03-02 Thread Joerg Roedel
On Mon, Mar 02, 2020 at 11:53:01AM +, Will Deacon wrote: > On Fri, Feb 28, 2020 at 02:18:55PM +, Robin Murphy wrote: > > Since we ony support the TTB1 quirk for AArch64 contexts, and > > consequently only for 64-bit builds, the sign-extension aspect of the > > "are all bits above IAS

Re: [PATCH] iommu/io-pgtable-arm: Fix IOVA validation for 32-bit

2020-03-02 Thread Will Deacon
On Fri, Feb 28, 2020 at 02:18:55PM +, Robin Murphy wrote: > Since we ony support the TTB1 quirk for AArch64 contexts, and > consequently only for 64-bit builds, the sign-extension aspect of the > "are all bits above IAS consistent?" check should implicitly only apply > to 64-bit IOVAs. Change

[PATCH] iommu/io-pgtable-arm: Fix IOVA validation for 32-bit

2020-02-28 Thread Robin Murphy
Since we ony support the TTB1 quirk for AArch64 contexts, and consequently only for 64-bit builds, the sign-extension aspect of the "are all bits above IAS consistent?" check should implicitly only apply to 64-bit IOVAs. Change the type of the cast to ensure that 32-bit longs don't inadvertently