[kernel] powerpc/powernv/ioda: Fix endianness when reading TCEs

Michael Ellerman patch-notifications at ellerman.id.au
Fri Jul 22 15:50:43 AEST 2016


On Wed, 2016-20-07 at 04:26:51 UTC, Alexey Kardashevskiy wrote:
> The iommu_table_ops::exchange() callback writes new TCE to the table
> and returns old value and permission mask. The old TCE value is
> correctly converted from BE to CPU endian; however permission mask
> was calculated from BE value and therefore always returned DMA_NONE
> which could cause memory leak on LE systems using VFIO SPAPR TCE IOMMU v1
> driver.
> 
> This fixes pnv_tce_xchg() to have @oldtce a CPU endian.
> 
> Fixes: 05c6cfb9dce0d13d37e9d007ee6a4af36f1c0a58
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> Reviewed-by: David Gibson <david at gibson.dropbear.id.au>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/802a345183c0308aa64969cca6

cheers


More information about the Linuxppc-dev mailing list