Selaa lähdekoodia

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()
Szabolcs Nagy 4 vuotta sitten
vanhempi
sitoutus
19239cde94
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      include/sys/prctl.h

+ 7 - 0
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