Commit e7623003 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Hongbo Li
Browse files

arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+

stable inclusion
from stable-v5.10.23
commit 7215d7742daf4c036567f03c647738e269d6a943
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4L4
CVE: CVE-2023-52750

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7215d7742daf4c036567f03c647738e269d6a943

--------------------------------

commit e9c6deee upstream

Similar to commit 28187dc8 ("ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN
depends on !LD_IS_LLD"), ld.lld prior to 13.0.0 does not properly
support aarch64 big endian, leading to the following build error when
CONFIG_CPU_BIG_ENDIAN is selected:

ld.lld: error: unknown emulation: aarch64linuxb

This has been resolved in LLVM 13. To avoid errors like this, only allow
CONFIG_CPU_BIG_ENDIAN to be selected if using ld.bfd or ld.lld 13.0.0
and newer.

While we are here, the indentation of this symbol used spaces since its
introduction in commit a872013d ("arm64: kconfig: allow
CPU_BIG_ENDIAN to be selected"). Change it to tabs to be consistent with
kernel coding style.

Link: https://github.com/ClangBuiltLinux/linux/issues/380
Link: https://github.com/ClangBuiltLinux/linux/issues/1288
Link: https://github.com/llvm/llvm-project/commit/7605a9a009b5fa3bdac07e3131c8d82f6d08feb7
Link: https://github.com/llvm/llvm-project/commit/eea34aae2e74e9b6fbdd5b95f479bc7f397bf387


Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20210209005719.803608-1-nathan@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:
	arch/arm64/Kconfig
[lhb: adjust context]
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
parent 03933bd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment