Andreas Herrmann 36bf50d769 x86, microcode, AMD: Fix broken ucode patch size check
This issue was recently observed on an AMD C-50 CPU where a patch of
maximum size was applied.

Commit be62adb49294 ("x86, microcode, AMD: Simplify ucode verification")
added current_size in get_matching_microcode(). This is calculated as
size of the ucode patch + 8 (ie. size of the header). Later this is
compared against the maximum possible ucode patch size for a CPU family.
And of course this fails if the patch has already maximum size.

Cc: <stable@vger.kernel.org> [3.3+]
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1344361461-10076-1-git-send-email-bp@amd64.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-08-22 16:10:41 -07:00
..
2012-06-06 11:58:38 +02:00
2011-12-12 14:26:10 -08:00
2012-03-28 18:11:12 +01:00
2011-07-01 10:37:14 +02:00
2012-03-28 18:11:12 +01:00
2012-05-08 14:08:44 +02:00
2012-06-18 10:53:18 +02:00
2012-03-28 18:11:12 +01:00
2012-03-28 18:11:12 +01:00
2012-06-25 13:48:30 +02:00
2012-05-14 11:49:38 +02:00
2011-08-04 16:13:49 -07:00
2012-03-28 18:11:12 +01:00