[PATCH] arm64: mte: Map hotplugged memory as Normal Tagged

Anshuman Khandual anshuman.khandual at arm.com
Wed Mar 10 07:05:53 GMT 2021


On 3/9/21 5:56 PM, Catalin Marinas wrote:
> In a system supporting MTE, the linear map must allow reading/writing
> allocation tags by setting the memory type as Normal Tagged. Currently,
> this is only handled for memory present at boot. Hotplugged memory uses
> Normal non-Tagged memory.
> 
> Introduce pgprot_mhp() for hotplugged memory and use it in
> add_memory_resource(). The arm64 code maps pgprot_mhp() to
> pgprot_tagged().
> 
> Note that ZONE_DEVICE memory should not be mapped as Tagged and
> therefore setting the memory type in arch_add_memory() is not feasible.
> 
> Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>
> Fixes: 0178dc761368 ("arm64: mte: Use Normal Tagged attributes for the linear map")
> Reported-by: Patrick Daly <pdaly at codeaurora.org>
> Link: https://lore.kernel.org/r/1614745263-27827-1-git-send-email-pdaly@codeaurora.org
> Cc: <stable at vger.kernel.org> # 5.10.x
> Cc: Will Deacon <will at kernel.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Vincenzo Frascino <vincenzo.frascino at arm.com>
> Cc: David Hildenbrand <david at redhat.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual at arm.com>



More information about the linux-arm-kernel mailing list