All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Feijoo <antonio.feijoo@suse.com>
To: Borislav Petkov <bp@alien8.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux regressions mailing list <regressions@lists.linux.dev>,
	lukas.bulwahn@gmail.com, dave.hansen@linux.intel.com,
	hpa@zytor.com, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	tglx@linutronix.de, x86@kernel.org
Subject: Re: [regression] microcode files missing in initramfs imgages from dracut (was Re: [PATCH] x86: Clean up remaining references to CONFIG_MICROCODE_AMD)
Date: Fri, 24 Nov 2023 09:49:27 +0100	[thread overview]
Message-ID: <66f077cf-ff85-44dc-a76a-05d8995ea261@suse.com> (raw)
In-Reply-To: <20231123112013.GAZV81bezsrS6sdJQR@fat_crate.local>

As a side note, complaints about this issue reached the kernel because most
distros out there didn't do their homework, as this patch has been merged
upstream since 6.6-rc1 was released. Fortunately, this problem does not break
the system boot.

As Linus said, the `check_kernel_config` stuff was implemented in 2014 and this
is not the only kernel config option that it's being checked by dracut
(CONFIG_ACPI_TABLE_UPGRADE, CONFIG_ACPI_INITRD_TABLE_OVERRIDE, CONFIG_RD_ZSTD),
although I agree that it's fragile if something changes. But adding in CC the
initramfs list (like you did), would be enough to prepare a simple fix in time.

On 23/11/2023 12.20, Borislav Petkov wrote:
> 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
> 
> ?

The only problem I see in your patch is that we should also remove the
`--early-microcode` option, and dracut will fail if someone pass an option
available since 2013 (5f2c30d9bcd614d546d5c55c6897e33f88b9ab90) that would not
be recognized now (and by failing, I mean it will not build an initramfs if an
unrecognized option is passed).

Please, submit it to https://github.com/dracutdevs/dracut, so more people can
see it and discuss it. Thank you.

> ---
> 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.
> 

Best regards,

-- 
Antonio Álvarez Feijoo
System Boot and Init
SUSE

  reply	other threads:[~2023-11-24  8:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 14:12 [PATCH] x86: Clean up remaining references to CONFIG_MICROCODE_AMD Lukas Bulwahn
2023-08-26 12:10 ` [tip: x86/microcode] x86/microcode: Remove " tip-bot2 for Lukas Bulwahn
2023-11-12 15:03 ` [regression] microcode files missing in initramfs imgages from dracut (was Re: [PATCH] x86: Clean up remaining references to CONFIG_MICROCODE_AMD) Linux regression tracking (Thorsten Leemhuis)
2023-11-12 18:10   ` Borislav Petkov
2023-11-22  9:15     ` Linux regression tracking (Thorsten Leemhuis)
2023-11-22 11:58       ` Borislav Petkov
2023-11-22 13:24         ` [PATCH] x86: Add a "x86" ELF note namespace Borislav Petkov
2023-11-22 14:07           ` Borislav Petkov
2023-11-22 15:34         ` [regression] microcode files missing in initramfs imgages from dracut (was Re: [PATCH] x86: Clean up remaining references to CONFIG_MICROCODE_AMD) Linux regression tracking (Thorsten Leemhuis)
2023-11-22 15:57           ` Borislav Petkov
2023-11-22 20:35             ` Linus Torvalds
2023-11-22 20:51               ` Borislav Petkov
2023-11-22 21:08                 ` Linus Torvalds
2023-11-22 21:35                   ` Borislav Petkov
2023-11-23 11:20                   ` Borislav Petkov
2023-11-24  8:49                     ` Antonio Feijoo [this message]
2023-11-24 12:15                       ` Borislav Petkov
2023-11-24 13:15                         ` Antonio Feijoo
2023-11-24 13:33                           ` Borislav Petkov
2023-11-28 13:17                             ` Borislav Petkov
2023-11-22 13:45       ` Lukas Bulwahn
2023-11-23  4:07   ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66f077cf-ff85-44dc-a76a-05d8995ea261@suse.com \
    --to=antonio.feijoo@suse.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mingo@redhat.com \
    --cc=regressions@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.