summaryrefslogtreecommitdiff
path: root/include/sys/prctl.h
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2014-12-16 02:37:33 +0100
committerRich Felker <dalias@aerifal.cx>2014-12-23 01:46:22 -0500
commit11ac2a6e811ff0860c7d3b3daf035dc6748fb4d4 (patch)
treeddbe83cc8a26722de875309ba11fbd38be2df267 /include/sys/prctl.h
parentf90fafea3c5f1acd7b9bc8e720b417e2dba1d92d (diff)
downloadmusl-11ac2a6e811ff0860c7d3b3daf035dc6748fb4d4.tar.gz
musl-11ac2a6e811ff0860c7d3b3daf035dc6748fb4d4.tar.bz2
musl-11ac2a6e811ff0860c7d3b3daf035dc6748fb4d4.tar.xz
musl-11ac2a6e811ff0860c7d3b3daf035dc6748fb4d4.zip
add new prctl command PR_SET_MM_MAP to sys/prctl.h
PR_SET_MM_MAP was introduced as a subcommand for PR_SET_MM in linux v3.18 commit f606b77f1a9e362451aca8f81d8f36a3a112139e the associated struct type is replicated in sys/prctl.h using libc types. example usage: struct prctl_mm_map *p; ... prctl(PR_SET_MM, PR_SET_MM_MAP, p, sizeof *p); the kernel side supported struct size may be queried with the PR_SET_MM_MAP_SIZE subcommand.
Diffstat (limited to 'include/sys/prctl.h')
-rw-r--r--include/sys/prctl.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/sys/prctl.h b/include/sys/prctl.h
index 8cb197c3..9af5b8ae 100644
--- a/include/sys/prctl.h
+++ b/include/sys/prctl.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <stdint.h>
+
#define PR_SET_PDEATHSIG 1
#define PR_GET_PDEATHSIG 2
#define PR_GET_DUMPABLE 3
@@ -80,6 +82,25 @@ extern "C" {
#define PR_SET_MM_ENV_END 11
#define PR_SET_MM_AUXV 12
#define PR_SET_MM_EXE_FILE 13
+#define PR_SET_MM_MAP 14
+#define PR_SET_MM_MAP_SIZE 15
+
+struct prctl_mm_map {
+ uint64_t start_code;
+ uint64_t end_code;
+ uint64_t start_data;
+ uint64_t end_data;
+ uint64_t start_brk;
+ uint64_t brk;
+ uint64_t start_stack;
+ uint64_t arg_start;
+ uint64_t arg_end;
+ uint64_t env_start;
+ uint64_t env_end;
+ uint64_t *auxv;
+ uint32_t auxv_size;
+ uint32_t exe_fd;
+};
#define PR_SET_PTRACER 0x59616d61
#define PR_SET_PTRACER_ANY (-1UL)