lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8CNRqJ6dJAG0Daa@arm.com>
Date: Thu, 27 Feb 2025 16:05:26 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>
Cc: linux-kernel@...r.kernel.org, will@...nel.org, maz@...nel.org,
	steven.price@....com, aneesh.kumar@...nel.org, gshan@...hat.com,
	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 3/3] arm64: realm: Use aliased addresses for device
 DMA to shared buffers

On Thu, Feb 27, 2025 at 02:41:50PM +0000, Suzuki K Poulose wrote:
> When a device performs DMA to a shared buffer using physical addresses,
> (without Stage1 translation), the device must use the "{I}PA address" with the
> top bit set in Realm. This is to make sure that a trusted device will be able
> to write to shared buffers as well as the protected buffers. Thus, a Realm must
> always program the full address including the "protection" bit, like AMD SME
> encryption bits.
> 
> Enable this by providing arm64 specific dma_addr_{encrypted, canonical}
> helpers for Realms. Please note that the VMM needs to similarly make sure that
> the SMMU Stage2 in the Non-secure world is setup accordingly to map IPA at the
> unprotected alias.
> 
> 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>
> Cc: Aneesh Kumar K.V <aneesh.kumar@...nel.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>

In case this goes in via the DMA API tree:

Acked-by: Catalin Marinas <catalin.marinas@....com>

(we could bikeshed on the names like unencrypted vs decrypted but I'm
not fussed about)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ