Skip to content
Commit 08090744 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel
Browse files

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



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 get sign-extended, and thus considered invalid, if
they happen to be above 2GB in the TTB0 region.

Reported-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Acked-by: default avatarAcked-by: Will Deacon <will@kernel.org>
Fixes: db690301 ("iommu/io-pgtable-arm: Prepare for TTBR1 usage")
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 77a1bce8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment