All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Thomas.Lendacky@amd.com, keir@xen.org,
	Jan Beulich <JBeulich@suse.com>,
	andrew.cooper3@citrix.com, xen-devel@lists.xen.org,
	Suravee.Suthikulpanit@amd.com
Subject: Re: [PATCH V2] x86, amd_ucode: Verify max allowed patch size before apply
Date: Wed, 30 Apr 2014 15:13:44 -0500	[thread overview]
Message-ID: <53615978.8040300@amd.com> (raw)
In-Reply-To: <53604693.7010600@oracle.com>

On 4/29/2014 7:40 PM, Boris Ostrovsky wrote:
> On 04/29/2014 05:33 PM, Aravind Gopalakrishnan wrote:
>> On 4/29/2014 3:02 AM, Jan Beulich wrote:
>>>>>> On 28.04.14 at 18:35, <aravind.gopalakrishnan@amd.com> wrote:
>>>> +static bool_t verify_patch_size(uint32_t patch_size)
>>>> +{
>>>> +    uint32_t max_size;
>>>> +
>>>> +#define F1XH_MPB_MAX_SIZE 2048
>>>> +#define F14H_MPB_MAX_SIZE 1824
>>>> +#define F15H_MPB_MAX_SIZE 4096
>>>> +#define F16H_MPB_MAX_SIZE 3458
>>> Out of mere curiosity - what makes these numbers this odd? The last
>>> one isn't even divisible by 4.
>>
>> I don't know..
>> (+Boris) : any ideas?
>>
>
> No,  I suspect some sort of design constraint. But the number is 
> correct, I can confirm it (for what it's worth).
>
> I am BTW not sure I understand the reason for verifying patch size. If 
> you are concerned about patch/blob corruption then IIRC HW will verify 
> the patch anyway and will refuse to load it if doesn't pass HW's tests.

bkdg's mention something about HW performing some 'consistency checks'. 
A check to verify max_size could very well be one among them..
But just to be on safer side, we can have this extra sanity check in SW 
before applying the patch

-Aravind.

      reply	other threads:[~2014-04-30 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 16:35 [PATCH V2] x86, amd_ucode: Verify max allowed patch size before apply Aravind Gopalakrishnan
2014-04-29  8:02 ` Jan Beulich
2014-04-29 21:33   ` Aravind Gopalakrishnan
2014-04-29 23:56     ` Aravind Gopalakrishnan
2014-04-30  6:07       ` Jan Beulich
2014-04-30 20:20         ` Aravind Gopalakrishnan
2014-04-30  0:40     ` Boris Ostrovsky
2014-04-30 20:13       ` Aravind Gopalakrishnan [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=53615978.8040300@amd.com \
    --to=aravind.gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.