2019-08-30 19:00:04

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH v6 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

On bigendian ppc64 it is common to have 32bit legacy binaries but much
less so on littleendian.

Signed-off-by: Michal Suchanek <[email protected]>
---
v3: make configurable
---
arch/powerpc/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5bab0bb6b833..b0339e892329 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -264,8 +264,9 @@ config PANIC_TIMEOUT
default 180

config COMPAT
- bool
- default y if PPC64
+ bool "Enable support for 32bit binaries"
+ depends on PPC64
+ default y if !CPU_LITTLE_ENDIAN
select COMPAT_BINFMT_ELF
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT_OLD_SIGACTION
--
2.22.0


2019-08-30 20:26:41

by Christophe Leroy

[permalink] [raw]
Subject: Re: [PATCH v6 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.



Le 30/08/2019 à 20:57, Michal Suchanek a écrit :
> On bigendian ppc64 it is common to have 32bit legacy binaries but much
> less so on littleendian.
>
> Signed-off-by: Michal Suchanek <[email protected]>

Reviewed-by: Christophe Leroy <[email protected]>


> ---
> v3: make configurable
> ---
> arch/powerpc/Kconfig | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 5bab0bb6b833..b0339e892329 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -264,8 +264,9 @@ config PANIC_TIMEOUT
> default 180
>
> config COMPAT
> - bool
> - default y if PPC64
> + bool "Enable support for 32bit binaries"
> + depends on PPC64
> + default y if !CPU_LITTLE_ENDIAN
> select COMPAT_BINFMT_ELF
> select ARCH_WANT_OLD_COMPAT_IPC
> select COMPAT_OLD_SIGACTION
>