[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2] x86, amd_ucode: Verify max allowed patch size before apply
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@xxxxxxx> 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 3458Out 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |