2023-03-08 19:06:17

by Joey Gouly

[permalink] [raw]
Subject: [PATCH v1 4/4] tools headers UAPI: Sync linux/prctl.h with the kernel sources

From: Peter Xu <[email protected]>

Sync prctl.h after the changes in b507808ebce ("mm: implement memory-deny-write-execute as a prctl")

Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute")
Signed-off-by: Peter Xu <[email protected]>
[joey: added commit message]
Signed-off-by: Joey Gouly <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
---
tools/include/uapi/linux/prctl.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h
index a5e06dcbba13..1312a137f7fb 100644
--- a/tools/include/uapi/linux/prctl.h
+++ b/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

--
2.17.1



2023-03-13 14:14:24

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH v1 4/4] tools headers UAPI: Sync linux/prctl.h with the kernel sources

On Wed, Mar 08, 2023 at 07:04:23PM +0000, Joey Gouly wrote:
> From: Peter Xu <[email protected]>
>
> Sync prctl.h after the changes in b507808ebce ("mm: implement memory-deny-write-execute as a prctl")
>
> Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute")
> Signed-off-by: Peter Xu <[email protected]>
> [joey: added commit message]
> Signed-off-by: Joey Gouly <[email protected]>
> Cc: Catalin Marinas <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Arnaldo Carvalho de Melo <[email protected]>

Acked-by: Catalin Marinas <[email protected]>