[PATCH RFC 37/37] arm64: mte: Enable tag storage management
From: Alexandru Elisei
Date: Wed Aug 23 2023 - 09:28:01 EST
Everything is in place, enable tag storage management.
Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
---
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