x86, microcode, AMD: Extend ucode size verification
authorBorislav Petkov <borislav.petkov@amd.com>
Tue, 29 Mar 2011 19:29:54 +0000 (21:29 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 23:53:42 +0000 (16:53 -0700)
commit6373cc665a7f5859bcd7772a45a581ecbc86e2cd
treee310299ae3f5d35fea6096b71e4b9267bd175c8d
parent7dbaa2bf8305ee72a4adacb1661ef89e05fd7ed5
x86, microcode, AMD: Extend ucode size verification

Upstream commit: 44d60c0f5c58c2168f31df9a481761451840eb54

The different families have a different max size for the ucode patch,
adjust size checking to the family we're running on. Also, do not
vzalloc the max size of the ucode but only the actual size that is
passed on from the firmware loader.

Cc: <stable@kernel.org>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/microcode_amd.c