Commit 5ce1db75 by Tycho Andersen Committed by Stéphane Graber

define PR_SET_MM_MAP & friends if necessary

PR_SET_MM_MAP only went in to the kernel at 3.18 (or 3.19), so we need to define these for kernels before then. If there was an error, the code simply logs the failure and continues on. Also, we can drop the PR_SET_MM_otherstuff contstants since those were dropped in 93525c00. Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent ad60725e
...@@ -51,20 +51,25 @@ ...@@ -51,20 +51,25 @@
#define PR_SET_MM 35 #define PR_SET_MM 35
#endif #endif
#ifndef PR_SET_MM_ARG_START #ifndef PR_SET_MM_MAP
#define PR_SET_MM_ARG_START 8 #define PR_SET_MM_MAP 14
#endif
struct prctl_mm_map {
#ifndef PR_SET_MM_ARG_END uint64_t start_code;
#define PR_SET_MM_ARG_END 9 uint64_t end_code;
#endif uint64_t start_data;
uint64_t end_data;
#ifndef PR_SET_MM_ENV_START uint64_t start_brk;
#define PR_SET_MM_ENV_START 10 uint64_t brk;
#endif uint64_t start_stack;
uint64_t arg_start;
#ifndef PR_SET_MM_ENV_END uint64_t arg_end;
#define PR_SET_MM_ENV_END 11 uint64_t env_start;
uint64_t env_end;
uint64_t *auxv;
uint32_t auxv_size;
uint32_t exe_fd;
};
#endif #endif
#ifndef O_PATH #ifndef O_PATH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment