Skip to content

Commit bdd15a2

Browse files
Christoph HellwigGreg Ungerer
authored andcommitted
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>
1 parent 1d52dca commit bdd15a2

File tree

12 files changed

+9
-12
lines changed

12 files changed

+9
-12
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ config ARM
3030
select ARCH_USE_BUILTIN_BSWAP
3131
select ARCH_USE_CMPXCHG_LOCKREF
3232
select ARCH_WANT_IPC_PARSE_VERSION
33+
select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
3334
select BUILDTIME_EXTABLE_SORT if MMU
3435
select CLONE_BACKWARDS
3536
select CPU_PM if SUSPEND || CPU_IDLE

arch/arm/include/asm/flat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#include <linux/uaccess.h>
1010

11-
#define flat_argvp_envp_on_stack() 1
12-
1311
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
1412
u32 *addr, u32 *persistent)
1513
{

arch/c6x/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <asm/unaligned.h>
66

7-
#define flat_argvp_envp_on_stack() 0
87
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
98
u32 *addr, u32 *persistent)
109
{

arch/h8300/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
config H8300
33
def_bool y
44
select ARCH_32BIT_OFF_T
5+
select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
56
select BINFMT_FLAT_OLD_ALWAYS_RAM
67
select GENERIC_ATOMIC64
78
select HAVE_UID16

arch/h8300/include/asm/flat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#include <asm/unaligned.h>
1010

11-
#define flat_argvp_envp_on_stack() 1
12-
1311
/*
1412
* on the H8 a couple of the relocations have an instruction in the
1513
* top byte. As there can only be 24bits of address space, we just

arch/m68k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config M68K
77
select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
88
select ARCH_NO_COHERENT_DMA_MMAP if !MMU
99
select ARCH_NO_PREEMPT if !COLDFIRE
10+
select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
1011
select HAVE_IDE
1112
select HAVE_AOUT if MMU
1213
select HAVE_DEBUG_BUGVERBOSE

arch/m68k/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <linux/uaccess.h>
1010

11-
#define flat_argvp_envp_on_stack() 1
1211
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
1312
u32 *addr, u32 *persistent)
1413
{

arch/microblaze/include/asm/flat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
#include <asm/unaligned.h>
1515

16-
#define flat_argvp_envp_on_stack() 0
17-
1816
/*
1917
* Microblaze works a little differently from other arches, because
2018
* of the MICROBLAZE_64 reloc type. Here, a 32 bit address is split

arch/sh/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include <asm/unaligned.h>
1313

14-
#define flat_argvp_envp_on_stack() 0
1514
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
1615
u32 *addr, u32 *persistent)
1716
{

arch/xtensa/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <asm/unaligned.h>
66

7-
#define flat_argvp_envp_on_stack() 0
87
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
98
u32 *addr, u32 *persistent)
109
{

0 commit comments

Comments
 (0)