Skip to content

Commit

Permalink
define PR_SET_MM_MAP & friends if necessary
Browse files Browse the repository at this point in the history
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 93525c0.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
Tycho Andersen authored and stgraber committed Nov 6, 2015
1 parent ad60725 commit 5ce1db7
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions src/lxc/utils.c
Expand Up @@ -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
Expand Down

0 comments on commit 5ce1db7

Please sign in to comment.