0064-x86-unwind-Make-CONFIG_UNWINDER_ORC-y-the-default-in.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. From a8ec58033a185db5d8c180d3508d34b8ae3a1c89 Mon Sep 17 00:00:00 2001
  2. From: Josh Poimboeuf <[email protected]>
  3. Date: Fri, 13 Oct 2017 15:02:01 -0500
  4. Subject: [PATCH 064/242] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in
  5. kconfig for 64-bit
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. CVE-2017-5754
  10. The ORC unwinder has been stable in testing so far. Give it much wider
  11. testing by making it the default in kconfig for x86_64. It's not yet
  12. supported for 32-bit, so leave frame pointers as the default there.
  13. Suggested-by: Ingo Molnar <[email protected]>
  14. Signed-off-by: Josh Poimboeuf <[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/9b1237bbe7244ed9cdf8db2dcb1253e37e1c341e.1507924831.git.jpoimboe@redhat.com
  19. Signed-off-by: Ingo Molnar <[email protected]>
  20. (cherry picked from commit fc72ae40e30327aa24eb88a24b9c7058f938bd36)
  21. Signed-off-by: Andy Whitcroft <[email protected]>
  22. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  23. (cherry picked from commit aff8d5169f46ae6ac0eb26a5ba745aaf9afa0704)
  24. Signed-off-by: Fabian Grünbichler <[email protected]>
  25. ---
  26. arch/x86/Kconfig.debug | 33 +++++++++++++++++----------------
  27. 1 file changed, 17 insertions(+), 16 deletions(-)
  28. diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
  29. index 5435a943f894..7d88e9878a75 100644
  30. --- a/arch/x86/Kconfig.debug
  31. +++ b/arch/x86/Kconfig.debug
  32. @@ -358,27 +358,13 @@ config PUNIT_ATOM_DEBUG
  33. choice
  34. prompt "Choose kernel unwinder"
  35. - default UNWINDER_FRAME_POINTER
  36. + default UNWINDER_ORC if X86_64
  37. + default UNWINDER_FRAME_POINTER if X86_32
  38. ---help---
  39. This determines which method will be used for unwinding kernel stack
  40. traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
  41. livepatch, lockdep, and more.
  42. -config UNWINDER_FRAME_POINTER
  43. - bool "Frame pointer unwinder"
  44. - select FRAME_POINTER
  45. - ---help---
  46. - This option enables the frame pointer unwinder for unwinding kernel
  47. - stack traces.
  48. -
  49. - The unwinder itself is fast and it uses less RAM than the ORC
  50. - unwinder, but the kernel text size will grow by ~3% and the kernel's
  51. - overall performance will degrade by roughly 5-10%.
  52. -
  53. - This option is recommended if you want to use the livepatch
  54. - consistency model, as this is currently the only way to get a
  55. - reliable stack trace (CONFIG_HAVE_RELIABLE_STACKTRACE).
  56. -
  57. config UNWINDER_ORC
  58. bool "ORC unwinder"
  59. depends on X86_64
  60. @@ -396,6 +382,21 @@ config UNWINDER_ORC
  61. Enabling this option will increase the kernel's runtime memory usage
  62. by roughly 2-4MB, depending on your kernel config.
  63. +config UNWINDER_FRAME_POINTER
  64. + bool "Frame pointer unwinder"
  65. + select FRAME_POINTER
  66. + ---help---
  67. + This option enables the frame pointer unwinder for unwinding kernel
  68. + stack traces.
  69. +
  70. + The unwinder itself is fast and it uses less RAM than the ORC
  71. + unwinder, but the kernel text size will grow by ~3% and the kernel's
  72. + overall performance will degrade by roughly 5-10%.
  73. +
  74. + This option is recommended if you want to use the livepatch
  75. + consistency model, as this is currently the only way to get a
  76. + reliable stack trace (CONFIG_HAVE_RELIABLE_STACKTRACE).
  77. +
  78. config UNWINDER_GUESS
  79. bool "Guess unwinder"
  80. depends on EXPERT
  81. --
  82. 2.14.2