From: Borislav Petkov <bp@alien8.de>
To: Torsten Kaiser <just.for.lkml@googlemail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Jacob Shin <jacob.shin@amd.com>,
Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] x86, microcode: Don't lose error returns in save_microcode_in_initrd()
Date: Wed, 24 Jul 2013 14:57:03 +0200 [thread overview]
Message-ID: <20130724125703.GD30777@pd.tnic> (raw)
In-Reply-To: <20130723225923.352bc442@googlemail.com>
On Tue, Jul 23, 2013 at 10:59:23PM +0200, Torsten Kaiser wrote:
> Don't lose the error return.
> This was lost when early amd microcode loading was added in
> 757885e94a22bcc82beb9b1445c95218cb20ceab
>
> Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>
>
> --- a/arch/x86/kernel/microcode_core_early.c 2013-07-23 19:44:05.509516795 +0200
> +++ b/arch/x86/kernel/microcode_core_early.c 2013-07-23 19:58:34.459509474 +0200
> @@ -127,11 +127,11 @@ int __init save_microcode_in_initrd(void
> switch (c->x86_vendor) {
> case X86_VENDOR_INTEL:
> if (c->x86 >= 6)
> - save_microcode_in_initrd_intel();
> + return save_microcode_in_initrd_intel();
> break;
> case X86_VENDOR_AMD:
> if (c->x86 >= 0x10)
> - save_microcode_in_initrd_amd();
> + return save_microcode_in_initrd_amd();
This one is incomplete: if we really want to hand up the error code, we
need to add a printk to the caller free_initrd_mem() saying that saving
of microcode from the initrd failed.
However, save_microcode_in_initrd_intel() already warns about it in the
error case.
So, actually, I think the warning should be issued by
save_microcode_in_initrd() and this function itself should be made to
return void. And save_microcode_in_initrd_intel() can simply return the
error code without doing the printk.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
prev parent reply other threads:[~2013-07-24 12:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 20:59 [PATCH 2/5] x86, microcode: Don't lose error returns in save_microcode_in_initrd() Torsten Kaiser
2013-07-24 12:57 ` Borislav Petkov [this message]
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=20130724125703.GD30777@pd.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jacob.shin@amd.com \
--cc=johannes.hirte@fem.tu-ilmenau.de \
--cc=just.for.lkml@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox