public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Gabriel C <nix.or.die@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Builtin microcode does nothing..
Date: Sat, 21 May 2016 09:51:18 +0200	[thread overview]
Message-ID: <20160521075118.GB8293@pd.tnic> (raw)
In-Reply-To: <86dacf1e-83ca-8dd9-c9b4-513c1e40dd2a@gmail.com>

On Sat, May 21, 2016 at 04:59:15AM +0200, Gabriel C wrote:
> Should this check not be the other way around ?

Actually, I've changed it to this:

        /* try built-in microcode first */
        if (load_builtin_intel_microcode(&cd))
                /*
                 * clear start as we might've gotten an initrd too supplied by
                 * the boot loader, by mistake or simply forgotten there. That's
                 * fine, we ignore it since we've found builtin microcode.
                 */
                start = 0;
        else {
#ifdef CONFIG_BLK_DEV_INITRD
                static __initdata char ucode_name[] = "kernel/x86/microcode/GenuineIntel.bin";
                char *p = IS_ENABLED(CONFIG_X86_32) ? (char *)__pa_nodebug(ucode_name)
                                                    : ucode_name;

                cd = find_cpio_data(p, (void *)start, size, NULL);
                if (!cd.data)
#endif
                        return UCODE_ERROR;
        }

so we're trying the built-in microcode first.

Why, you ask?

Well, I'm following the intention here - the user has gone the length
and has explicitly configured builtin microcode into the kernel and
therefore we're looking for it first.

If we don't find it, we fall back to initrd. This way, even if you have
an initrd forgotten in the bootloader, we ignore it.

I'll ping you once I'm done testing here.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

  reply	other threads:[~2016-05-21  7:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 10:08 Builtin microcode does nothing Gabriel C
2016-05-20 10:23 ` Borislav Petkov
2016-05-20 16:03 ` Gabriel C
2016-05-21  0:20 ` Gabriel C
2016-05-21  2:59   ` Gabriel C
2016-05-21  7:51     ` Borislav Petkov [this message]
2016-05-25  9:31       ` Borislav Petkov
2016-05-25 13:48         ` Jim Bos
2016-05-25 14:57           ` Borislav Petkov
2016-05-25 21:29         ` Gabriel C
2016-05-25 21:38           ` Borislav Petkov
2016-05-25 21:50             ` Gabriel C
2016-05-25 23:36               ` Gabriel C
2016-05-26 10:03                 ` Borislav Petkov
2016-05-26 11:52                   ` Gabriel C
2016-05-26 12:46                     ` Borislav Petkov
2016-06-03  8:02                       ` Borislav Petkov
2016-06-04  0:37                         ` Gabriel C
2016-06-04  6:35                           ` Borislav Petkov
2016-05-21  7:45   ` Borislav Petkov
     [not found] <CAEJqkgjFWak5fUc_zR4v-BDgAnjU0NtRfUDDPaEVGjjbEZoqUQ@mail.gmail.com>
2016-05-20  8:36 ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2016-05-20  0:55 Gabriel C

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=20160521075118.GB8293@pd.tnic \
    --to=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@gmail.com \
    /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