>From b8f172dd836741c76078bab3c7ac5a9372eab023 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 19 Dec 2020 21:10:26 +0000 Subject: [PATCH 06/11] sys/prctl.h: add MTE related constants from linux v5.10 these are for the aarch64 MTE (memory tagging extension), see linux commit 1c101da8b971a36695319dce7a24711dc567a0dd arm64: mte: Allow user control of the tag check mode via prctl() linux commit af5ce95282dc99d08a27a407a02c763dde1c5558 arm64: mte: Allow user control of the generated random tags via prctl() --- include/sys/prctl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/sys/prctl.h b/include/sys/prctl.h index 4b9fcc05..4ba73f42 100644 --- a/include/sys/prctl.h +++ b/include/sys/prctl.h @@ -157,6 +157,13 @@ struct prctl_mm_map { #define PR_SET_TAGGED_ADDR_CTRL 55 #define PR_GET_TAGGED_ADDR_CTRL 56 #define PR_TAGGED_ADDR_ENABLE (1UL << 0) +#define PR_MTE_TCF_SHIFT 1 +#define PR_MTE_TCF_NONE (0UL << 1) +#define PR_MTE_TCF_SYNC (1UL << 1) +#define PR_MTE_TCF_ASYNC (2UL << 1) +#define PR_MTE_TCF_MASK (3UL << 1) +#define PR_MTE_TAG_SHIFT 3 +#define PR_MTE_TAG_MASK (0xffffUL << 3) #define PR_SET_IO_FLUSHER 57 #define PR_GET_IO_FLUSHER 58 -- 2.28.0