From: Robert Swiecki Date: Thu, 19 Oct 2017 11:11:41 +0000 (+0200) Subject: subproc: comments around new proc stack X-Git-Tag: 2.2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94e593eb68e158019078fa9bfd31ec84e1d00859;p=platform%2Fupstream%2Fnsjail.git subproc: comments around new proc stack --- diff --git a/subproc.c b/subproc.c index 5d98eda..d843535 100644 --- a/subproc.c +++ b/subproc.c @@ -398,9 +398,11 @@ static bool subprocInitParent(struct nsjconf_t* nsjconf, pid_t pid, int pipefd) return true; } -/* Will be used inside the child process only, so it's safe to have it in BSS */ -static uint8_t subprocCloneStack[128 * 1024] - __attribute__((aligned(__BIGGEST_ALIGNMENT__))); /* 128 KiB */ +/* + * Will be used inside the child process only, so it's safe to have it in BSS. + * Some CPU archs (e.g. aarch64) must have it aligned. Size: 128 KiB (/2) + */ +static uint8_t subprocCloneStack[128 * 1024] __attribute__((aligned(__BIGGEST_ALIGNMENT__))); /* Cannot be on the stack, as the child's stack pointer will change after clone() */ static __thread jmp_buf env;