[LTP] [PATCH v8 4/5] lapi/prctl: add more fallback definitions
Andrea Cervesato
andrea.cervesato@suse.de
Fri Sep 4 09:41:22 CEST 2026
From: Andrea Cervesato <andrea.cervesato@suse.com>
Add the following fallback definitions:
- PR_SET_MM
- PR_SET_MM_MAP
- struct prctl_mm_map
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
configure.ac | 2 ++
include/lapi/prctl.h | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/configure.ac b/configure.ac
index 19fc5e1b8..052b83e04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,8 @@ AC_CHECK_TYPES([struct fsxattr],,,[#include <linux/fs.h>])
AC_CHECK_TYPES([struct logical_block_metadata_cap],,,[#include <linux/fs.h>])
+AC_CHECK_TYPES([struct prctl_mm_map],,,[#include <sys/prctl.h>])
+
AC_CHECK_TYPES([struct sockaddr_vm],,,[
#include <sys/socket.h>
#include <linux/vm_sockets.h>
diff --git a/include/lapi/prctl.h b/include/lapi/prctl.h
index 8d3ef5c32..3394a8581 100644
--- a/include/lapi/prctl.h
+++ b/include/lapi/prctl.h
@@ -7,7 +7,9 @@
#ifndef LAPI_PRCTL_H__
#define LAPI_PRCTL_H__
+#include <stdint.h>
#include <sys/prctl.h>
+#include "config.h"
#ifndef PR_SET_NAME
# define PR_SET_NAME 15
@@ -59,4 +61,26 @@
# define PR_SET_SPECULATION_CTRL 53
#endif
+#ifndef PR_SET_MM
+# define PR_SET_MM 35
+#endif
+
+#ifndef PR_SET_MM_MAP
+# define PR_SET_MM_MAP 14
+#endif
+
+#ifndef HAVE_STRUCT_PRCTL_MM_MAP
+struct prctl_mm_map {
+ uint64_t start_code, end_code;
+ uint64_t start_data, end_data;
+ uint64_t start_brk, brk;
+ uint64_t start_stack;
+ uint64_t arg_start, arg_end;
+ uint64_t env_start, env_end;
+ uint64_t *auxv;
+ uint32_t auxv_size;
+ uint32_t exe_fd;
+};
+#endif
+
#endif /* LAPI_PRCTL_H__ */
--
2.51.0
More information about the ltp
mailing list