Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2304938rwb; Thu, 29 Sep 2022 08:35:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Q3SNEF1r3dAyZqX0ZWvVfRTq7RQ9MLQSL3hRhuW2BZMGlf617oFoXcT7F05VvsG6eCQOU X-Received: by 2002:a63:1e10:0:b0:439:3c93:25ab with SMTP id e16-20020a631e10000000b004393c9325abmr3466857pge.317.1664465705477; Thu, 29 Sep 2022 08:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664465705; cv=none; d=google.com; s=arc-20160816; b=MuoxfP4A8d3HL5rtrFfENsRqrbTs7PLGuNrNwjGyHndE6pXrj3KOhQmEpvnb6dMoJk 2kRlX5Sc+TzmokY349z00smKju0vB90bCUjCEd+GgPv++Db0qivKfWKbIIGc9D3jk1fG s5RWwrf6no3QlYZfbljYnBUmXcGeeusguEkpfx4Rf/d7NahEr4TzaDFYd2Ro2BMaDFUH ne2fY0EiIoMSEUheEmrsNXqGi3MmQoXaW+VbKq0Qsa54+oQoQ95r4CbTN40p1kZqXpj9 VcJHLL/IgfhCnI/k8bMww1dLOvBUlpfKR3RuNGjk+93Ys2hPfihwck6j0iH04i9kQheN 2MYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CG9wRYqz3RI1Ho+tBzniPW4o8eKtRJZNxNNHERXWtqg=; b=rxDQHjRanVCkW9cUTzu/hbKhvqiglvu09Aey3tLlrma2ySXKerWil3tqC8Cnqh44Qv 62CSqNOvFdpkeXnqSwam1XkKOUDSBveB/qpFy9dZnH4rCcy2WDeNbFwUU13CEwb0ibk7 ApL0xz5cKCoV5wn7eEEDpdSDgdrkm24SWzIHNPcetMPj0vJR/Ast6MSjfrF+tjs2PukE D97J6MYMLbBfuNJmE+QpcRk3AlNQ3+CXz4Y1VEn1hNf2CVzjmkp2ikYnI1c+DMzzB9gn 4hICl0D23oRhviR7eqvc6kVuHOlRuQqh8G9+14FIn51TQs7pzOWKcsULOZIqRdGnue8S P7xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="mv/lusf0"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a170902748200b00178ac4e67cfsi26214pll.232.2022.09.29.08.34.54; Thu, 29 Sep 2022 08:35:05 -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=@kernel.org header.s=k20201202 header.b="mv/lusf0"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235840AbiI2PUz (ORCPT + 99 others); Thu, 29 Sep 2022 11:20:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235884AbiI2PUr (ORCPT ); Thu, 29 Sep 2022 11:20:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E4E5F12E; Thu, 29 Sep 2022 08:20:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9EB50B824F2; Thu, 29 Sep 2022 15:20:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 876D1C433C1; Thu, 29 Sep 2022 15:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664464828; bh=bZtdd37VqJjCVyqVFWFxsZ1BmVYfv83mHcIlp+XAedo=; h=From:To:Cc:Subject:Date:From; b=mv/lusf06cppsXLB1un/psyiQzzVLUBTz6IO19L2CrVFkHsesGteiNFIRIOlWQ2tX E1osPvpkt3Hr6PGTXzK8DdQMbuqLR8gcMUBuxBVYPdeaKHZlCFl0azV+M+ciFeaRjg Ef4Ere4bkba5NC/M38UmWVBhT7m3GEreGfbHfdDblfh0a2Tqhy0yt41pM69LIPHnJB fmG6x6pfYVZbqdFiPGGKdTsDE5bf8Kyl2GfgukRoso4JEzmWpAzs3NxLUab8HuVoav 5svSoL/hRnxUliuVRqDkBB1gLBlhZkkeRPnd2p8LTMUZWR9c5jsWBOC3o+/ClwUkEq o84pVud99QujA== From: Nathan Chancellor To: Ard Biesheuvel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , stable@vger.kernel.org Subject: [PATCH] x86/Kconfig: Drop check for '-mabi=ms' for CONFIG_EFI_STUB Date: Thu, 29 Sep 2022 08:20:10 -0700 Message-Id: <20220929152010.835906-1-nathan@kernel.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 A recent change in LLVM made CONFIG_EFI_STUB unselectable because it no longer pretends to support '-mabi=ms', breaking the dependency in Kconfig. Lack of CONFIG_EFI_STUB can prevent kernels from booting via EFI in certain circumstances. This check was added by commit 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi") to ensure that '__attribute__((ms_abi))' was available, as '-mabi=ms' is not actually used in any cflags. According to the GCC documentation, this attribute has been supported since GCC 4.4.7. The kernel currently requires GCC 5.1 so this check is not necessary; even when that change landed in 5.6, the kernel required GCC 4.9 so it was unnecessary then as well. Clang supports '__attribute__((ms_abi))' for all versions that are supported for building the kernel so no additional check is needed. Remove the 'depends on' line altogether to allow CONFIG_EFI_STUB to be selected when CONFIG_EFI is enabled, regardless of compiler. Cc: stable@vger.kernel.org Fixes: 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi") Link: https://github.com/ClangBuiltLinux/linux/issues/1725 Link: https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Function-Attributes.html Link: https://github.com/llvm/llvm-project/commit/d1ad006a8f64bdc17f618deffa9e7c91d82c444d Signed-off-by: Nathan Chancellor --- arch/x86/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f9920f1341c8..81012154d9ed 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1956,7 +1956,6 @@ config EFI config EFI_STUB bool "EFI stub support" depends on EFI - depends on $(cc-option,-mabi=ms) || X86_32 select RELOCATABLE help This kernel feature allows a bzImage to be loaded directly base-commit: f76349cf41451c5c42a99f18a9163377e4b364ff -- 2.37.3