Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4664193rwi; Mon, 17 Oct 2022 09:05:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LMCy/qhbPh2FUTSwB9Poo+cn3OVNkiIfkOplucxqcFf+mFwnmwew3FGjT9wFfpnieYX0+ X-Received: by 2002:a17:907:7f25:b0:78d:e76a:ef18 with SMTP id qf37-20020a1709077f2500b0078de76aef18mr9109799ejc.378.1666022707833; Mon, 17 Oct 2022 09:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666022707; cv=none; d=google.com; s=arc-20160816; b=0b9ZRmPxyf4WJZ3eM/BL7YLSrIJ/8atF36bcNE0LqaRVBceHvNQ+bjzUJ1EVdFODDZ hMK3WeGZqfN/JZWctaCzHoP/ulAKCrR88faI5tzV1y2DPX+e5YTymfAKGfNSEbL2nDbq /oM90HyC8OD+nGLMe24/pPATff99wBC/dZU1+qgtoPmfoTQYoAEDAWQF/Pj/Mtj98/QT 6GWBAhB9O6mw9LQGa9plrzhfVGmR8o7iSFh956lA/5C0wAA0upDA4k7lowNomv48t46d cjhQrOn6lOxhULoFoWOiHtGK9/Qc5tn/8BHH4h3esphwKwFSvGjcO2FSwx61ym6AHpky b4XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6x6M5vduTN+qNvB2n3rfS47IA433tOvvXXTBn1KPEQ4=; b=hHgjb8rELXZlU82hPuMI/GgZU9wua4YH8y71+6pgnoYbhd2FGQtPd1QxiKA3XLihVe H4qb0tdU3u9dW7hPp4oHAGSm6DMaCYAd+gVibeLbgZyYM0hjv4EZq9v2Z+9LJ0sweKKv 8WFgo8bo9gwtyCDXsa9wsGwxaHR+RCc+1VYl9A5exLbpOBQh1xZxNkjbKGbdJxm++C3K 8QdSi5EEZ5UEAkoEh1d8IfzKbHwF+DZX54EdinJUU0meeeF2UPm66bHdpChumsQKXmSe Xp6tOl0eu2Gt4zGqfiKvr5R4d8ZwDTTNX+UTc/yiD19dpuMi9q0sNJUrGghPuXhesykv +HOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AYSVM4vw; 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 ec12-20020a0564020d4c00b00459779478absi7961170edb.186.2022.10.17.09.04.22; Mon, 17 Oct 2022 09:05:07 -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=AYSVM4vw; 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 S229920AbiJQPqP (ORCPT + 99 others); Mon, 17 Oct 2022 11:46:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbiJQPqN (ORCPT ); Mon, 17 Oct 2022 11:46:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBEA0FD3F; Mon, 17 Oct 2022 08:46:12 -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 743E1B81913; Mon, 17 Oct 2022 15:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27D8FC4347C; Mon, 17 Oct 2022 15:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666021570; bh=9c9EEzyY7oUq22Pd8vm1w2MFf4GstXJ90YPs3mnWmLo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AYSVM4vwMV3llm4rCDTm0OzgGQO40L+/twQp/M5dsO8yIR6g3EMA4DmOdFaNGtODx TTexZOultQS63kRoGHhk6Ck0nSF1crSdh6LzxIaqA/U3VQNifxlXcN+agm46PKxvnn DBmVyT13PdRIopBEGqE0Ui1h6AX0IOePMK8W2L2p7j9zDAglKigPF8G6+qMpKCAtpO WNT9PdO8COcagSErSVSLPJ5xYxfkqcwgXTILM1y39NRBM4IFwuF2SUsS0iJyFSfBjf DDdXTImzmTsPjC5+4JOJeLJNwcM2BrJaWhZ+Ccbbz2UkC0pzTYJAThtC3yc/OMSr3p W1vSeu37OAM7g== Received: by mail-lj1-f174.google.com with SMTP id r22so14431853ljn.10; Mon, 17 Oct 2022 08:46:10 -0700 (PDT) X-Gm-Message-State: ACrzQf1KKyt1AOR2ktHLdZLw50dly/KhO9c389yM2Sv551Av5Op3VOLh aKs8LeLLNHJBzcoS3F2OOhw+wV+Cp0c+tp1WzzQ= X-Received: by 2002:a2e:b635:0:b0:26e:989e:438f with SMTP id s21-20020a2eb635000000b0026e989e438fmr3934831ljn.189.1666021568087; Mon, 17 Oct 2022 08:46:08 -0700 (PDT) MIME-Version: 1.0 References: <20220929152010.835906-1-nathan@kernel.org> In-Reply-To: <20220929152010.835906-1-nathan@kernel.org> From: Ard Biesheuvel Date: Mon, 17 Oct 2022 17:45:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/Kconfig: Drop check for '-mabi=ms' for CONFIG_EFI_STUB To: Nathan Chancellor Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 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 On Thu, 29 Sept 2022 at 17:20, Nathan Chancellor wrote: > > 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 Acked-by: Ard Biesheuvel I can take this as a EFI fix as well. > --- > 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 >