Skip to content
Commit 8fcc5372 authored by Chris Wright's avatar Chris Wright Committed by David Woodhouse
Browse files

intel-iommu: Check for identity mapping candidate using system dma mask



The identity mapping code appears to make the assumption that if the
devices dma_mask is greater than 32bits the device can use identity
mapping.  But that is not true: take the case where we have a 40bit
device in a 44bit architecture. The device can potentially receive a
physical address that it will truncate and cause incorrect addresses
to be used.

Instead check to see if the device's dma_mask is large enough
to address the system's dma_mask.

Signed-off-by: default avatarMike Travis <travis@sgi.com>
Reviewed-by: default avatarMike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 9b4554b2
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