* FAILED: patch "[PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB" failed to apply to 5.15-stable tree
@ 2022-10-26 15:28 gregkh
2022-10-26 16:34 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2022-10-26 15:28 UTC (permalink / raw)
To: nathan, ardb, bp, ndesaulniers; +Cc: stable
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
Possible dependencies:
33806e7cb8d5 ("x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB")
c6dbd3e5e69c ("x86/mmx_32: Remove X86_USE_3DNOW")
6bf8a55d8344 ("x86: Fix misspelled Kconfig symbols")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 33806e7cb8d50379f55c3e8f335e91e1b359dc7b Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@kernel.org>
Date: Thu, 29 Sep 2022 08:20:10 -0700
Subject: [PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB
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
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.
Fixes: 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org
Link: https://github.com/llvm/llvm-project/commit/d1ad006a8f64bdc17f618deffa9e7c91d82c444d
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6d1879ef933a..67745ceab0db 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1973,7 +1973,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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB" failed to apply to 5.15-stable tree
2022-10-26 15:28 FAILED: patch "[PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB" failed to apply to 5.15-stable tree gregkh
@ 2022-10-26 16:34 ` Nathan Chancellor
2022-10-27 10:29 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2022-10-26 16:34 UTC (permalink / raw)
To: gregkh; +Cc: ardb, bp, ndesaulniers, stable
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
On Wed, Oct 26, 2022 at 05:28:03PM +0200, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 5.15-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> Possible dependencies:
>
> 33806e7cb8d5 ("x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB")
> c6dbd3e5e69c ("x86/mmx_32: Remove X86_USE_3DNOW")
> 6bf8a55d8344 ("x86: Fix misspelled Kconfig symbols")
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From 33806e7cb8d50379f55c3e8f335e91e1b359dc7b Mon Sep 17 00:00:00 2001
> From: Nathan Chancellor <nathan@kernel.org>
> Date: Thu, 29 Sep 2022 08:20:10 -0700
> Subject: [PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB
Attached is a backport that applies to both 5.15 and 5.10. Let me know
if there are any issues.
Cheers,
Nathan
[-- Attachment #2: 0001-x86-Kconfig-Drop-check-for-mabi-ms-for-CONFIG_EFI_ST.patch --]
[-- Type: text/plain, Size: 2278 bytes --]
From c411c8cc183357003fc174a6c89978dd663fba33 Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@kernel.org>
Date: Thu, 29 Sep 2022 08:20:10 -0700
Subject: [PATCH 5.15/5.10] x86/Kconfig: Drop check for -mabi=ms for
CONFIG_EFI_STUB
commit 33806e7cb8d50379f55c3e8f335e91e1b359dc7b upstream.
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
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.
Fixes: 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org
Link: https://github.com/llvm/llvm-project/commit/d1ad006a8f64bdc17f618deffa9e7c91d82c444d
[nathan: Fix conflict due to lack of c6dbd3e5e69c in older trees]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/x86/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 57f5e881791a..0f2234cd8453 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1926,7 +1926,6 @@ config EFI
config EFI_STUB
bool "EFI stub support"
depends on EFI && !X86_USE_3DNOW
- depends on $(cc-option,-mabi=ms) || X86_32
select RELOCATABLE
help
This kernel feature allows a bzImage to be loaded directly
base-commit: bd8a595958a5b02e58cdd6fed82d4ebc77b1988a
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB" failed to apply to 5.15-stable tree
2022-10-26 16:34 ` Nathan Chancellor
@ 2022-10-27 10:29 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-10-27 10:29 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: ardb, bp, ndesaulniers, stable
On Wed, Oct 26, 2022 at 09:34:35AM -0700, Nathan Chancellor wrote:
> On Wed, Oct 26, 2022 at 05:28:03PM +0200, gregkh@linuxfoundation.org wrote:
> >
> > The patch below does not apply to the 5.15-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> >
> > Possible dependencies:
> >
> > 33806e7cb8d5 ("x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB")
> > c6dbd3e5e69c ("x86/mmx_32: Remove X86_USE_3DNOW")
> > 6bf8a55d8344 ("x86: Fix misspelled Kconfig symbols")
> >
> > thanks,
> >
> > greg k-h
> >
> > ------------------ original commit in Linus's tree ------------------
> >
> > From 33806e7cb8d50379f55c3e8f335e91e1b359dc7b Mon Sep 17 00:00:00 2001
> > From: Nathan Chancellor <nathan@kernel.org>
> > Date: Thu, 29 Sep 2022 08:20:10 -0700
> > Subject: [PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB
>
> Attached is a backport that applies to both 5.15 and 5.10. Let me know
> if there are any issues.
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-27 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-26 15:28 FAILED: patch "[PATCH] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB" failed to apply to 5.15-stable tree gregkh
2022-10-26 16:34 ` Nathan Chancellor
2022-10-27 10:29 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox