All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.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: Tue, 29 Apr 2014 20:40:51 -0400	[thread overview]
Message-ID: <53604693.7010600@oracle.com> (raw)
In-Reply-To: <53601AB9.8000907@amd.com>

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. 
And if you are thinking about going over the blob's buffer size then we 
already check it in get_ucode_from_buffer_amd().

-boris

  parent reply	other threads:[~2014-04-30  0:40 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 [this message]
2014-04-30 20:13       ` Aravind Gopalakrishnan

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=53604693.7010600@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=aravind.gopalakrishnan@amd.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.