From: "tip-bot2 for Nathan Chancellor" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Nathan Chancellor <nathan@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/core] x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
Date: Tue, 15 Mar 2022 10:43:36 -0000 [thread overview]
Message-ID: <164734101627.16921.6585192562159418257.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220314194842.3452-3-nathan@kernel.org>
The following commit has been merged into the x86/core branch of tip:
Commit-ID: aaeed6ecc1253ce1463fa1aca0b70a4ccbc9fa75
Gitweb: https://git.kernel.org/tip/aaeed6ecc1253ce1463fa1aca0b70a4ccbc9fa75
Author: Nathan Chancellor <nathan@kernel.org>
AuthorDate: Mon, 14 Mar 2022 12:48:42 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 15 Mar 2022 10:32:48 +01:00
x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
There are two outstanding issues with CONFIG_X86_X32_ABI and
llvm-objcopy, with similar root causes:
1. llvm-objcopy does not properly convert .note.gnu.property when going
from x86_64 to x86_x32, resulting in a corrupted section when
linking:
https://github.com/ClangBuiltLinux/linux/issues/1141
2. llvm-objcopy produces corrupted compressed debug sections when going
from x86_64 to x86_x32, also resulting in an error when linking:
https://github.com/ClangBuiltLinux/linux/issues/514
After commit 41c5ef31ad71 ("x86/ibt: Base IBT bits"), the
.note.gnu.property section is always generated when
CONFIG_X86_KERNEL_IBT is enabled, which causes the first issue to become
visible with an allmodconfig build:
ld.lld: error: arch/x86/entry/vdso/vclock_gettime-x32.o:(.note.gnu.property+0x1c): program property is too short
To avoid this error, do not allow CONFIG_X86_X32_ABI to be selected when
using llvm-objcopy. If the two issues ever get fixed in llvm-objcopy,
this can be turned into a feature check.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220314194842.3452-3-nathan@kernel.org
---
arch/x86/Kconfig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index b903bfc..0f0672d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2864,6 +2864,11 @@ config IA32_AOUT
config X86_X32_ABI
bool "x32 ABI for 64-bit mode"
depends on X86_64
+ # llvm-objcopy does not convert x86_64 .note.gnu.property or
+ # compressed debug sections to x86_x32 properly:
+ # https://github.com/ClangBuiltLinux/linux/issues/514
+ # https://github.com/ClangBuiltLinux/linux/issues/1141
+ depends on $(success,$(OBJCOPY) --version | head -n1 | grep -qv llvm)
help
Include code to run binaries for the x32 native 32-bit ABI
for 64-bit processors. An x32 process gets access to the
next prev parent reply other threads:[~2022-03-15 10:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 19:48 [PATCH 0/2] x86: Avoid CONFIG_X86_X32_ABI=y with llvm-objcopy Nathan Chancellor
2022-03-14 19:48 ` Nathan Chancellor
2022-03-14 19:48 ` [PATCH 1/2] x86: Remove toolchain check for X32 ABI capability Nathan Chancellor
2022-03-14 19:48 ` Nathan Chancellor
2022-03-15 10:43 ` [tip: x86/core] " tip-bot2 for Masahiro Yamada
2022-03-14 19:48 ` [PATCH 2/2] x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy Nathan Chancellor
2022-03-14 19:48 ` Nathan Chancellor
2022-03-15 10:43 ` tip-bot2 for Nathan Chancellor [this message]
2022-03-14 20:13 ` [PATCH 0/2] x86: Avoid " Peter Zijlstra
2022-03-14 20:13 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164734101627.16921.6585192562159418257.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.