From: Borislav Petkov Date: Fri, 15 Jun 2018 18:48:39 +0000 (+0200) Subject: x86/CPU/AMD: Do not check CPUID max ext level before parsing SMP info X-Git-Tag: v4.1.12-124.31.3~652 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7aaeab5b55e5b6c785e3ccc4fbee697953b3d886;p=users%2Fjedix%2Flinux-maple.git x86/CPU/AMD: Do not check CPUID max ext level before parsing SMP info Old code used to check whether CPUID ext max level is >= 0x80000008 because that last leaf contains the number of cores of the physical CPU. The three functions called there now do not depend on that leaf anymore so the check can go. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Orabug: 28220674 CVE: CVE-2018-3620 (cherry picked from commit 119bff8a9c9bb00116a844ec68be7bc4b1c768f5) Signed-off-by: Mihai Carabas Reviewed-by: Darren Kenny Reviewed-by: Boris Ostrovsky Conflicts: arch/x86/kernel/cpu/amd.c Contextual: we only have two functions --- diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index ff68fddb290f..eaa846fa2733 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -717,11 +717,8 @@ static void init_amd(struct cpuinfo_x86 *c) cpu_detect_cache_sizes(c); - /* Multi core CPU? */ - if (c->extended_cpuid_level >= 0x80000008) { - amd_detect_cmp(c); - srat_detect_node(c); - } + amd_detect_cmp(c); + srat_detect_node(c); init_amd_cacheinfo(c);