Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2638187rwb; Thu, 29 Sep 2022 12:55:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HIOVJQ62HWkJdvcaouNPVEkoQH7QwKduDtbm7tcfCXf1IibXhMAqfzKoyoKf++t7CzCoL X-Received: by 2002:a17:907:6e14:b0:782:4659:14c1 with SMTP id sd20-20020a1709076e1400b00782465914c1mr3875171ejc.196.1664481302822; Thu, 29 Sep 2022 12:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664481302; cv=none; d=google.com; s=arc-20160816; b=a26sFog/YbPNcDgf10SBe7N/Isnc7GJ9XU85mFHcViJauYdKVUbxo2VUS1m3HBDjI8 bTTSr4fhWrqxHRtw5gAhjd7uDEE+S3ea5+aUjPxXeR4JkKVT+yStJ/azH/ODP3o1qae7 Sy6F23KXcSvaab4otWFS9eiChb3Ycmtu+5TIWo3FmuQKRT+tQOK1HBdg+dNSG1BteEZc +tjzQVGKZ6IM6c7aypYenISq3X5Tj8Zfj2ltAnshNIj3Qwp2etV0UuI+ddn3aO5HzElw vSwQq4koK65x9WeNZsD14pDjPT6s4CiHC1BX7U4vf1VmjYKp5G+K9kjEEcf72jItm44D b6qQ== 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=kmkU5eKx3bCGNBgsrw/HiECPrMWFtDQ93OEAZ05I5Zw=; b=J/moGAicw8YXFguos0HYKarfvhU0qo/QwCvTVFg4isY3yqB2FUJY07X7Z3ErxitElR EYcUGlIVFX9jvdfXArXY8Q41oNxXuW8zDlEG2uetbrXUjtkcThfy6zYV002x8WJIu6B7 AS5LyUfx+1Lb8TyZNXc1K3D7O3OLwV9KtpEI554kNw6SplP8IZTaU/Oyzfhp5ewrHFhs um7rirvPFa8Tu1NHQrXv86X7HhtWHXgAu4bRkEgCqz0zkIg8uw3eKidvJyW7niH6MfL/ GZAfGNkugJMxjcAiXaIFO48MAk0Xf9BOCUcBsW5G/hR2MRQgPfyom1F62PmbebO2+GgF t9JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=OqOoGfkG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020aa7ca49000000b00453bd1d4247si321429edt.384.2022.09.29.12.54.37; Thu, 29 Sep 2022 12:55:02 -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=@google.com header.s=20210112 header.b=OqOoGfkG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235884AbiI2S25 (ORCPT + 99 others); Thu, 29 Sep 2022 14:28:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235844AbiI2S21 (ORCPT ); Thu, 29 Sep 2022 14:28:27 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0F3143286 for ; Thu, 29 Sep 2022 11:28:26 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id e129so2156029pgc.9 for ; Thu, 29 Sep 2022 11:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=kmkU5eKx3bCGNBgsrw/HiECPrMWFtDQ93OEAZ05I5Zw=; b=OqOoGfkG5celZzk8DoeCB0Z415XFc+acvqmoX8nBDnRxJgZpg8tGcRuwUEs+9xxChk 1Hu9orSfm438RdiaqE5SXGX+unJnOXQ8fweCClM5aky1wIdO63k+1n67zorgWReLZRRz XDDORlnnR5dIjX1/FUHYRduZZtQBcu2RjAxzT1PHhAJZ4xRuZQ0a+bNPlwbBGagY3V9E hsBFGmqWCZ0HoO+Lw7VoOJlgTQHjLePudthZrRONzfmUPWyzXj8DD62qR3aZEB/Q9hD0 kSxdoiY5KvnClKNNNO+8uBUlqZ0RxOaJJasuZIG4SPX1mPDtIORUcCimKvhwMe8iSP/m OkGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=kmkU5eKx3bCGNBgsrw/HiECPrMWFtDQ93OEAZ05I5Zw=; b=pKa9TOOYq2IFX7JCbXjQSIfftv3hfpnpBWGnFEAW3s4rBwKW1pfveJlTqpOe+cBYvR oa18Q8X3UdSJJ2COjoAdp3JLdsbCkd81JAGFlILHi1etMiRD2mLfXkVUUA3fjPj3pGQQ k+su5osq/eRWl908tMQSVPfm6kiDBOF4/f+wT9JiSjqgD21U7xFXEE2So01Fxbsirtud 0fFgXPO7rVzg0i5UbF8Z+IvJlhVumU60Qc75p2N/rkmt0H+LNZAXeobRWG8bosf7nWEO VdXfJHnlxJ633CsaeM+HraSn/CpDaZoh1kfAWj1VdDa3FET0uRqf8h7rdD6Pk+TYmvuU Gi3w== X-Gm-Message-State: ACrzQf01owANYlZ9Yc3F4ft19YBkQsSIYVVVZTOnzrasFoKJA8No6ch/ NT9iC8GYb+vxlCzs5prZIdDaARXz8ur4Q+4+XlH9+w== X-Received: by 2002:a63:e709:0:b0:438:98e8:d1c with SMTP id b9-20020a63e709000000b0043898e80d1cmr4115018pgi.403.1664476105851; Thu, 29 Sep 2022 11:28:25 -0700 (PDT) MIME-Version: 1.0 References: <20220929152010.835906-1-nathan@kernel.org> In-Reply-To: <20220929152010.835906-1-nathan@kernel.org> From: Nick Desaulniers Date: Thu, 29 Sep 2022 11:28:14 -0700 Message-ID: Subject: Re: [PATCH] x86/Kconfig: Drop check for '-mabi=ms' for CONFIG_EFI_STUB To: Nathan Chancellor Cc: Ard Biesheuvel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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, Sep 29, 2022 at 8:20 AM 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 Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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 > -- Thanks, ~Nick Desaulniers