Lemme add initramfs@xxxxxxxxxxxxxxx to Cc again. I hope that's the correct ML dracut folks use. On Wed, Nov 22, 2023 at 01:08:41PM -0800, Linus Torvalds wrote: > Yes, I agree that it's not optimal, but I would hate to have some odd > "let's add another ELF note" churn too, for (presumably) increasingly > obscure reasons. Right, my angle with the ELF note is that it is at least something well establshed and other things use it too (Xen, BUILD_SALT, other arches too). > It looks like dracut has been doing this forever, and in fact back in > 2015 apparently had the exact same issue (that never made it to kernel > developers, or at least not to me), when the kernel > CONFIG_MICROCODE_xyz_EARLY config went away, and became just > CONFIG_MICROCODE_xyz. Yap, that was me. I merged the early loader because it didn't make any sense to have a separate thing. > The whole "check kernel config" in dracut seems to go back to 2014, so > it's been that way for almost a decade by now. > > Honestly, I think the right approach may be to just remove the check > again from dracut entirely - the intent seems to be to make the initrd > smaller when people don't support microcode updates, but does that > ever actually *happen*? That thought also crossed my mind. With the mitigations sh*te, you basically must build in microcode. Lemme cook up a dracut patch for this tomorrow and see what happens. > 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. Yap, exactly. > I guess we on the kernel side could help with "make install" etc, but > we've (intentionally) tried to insulate us from distros having > distro-specific installkernel scripts, so we don't really haev a good > way to pass information down to the installkernel side. > > It *would* make sense if we just had some actual arguments we might > pass down. Right now we just do > > exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map > "${INSTALL_PATH}" > > so basically the only argument we pass down is that INSTALL_PATH > (which is just "/boot" by default). Right, and on debian they run initramfs-tools as part of a post-installation step at the end of /sbin/installkernel which could then pass in more configuration info. Yap, that could be one way to do it. We could document it in scripts/install.sh or somewhere more prominent so that tools can look it up. Yap, all better ideas than parsing .config. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette