[Intel-gfx] [PATCH] iommu/intel: Handle 36b addressing for x86-32

Joerg Roedel jroedel at suse.de
Fri Sep 4 10:14:52 UTC 2020


On Sat, Aug 22, 2020 at 05:02:09PM +0100, Chris Wilson wrote:
> Beware that the address size for x86-32 may exceed unsigned long.
> 
> [    0.368971] UBSAN: shift-out-of-bounds in drivers/iommu/intel/iommu.c:128:14
> [    0.369055] shift exponent 36 is too large for 32-bit type 'long unsigned int'
> 
> If we don't handle the wide addresses, the pages are mismapped and the
> device read/writes go astray, detected as DMAR faults and leading to
> device failure. The behaviour changed (from working to broken) in commit
> fa954e683178 ("iommu/vt-d: Delegate the dma domain to upper layer"), but
> the error looks older.
> 
> Fixes: fa954e683178 ("iommu/vt-d: Delegate the dma domain to upper layer")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: James Sewart <jamessewart at arista.com>
> Cc: Lu Baolu <baolu.lu at linux.intel.com>
> Cc: Joerg Roedel <jroedel at suse.de>
> Cc: <stable at vger.kernel.org> # v5.3+
> ---
>  drivers/iommu/intel/iommu.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Applied for v5.9, thanks.


More information about the Intel-gfx mailing list