hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8S6IA
-------------------------------------------------
This reverts commit 41026c343540e33627e23c8a91ebb679a7c0f89c.
Since commit 7de3ab4c3dd9 ("arm64: introduce binfmt_elf32.c"), whether it is ILP32 or AARCH32_EL0, fs/compat_binfmt.c is not used for arm64. So it is not reasonable to be default y for COMPAT_BINFMT_ELF and revert it to to make all architectures to individually select it.
Signed-off-by: Jinjie Ruan ruanjinjie@huawei.com --- arch/mips/Kconfig | 2 ++ arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/x86/Kconfig | 1 + fs/Kconfig.binfmt | 2 +- 7 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index bc8421859006..41626c53f211 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -3085,6 +3085,7 @@ config MIPS32_O32 select ARCH_WANT_OLD_COMPAT_IPC select COMPAT select MIPS32_COMPAT + select COMPAT_BINFMT_ELF help Select this option if you want to run o32 binaries. These are pure 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of @@ -3097,6 +3098,7 @@ config MIPS32_N32 depends on 64BIT select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select COMPAT + select COMPAT_BINFMT_ELF select MIPS32_COMPAT help Select this option if you want to run n32 binaries. These are diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 68cbe666510a..d8c3e78461c3 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -348,6 +348,7 @@ source "kernel/Kconfig.hz" config COMPAT def_bool y depends on 64BIT + select COMPAT_BINFMT_ELF if BINFMT_ELF
config AUDIT_ARCH def_bool y diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index c253be653876..57e0bd90f40e 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -333,6 +333,7 @@ config COMPAT depends on PPC64 depends on !CC_IS_CLANG || CLANG_VERSION >= 120000 default y if !CPU_LITTLE_ENDIAN + select COMPAT_BINFMT_ELF select ARCH_WANT_OLD_COMPAT_IPC select COMPAT_OLD_SIGACTION
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index ae29e4392664..ad824ffbb159 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -444,6 +444,7 @@ config COMMAND_LINE_SIZE config COMPAT def_bool y prompt "Kernel support for 31 bit emulation" + select COMPAT_BINFMT_ELF if BINFMT_ELF select ARCH_WANT_OLD_COMPAT_IPC select COMPAT_OLD_SIGACTION select HAVE_UID16 diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 49849790e66d..1c76156d0968 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -488,6 +488,7 @@ config COMPAT bool depends on SPARC64 default y + select COMPAT_BINFMT_ELF select HAVE_UID16 select ARCH_WANT_OLD_COMPAT_IPC select COMPAT_OLD_SIGACTION diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 66bfabae8814..edc67cf22dc5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2977,6 +2977,7 @@ config COMPAT_32 config COMPAT def_bool y depends on IA32_EMULATION || X86_X32_ABI + select COMPAT_BINFMT_ELF if BINFMT_ELF
config COMPAT_FOR_U64_ALIGNMENT def_bool y diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt index f5693164ca9a..2b864f363a36 100644 --- a/fs/Kconfig.binfmt +++ b/fs/Kconfig.binfmt @@ -39,7 +39,7 @@ config BINFMT_ELF_KUNIT_TEST compat_binfmt_elf KUnit test is also created.
config COMPAT_BINFMT_ELF - def_bool y + bool depends on COMPAT && BINFMT_ELF select ELFCORE