diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-13 10:08:51 +0300 |
---|---|---|
committer | Greg Ungerer <gerg@kernel.org> | 2019-06-24 02:16:46 +0300 |
commit | bdd15a288492f2f496a904c69c4b332057ae2ef6 (patch) | |
tree | 453e2a0303f4ff9c2b8381a413fe9285a56472d5 /fs/binfmt_flat.c | |
parent | 1d52dca117434eca9c6efc9c22d24e7a341ad903 (diff) | |
download | linux-bdd15a288492f2f496a904c69c4b332057ae2ef6.tar.xz |
binfmt_flat: replace flat_argvp_envp_on_stack with a Kconfig variable
This will eventually allow us to kill the need for an <asm/flat.h> for
many cases.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r-- | fs/binfmt_flat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 3e7f4a6cffa2..a15fdd5d95ed 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -124,14 +124,15 @@ static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start sp -= bprm->envc + 1; sp -= bprm->argc + 1; - sp -= flat_argvp_envp_on_stack() ? 2 : 0; + if (IS_ENABLED(CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK)) + sp -= 2; /* argvp + envp */ sp -= 1; /* &argc */ current->mm->start_stack = (unsigned long)sp & -FLAT_STACK_ALIGN; sp = (unsigned long __user *)current->mm->start_stack; __put_user(bprm->argc, sp++); - if (flat_argvp_envp_on_stack()) { + if (IS_ENABLED(CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK)) { unsigned long argv, envp; argv = (unsigned long)(sp + 2); envp = (unsigned long)(sp + 2 + bprm->argc + 1); |