[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200610110513.GA22897@gondor.apana.org.au>
Date: Wed, 10 Jun 2020 21:05:13 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
x86-ml <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Greg KH <gregkh@...uxfoundation.org>
Subject: [v2 PATCH] x86/microcode: Do not select FW_LOADER
On Wed, Jun 10, 2020 at 12:48:45PM +0200, Borislav Petkov wrote:
>
> Why isn't *this* in your commit message?
Sure, here it is.
---8<---
The x86 microcode support works just fine without FW_LOADER. In
fact these days most people load them early in boot so FW_LOADER
never gets into the picture anyway.
As almost everyone on x86 needs to enable MICROCODE this by extension
means that FW_LOADER is always built into the kernel even if nothing
uses it. The FW_LOADER system is about two thousand lines long and
contains user-space facing interfaces that could potentially provide
an entry point into the kernel (or beyond).
This patch removes the unnecessary select of FW_LOADER by MICROCODE.
People who need the FW_LOADER capability can still enable it.
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d6104ea8af0..8aac7a65bfbb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1296,7 +1296,6 @@ config MICROCODE
bool "CPU microcode loading support"
default y
depends on CPU_SUP_AMD || CPU_SUP_INTEL
- select FW_LOADER
---help---
If you say Y here, you will be able to update the microcode on
Intel and AMD processors. The Intel support is for the IA32 family,
@@ -1318,7 +1317,6 @@ config MICROCODE_INTEL
bool "Intel microcode loading support"
depends on MICROCODE
default MICROCODE
- select FW_LOADER
---help---
This options enables microcode patch loading support for Intel
processors.
@@ -1330,7 +1328,6 @@ config MICROCODE_INTEL
config MICROCODE_AMD
bool "AMD microcode loading support"
depends on MICROCODE
- select FW_LOADER
---help---
If you select this option, microcode patch loading support for AMD
processors will be enabled.
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 7019d4b2df0c..5524ea15b3df 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -145,7 +145,6 @@ extern struct builtin_fw __end_builtin_fw[];
bool get_builtin_firmware(struct cpio_data *cd, const char *name)
{
-#ifdef CONFIG_FW_LOADER
struct builtin_fw *b_fw;
for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++) {
@@ -155,7 +154,6 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name)
return true;
}
}
-#endif
return false;
}
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists