[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231123112013.GAZV81bezsrS6sdJQR@fat_crate.local>
Date: Thu, 23 Nov 2023 12:20:13 +0100
From: Borislav Petkov <bp@...en8.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Antonio Alvarez Feijoo <antonio.feijoo@...e.com>
Cc: Linux regressions mailing list <regressions@...ts.linux.dev>,
lukas.bulwahn@...il.com, dave.hansen@...ux.intel.com,
hpa@...or.com, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org, mingo@...hat.com, tglx@...utronix.de,
x86@...nel.org
Subject: Re: [regression] microcode files missing in initramfs imgages from
dracut (was Re: [PATCH] x86: Clean up remaining references to
CONFIG_MICROCODE_AMD)
Adding Antonio who did that last fix to dracut:
6c80408c8644 ("fix(dracut.sh): remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL]")
On Wed, Nov 22, 2023 at 01:08:41PM -0800, Linus Torvalds wrote:
> There are dracut command lines, like "--early-microcode" and
> "--no-early-microcode", so people who really want to save space could
> just force it that way. Doing the CONFIG_xyz check seems broken.
>
> But that's for the dracut people to worry about.
Yeah, I guess something like this below.
Antonio, how about something like the totally untested thing below?
dracut would simply always build in microcode - this is the majority of
the setups anyway - and people who want to save space, do:
--no-early-microcode
?
---
diff --git a/dracut.sh b/dracut.sh
index 3b292910f324..c0a88b083f8e 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1561,20 +1561,16 @@ fi
if [[ $early_microcode == yes ]]; then
if [[ $hostonly ]]; then
- if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
- check_kernel_config CONFIG_MICROCODE || unset early_microcode
- else
+ if [[ $(get_cpu_vendor) != "AMD" && $(get_cpu_vendor) != "Intel" ]]; then
unset early_microcode
fi
- else
- ! check_kernel_config CONFIG_MICROCODE \
- && unset early_microcode
fi
+
# Do not complain on non-x86 architectures as it makes no sense
case "${DRACUT_ARCH:-$(uname -m)}" in
x86_64 | i?86)
[[ $early_microcode != yes ]] \
- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"
+ && dwarn "Disabling early microcode, unsupported configuration"
;;
*) ;;
esac
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists