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

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