[PATCH RFC 37/37] arm64: mte: Enable tag storage management

Alexandru Elisei alexandru.elisei at arm.com
Wed Aug 23 06:13:50 PDT 2023


Everything is in place, enable tag storage management.

Signed-off-by: Alexandru Elisei <alexandru.elisei at arm.com>
---
 arch/arm64/kernel/mte_tag_storage.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/kernel/mte_tag_storage.c b/arch/arm64/kernel/mte_tag_storage.c
index 1ccbcc144979..18264bc8f590 100644
--- a/arch/arm64/kernel/mte_tag_storage.c
+++ b/arch/arm64/kernel/mte_tag_storage.c
@@ -399,6 +399,12 @@ static int __init mte_tag_storage_activate_regions(void)
 	}
 
 	ret = reserve_metadata_storage(ZERO_PAGE(0), 0, GFP_HIGHUSER_MOVABLE);
+	if (ret) {
+		pr_info("MTE tag storage disabled");
+	} else {
+		static_branch_enable(&metadata_storage_enabled_key);
+		pr_info("MTE tag storage enabled\n");
+	}
 
 	return ret;
 }
-- 
2.41.0




More information about the linux-arm-kernel mailing list