Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp4086249pxp; Tue, 15 Mar 2022 12:14:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjIFmRyWl4OIQotm694R6E8B2uZf5eJUT4EtC9K1d9+pOJDbsZrGvgl4Ebe6nNaAVSKizf X-Received: by 2002:a05:6402:254e:b0:418:e716:f987 with SMTP id l14-20020a056402254e00b00418e716f987mr8890edb.74.1647371677084; Tue, 15 Mar 2022 12:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647371677; cv=none; d=google.com; s=arc-20160816; b=bkMC/Z66jOEYJQLMqjw7t50/+OFac0ZjYx+waIBTCBxlU0REzYUDbGPRZd0/5lRKNB Y1oc5KbYO3sx1CrJSIdDdfs2qgvL4D6fyp1CF+Sk6H6xhiqXd5X/yifFT9hUoTygSCkD 6o7p2HZVi4ReSPnfK5svMq5ba4sAwclxFFL7jRkxKDGwS+mryW+IU9uxuupTrPPLG6ij wVfp4IQ0pMsZS9btXl4adK3FjB1N4XaR7Mcju5GEBATasGU+zdBN2x9uwqklPqGFMoi5 5jwhaW7uvov3CASxcu46LmU9ozLBT6waKwJC/APXZZTic4pQ9CN2d4kb+b0VEac1sIko Vgag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Yl2fWHagBlaa+dT30ulQqwepkIMn7xa6saT0lFgJx04=; b=vcxeKZxMLSslzvZYPXTgydDd1YWpIb9nh1yxlvHEDDj0gsRBd8diNjPFuWOSP0d/MZ gCSyqzc61QK+FNeIxFtG+D120Qbj48OBPR2zGWomWPA1sE3diNHcsmmLDeQJHXFGAbG1 qmKe1JC6RHYta5AMQOXj3ofwnt/WMn1uNpEhWCkhoKruLRcdHKUYW324bHhtSqsV2QmA dDm5Xk65vG+q8Nwo/PL2XfYweizR6T1cROmCPfH9AzX4eu2HmTe8vHVYS5knCHz5XHgp y39+5ickpkC+c3HWpr+HDgVmvocr1KHbq0M3G4jHIeSF0l0TTg4Yeo2WXMa5NR1KMflF gDhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Gk8VvIlI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=r5VZQBoB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a170906708200b006dbbbe95a2csi5733145ejk.552.2022.03.15.12.14.11; Tue, 15 Mar 2022 12:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Gk8VvIlI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=r5VZQBoB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347205AbiCOKow (ORCPT + 99 others); Tue, 15 Mar 2022 06:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346790AbiCOKov (ORCPT ); Tue, 15 Mar 2022 06:44:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EFFE2A735; Tue, 15 Mar 2022 03:43:39 -0700 (PDT) Date: Tue, 15 Mar 2022 10:43:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647341017; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yl2fWHagBlaa+dT30ulQqwepkIMn7xa6saT0lFgJx04=; b=Gk8VvIlIIltyW7GUgmrAzrf13Yx4BHMq5gRflI7Luxuy1qtsIPGdBNMnAVFF8B23njYArb Ym5escHmMb6fU7NBcW3YGswClcH4sxmuXNBJwSouEGHCLsZ1MDvFhN+tevu0NicLsve3K7 SAU7q/ODmgwrfv9Ou72VgNWy+RtOwkzefqeen9tC683cwVE9tVvhZFq+NnwtIhLuHKIq1c Z7hzJAPOZTxi6OWm8QqUJ02aQd15KK29pjEwWNzYW6/wUuScaXmSm/wjdE2pIreZtW3Ool aQtzTqAkXyAJPgMqzl+4sq8ca5A+avdp2wfMVL6lrnb2aQwb7lKix5tynIQUnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647341017; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yl2fWHagBlaa+dT30ulQqwepkIMn7xa6saT0lFgJx04=; b=r5VZQBoBYta5GUxBreVgJT0AFviWIt3VapKTVGYVU7xdcsHufOo1gLRNfVf07gVG4jLbOh BfFXuNEUrp3MBIBw== From: "tip-bot2 for Nathan Chancellor" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy Cc: Nathan Chancellor , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220314194842.3452-3-nathan@kernel.org> References: <20220314194842.3452-3-nathan@kernel.org> MIME-Version: 1.0 Message-ID: <164734101627.16921.6585192562159418257.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 AuthorDate: Mon, 14 Mar 2022 12:48:42 -07:00 Committer: Peter Zijlstra 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 Signed-off-by: Peter Zijlstra (Intel) 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