blob: 7dd00a4ac54f6c926799c6e9cdb111ed504c1201 [file] [log] [blame]
From: Peter Xu <peterx@redhat.com>
Subject: tools headers UAPI: sync linux/prctl.h with the kernel sources
Date: Wed, 8 Mar 2023 19:04:23 +0000
Sync prctl.h after the changes in b507808ebce ("mm: implement
memory-deny-write-execute as a prctl")
[joey.gouly@arm.com: add commit message]
Link: https://lkml.kernel.org/r/20230308190423.46491-5-joey.gouly@arm.com
Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute")
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexey Izbyshev <izbyshev@ispras.ru>
Cc: Kees Cook <keescook@chromium.org>
Cc: nd <nd@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/tools/include/uapi/linux/prctl.h~tools-headers-uapi-sync-linux-prctlh-with-the-kernel-sources
+++ a/tools/include/uapi/linux/prctl.h
@@ -281,6 +281,12 @@ struct prctl_mm_map {
# define PR_SME_VL_LEN_MASK 0xffff
# define PR_SME_VL_INHERIT (1 << 17) /* inherit across exec */
+/* Memory deny write / execute */
+#define PR_SET_MDWE 65
+# define PR_MDWE_REFUSE_EXEC_GAIN 1
+
+#define PR_GET_MDWE 66
+
#define PR_SET_VMA 0x53564d41
# define PR_SET_VMA_ANON_NAME 0
_