linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/microcode/amd: fix uninitalized structure cp
Date: Tue, 14 Jan 2020 14:08:50 +0000	[thread overview]
Message-ID: <fcbb34b0-203e-0c7c-66cc-a3ae6fa3680c@canonical.com> (raw)
In-Reply-To: <20200114121000.GH31032@zn.tnic>

On 14/01/2020 12:10, Borislav Petkov wrote:
> On Tue, Jan 14, 2020 at 12:03:36PM +0000, Colin Ian King wrote:
>> On 14/01/2020 12:01, Borislav Petkov wrote:
>>> On Tue, Jan 14, 2020 at 11:51:43AM +0000, Colin Ian King wrote:
>>>> Starting at load_ucode_amd_bsp(), this initializes a local cp to zero,
>>>> then passes &cp when it calls __load_ucode_amd() as parameter *ret.  In
>>>> __load_ucode_amd a new local cp is created on the stack and *only* is
>>>> assigned here:
>>>>
>>>>        if (!get_builtin_microcode(&cp, x86_family(cpuid_1_eax)))
>>>>                 cp = find_microcode_in_initrd(path, use_pa);
>>>
>>> Is there any case where cp doesn't get assigned here? Either by
>>> get_builtin_microcode() or by find_microcode_in_initrd()?

If I understand the question, it seems that get_builtin_microcode()
tries to load in the appropriate amd microcode binary from the cpio data
and this can potentially fail if the microcode is not provided for the
specific processor family, so I believe this is a legitimate fix.

Colin


> ^^^^^^^^^^^^^
> 
> You missed this question.
> 
>> OK, I will try to extract every special Tag from Coverity and get this
>> documented when I get some spare cycles.
> 
> tglx just explained to me the whole situation about coverity.
> 
> I'm not asking about extracting special tags but rather about a
> couple of sentences somewhere in Documentation/ explaining what
> Addresses-Coverity* means for the unenlightened among us and how one can
> find further invormation.
> 
> Reportedly, there's even a web page with the tags somewhere...
> 
> Thx.
> 


  reply	other threads:[~2020-01-14 14:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 11:15 [PATCH] x86/microcode/amd: fix uninitalized structure cp Colin King
2020-01-14 11:38 ` Borislav Petkov
2020-01-14 11:51   ` Colin Ian King
2020-01-14 11:58     ` Thomas Gleixner
2020-01-14 12:01     ` Borislav Petkov
2020-01-14 12:03       ` Colin Ian King
2020-01-14 12:10         ` Borislav Petkov
2020-01-14 14:08           ` Colin Ian King [this message]
2020-01-14 15:01             ` Borislav Petkov
2020-01-15  4:25               ` Dan Carpenter
2020-01-15 12:42                 ` Borislav Petkov
2020-01-16  9:44                   ` Colin Ian King

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=fcbb34b0-203e-0c7c-66cc-a3ae6fa3680c@canonical.com \
    --to=colin.king@canonical.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).