Skip to content

Commit c8a59a4

Browse files
herbertxsuryasaimadhu
authored andcommitted
x86/microcode: Do not select FW_LOADER
The x86 microcode support works just fine without FW_LOADER. In fact, these days most people load microcode early during 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). Remove the unnecessary select of FW_LOADER by MICROCODE. People who need the FW_LOADER capability can still enable it. [ bp: Massage a bit. ] Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent b3a9e3b commit c8a59a4

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

arch/x86/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ config MICROCODE
12921292
bool "CPU microcode loading support"
12931293
default y
12941294
depends on CPU_SUP_AMD || CPU_SUP_INTEL
1295-
select FW_LOADER
12961295
help
12971296
If you say Y here, you will be able to update the microcode on
12981297
Intel and AMD processors. The Intel support is for the IA32 family,
@@ -1314,7 +1313,6 @@ config MICROCODE_INTEL
13141313
bool "Intel microcode loading support"
13151314
depends on MICROCODE
13161315
default MICROCODE
1317-
select FW_LOADER
13181316
help
13191317
This options enables microcode patch loading support for Intel
13201318
processors.
@@ -1326,7 +1324,6 @@ config MICROCODE_INTEL
13261324
config MICROCODE_AMD
13271325
bool "AMD microcode loading support"
13281326
depends on MICROCODE
1329-
select FW_LOADER
13301327
help
13311328
If you select this option, microcode patch loading support for AMD
13321329
processors will be enabled.

arch/x86/kernel/cpu/microcode/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ extern struct builtin_fw __end_builtin_fw[];
145145

146146
bool get_builtin_firmware(struct cpio_data *cd, const char *name)
147147
{
148-
#ifdef CONFIG_FW_LOADER
149148
struct builtin_fw *b_fw;
150149

151150
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)
155154
return true;
156155
}
157156
}
158-
#endif
159157
return false;
160158
}
161159

0 commit comments

Comments
 (0)