summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2019-12-22 10:51:37 +0000
committerRich Felker <dalias@aerifal.cx>2019-12-30 18:14:08 -0500
commit5675aaa5595619135baf33923de52a44307af9fb (patch)
treec63ddbe606d871b7a118046287a4ba4f6185f477
parentd95ead261e25282192e2291411740b94c2c76db3 (diff)
downloadmusl-5675aaa5595619135baf33923de52a44307af9fb.tar.gz
sys/prctl.h: add PR_*_TAGGED_ADDR_* from linux v5.4
per thread prctl commands to relax the syscall abi such that top bits of user pointers are ignored in the kernel. this allows the use of those bits by hwasan or by mte to color pointers and memory on aarch64: linux commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d arm64: Introduce prctl() options to control the tagged user addresses ABI
-rw-r--r--include/sys/prctl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sys/prctl.h b/include/sys/prctl.h
index 07f0d73d..d9c846e9 100644
--- a/include/sys/prctl.h
+++ b/include/sys/prctl.h
@@ -154,6 +154,10 @@ struct prctl_mm_map {
#define PR_PAC_APDBKEY (1UL << 3)
#define PR_PAC_APGAKEY (1UL << 4)
+#define PR_SET_TAGGED_ADDR_CTRL 55
+#define PR_GET_TAGGED_ADDR_CTRL 56
+#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
+
int prctl (int, ...);
#ifdef __cplusplus