[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ae2b809-7cc6-471b-9065-be446411570b@redhat.com>
Date: Fri, 28 Feb 2025 12:08:47 +1000
From: Gavin Shan <gshan@...hat.com>
To: Suzuki K Poulose <suzuki.poulose@....com>, linux-kernel@...r.kernel.org
Cc: will@...nel.org, catalin.marinas@....com, maz@...nel.org,
steven.price@....com, aneesh.kumar@...nel.org, robin.murphy@....com,
linux-arm-kernel@...ts.infradead.org,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
Christoph Hellwig <hch@....de>, Marek Szyprowski <m.szyprowski@...sung.com>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [PATCH v3 1/3] dma: Fix encryption bit clearing for dma_to_phys
On 2/28/25 12:41 AM, Suzuki K Poulose wrote:
> phys_to_dma() sets the encryption bit on the translated DMA address. But
> dma_to_phys() clears the encryption bit after it has been translated back
> to the physical address, which could fail if the device uses DMA ranges.
>
> AMD SME doesn't use the DMA ranges and thus this is harmless. But as we
> are about to add support for other architectures, let us fix this.
>
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@...nel.org>
> Link: https://lkml.kernel.org/r/yq5amsen9stc.fsf@kernel.org
> Cc: Will Deacon <will@...nel.org>
> Cc: Jean-Philippe Brucker <jean-philippe@...aro.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Robin Murphy <robin.murphy@....com>
> Cc: Steven Price <steven.price@....com>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Tom Lendacky <thomas.lendacky@....com>
> Reviewed-by: Robin Murphy <robin.murphy@....com>
> Acked-by: Tom Lendacky <thomas.lendacky@....com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
> include/linux/dma-direct.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Gavin Shan <gshan@...hat.com>
Powered by blists - more mailing lists