From 75190a3eecbac800f1fff85f203b1dce50e1f55c Mon Sep 17 00:00:00 2001 From: Dmitry Muhomor Date: Mon, 30 Oct 2023 12:30:28 +0200 Subject: [PATCH] mte: note alignment requirements of arm_mte_tag_and_clear_mem() --- arm_mte.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arm_mte.h b/arm_mte.h index b5e6fcf..ea3445e 100644 --- a/arm_mte.h +++ b/arm_mte.h @@ -12,6 +12,8 @@ static inline void *arm_mte_create_random_tag(void *p, u64 exclusion_mask) { // Tag the memory region with the tag specified in tag bits of tagged_ptr. Memory region itself is // zeroed. +// tagged_ptr has to be aligned by 16, and len has to be a multiple of 16 (tag granule size). +// // Arm's software optimization guide says: // "it is recommended to use STZGM (or DCZGVA) to set tag if data is not a concern." (STZGM and // DCGZVA are zeroing variants of tagging instructions).