0059-x86-boot-Annotate-verify_cpu-as-a-callable-function.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Josh Poimboeuf <[email protected]>
  3. Date: Mon, 18 Sep 2017 21:43:34 -0500
  4. Subject: [PATCH] x86/boot: Annotate verify_cpu() as a callable function
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5754
  9. verify_cpu() is a callable function. Annotate it as such.
  10. Signed-off-by: Josh Poimboeuf <[email protected]>
  11. Cc: Andy Lutomirski <[email protected]>
  12. Cc: Boris Ostrovsky <[email protected]>
  13. Cc: Jiri Slaby <[email protected]>
  14. Cc: Juergen Gross <[email protected]>
  15. Cc: Linus Torvalds <[email protected]>
  16. Cc: Peter Zijlstra <[email protected]>
  17. Cc: Thomas Gleixner <[email protected]>
  18. Link: http://lkml.kernel.org/r/293024b8a080832075312f38c07ccc970fc70292.1505764066.git.jpoimboe@redhat.com
  19. Signed-off-by: Ingo Molnar <[email protected]>
  20. (cherry picked from commit e93db75a0054b23a874a12c63376753544f3fe9e)
  21. Signed-off-by: Andy Whitcroft <[email protected]>
  22. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  23. (cherry picked from commit 48a432c46026f864e194cdf9a8133e7c9109274e)
  24. Signed-off-by: Fabian Grünbichler <[email protected]>
  25. ---
  26. arch/x86/kernel/verify_cpu.S | 3 ++-
  27. 1 file changed, 2 insertions(+), 1 deletion(-)
  28. diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
  29. index 014ea59aa153..3d3c2f71f617 100644
  30. --- a/arch/x86/kernel/verify_cpu.S
  31. +++ b/arch/x86/kernel/verify_cpu.S
  32. @@ -33,7 +33,7 @@
  33. #include <asm/cpufeatures.h>
  34. #include <asm/msr-index.h>
  35. -verify_cpu:
  36. +ENTRY(verify_cpu)
  37. pushf # Save caller passed flags
  38. push $0 # Kill any dangerous flags
  39. popf
  40. @@ -139,3 +139,4 @@ verify_cpu:
  41. popf # Restore caller passed flags
  42. xorl %eax, %eax
  43. ret
  44. +ENDPROC(verify_cpu)
  45. --
  46. 2.14.2