git: 687f618e8ca3 - stable/15 - linux: Add support for PR_SET_VMA to prctl(2)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Jul 2026 21:59:40 UTC
The branch stable/15 has been updated by chuck:
URL: https://cgit.FreeBSD.org/src/commit/?id=687f618e8ca329b98b33e8a40e81a0869436e7ed
commit 687f618e8ca329b98b33e8a40e81a0869436e7ed
Author: Pawel Biernacki <kaktus@FreeBSD.org>
AuthorDate: 2026-05-30 12:15:21 +0000
Commit: Chuck Tuffli <chuck@FreeBSD.org>
CommitDate: 2026-07-08 21:27:06 +0000
linux: Add support for PR_SET_VMA to prctl(2)
Implement dummy support for PR_SET_VMA with PR_SET_VMA_ANON_NAME in
prctl(2). This prevents applications from receiving EINVAL when
attempting to name anonymous memory regions.
(cherry picked from commit a64148e21bb4ac976345cbedbd32942f97f07cc1)
---
sys/compat/linux/linux_misc.c | 7 +++++++
sys/compat/linux/linux_misc.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 1a4eba5f9d39..de40449e6f15 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1814,6 +1814,13 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args)
linux_msg(td, "unsupported prctl PR_SET_PTRACER");
error = EINVAL;
break;
+ case LINUX_PR_SET_VMA:
+ if (args->arg2 != LINUX_PR_SET_VMA_ANON_NAME) {
+ linux_msg(td, "unsupported prctl PR_SET_VMA attr %ju",
+ (uintmax_t)args->arg2);
+ error = EINVAL;
+ }
+ break;
default:
linux_msg(td, "unsupported prctl option %d", args->option);
error = EINVAL;
diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h
index 63ed914afc63..1beab540a0bc 100644
--- a/sys/compat/linux/linux_misc.h
+++ b/sys/compat/linux/linux_misc.h
@@ -60,6 +60,8 @@
#define LINUX_PR_SET_CHILD_SUBREAPER 36
#define LINUX_PR_SET_NO_NEW_PRIVS 38
#define LINUX_PR_SET_PTRACER 1499557217
+#define LINUX_PR_SET_VMA 1398164801
+#define LINUX_PR_SET_VMA_ANON_NAME 0
#define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */