From: Tycho Andersen Date: Fri, 6 Nov 2015 20:50:33 +0000 (-0700) Subject: define PR_SET_MM_MAP & friends if necessary X-Git-Tag: lxc-2.0.0.beta1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d2ede581f8ddf84f176ebf73d52b66771a1d91b;p=thirdparty%2Flxc.git 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 93525c00c76b2804c46cf3c275d610ebe71cb4be. Signed-off-by: Tycho Andersen Acked-by: Stéphane Graber --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index d59224364..d9e769d7c 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -51,20 +51,25 @@ #define PR_SET_MM 35 #endif -#ifndef PR_SET_MM_ARG_START -#define PR_SET_MM_ARG_START 8 -#endif - -#ifndef PR_SET_MM_ARG_END -#define PR_SET_MM_ARG_END 9 -#endif - -#ifndef PR_SET_MM_ENV_START -#define PR_SET_MM_ENV_START 10 -#endif - -#ifndef PR_SET_MM_ENV_END -#define PR_SET_MM_ENV_END 11 +#ifndef PR_SET_MM_MAP +#define PR_SET_MM_MAP 14 + +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; +}; #endif #ifndef O_PATH