[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 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@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 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.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.