0230-UBUNTU-SAUCE-only-attempt-to-use-PCID-in-64-bit-buil.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 3642d7fb8bcab15ab1f82531f8120e22181cd7da Mon Sep 17 00:00:00 2001
  2. From: Andy Whitcroft <[email protected]>
  3. Date: Wed, 20 Dec 2017 13:33:50 +0000
  4. Subject: [PATCH 230/242] UBUNTU: SAUCE: only attempt to use PCID in 64 bit
  5. builds
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. CVE-2017-5754
  10. [[email protected]: need to review if this is still needed with the
  11. latest patches.]
  12. Signed-off-by: Andy Whitcroft <[email protected]>
  13. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  14. (cherry picked from commit babace1d1ac19075498675cd787500cfa24d2b55)
  15. Signed-off-by: Fabian Grünbichler <[email protected]>
  16. ---
  17. arch/x86/kernel/smpboot.c | 2 +-
  18. 1 file changed, 1 insertion(+), 1 deletion(-)
  19. diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
  20. index 6ad8391b9866..398e8324fea4 100644
  21. --- a/arch/x86/kernel/smpboot.c
  22. +++ b/arch/x86/kernel/smpboot.c
  23. @@ -222,7 +222,7 @@ static void notrace start_secondary(void *unused)
  24. * before cpu_init(), SMP booting is too fragile that we want to
  25. * limit the things done here to the most necessary things.
  26. */
  27. - if (boot_cpu_has(X86_FEATURE_PCID))
  28. + if (IS_ENABLED(CONFIG_X86_64) && boot_cpu_has(X86_FEATURE_PCID))
  29. __write_cr4(__read_cr4() | X86_CR4_PCIDE);
  30. cpu_init();
  31. x86_cpuinit.early_percpu_clock_init();
  32. --
  33. 2.14.2