1. 21 2月, 2022 1 次提交
  2. 14 12月, 2021 1 次提交
  3. 17 11月, 2021 1 次提交
  4. 30 6月, 2021 1 次提交
  5. 18 6月, 2021 1 次提交
  6. 18 5月, 2021 1 次提交
  7. 15 5月, 2021 1 次提交
  8. 14 5月, 2021 1 次提交
  9. 12 5月, 2021 1 次提交
  10. 09 12月, 2020 3 次提交
  11. 13 8月, 2020 1 次提交
  12. 29 7月, 2020 1 次提交
  13. 06 7月, 2020 1 次提交
  14. 27 6月, 2020 1 次提交
  15. 20 6月, 2020 1 次提交
  16. 09 6月, 2020 3 次提交
    • G
      panic: add sysctl to dump all CPUs backtraces on oops event · 60c958d8
      Guilherme G. Piccoli 提交于
      Usually when the kernel reaches an oops condition, it's a point of no
      return; in case not enough debug information is available in the kernel
      splat, one of the last resorts would be to collect a kernel crash dump
      and analyze it.  The problem with this approach is that in order to
      collect the dump, a panic is required (to kexec-load the crash kernel).
      When in an environment of multiple virtual machines, users may prefer to
      try living with the oops, at least until being able to properly shutdown
      their VMs / finish their important tasks.
      
      This patch implements a way to collect a bit more debug details when an
      oops event is reached, by printing all the CPUs backtraces through the
      usage of NMIs (on architectures that support that).  The sysctl added
      (and documented) here was called "oops_all_cpu_backtrace", and when set
      will (as the name suggests) dump all CPUs backtraces.
      
      Far from ideal, this may be the last option though for users that for
      some reason cannot panic on oops.  Most of times oopses are clear enough
      to indicate the kernel portion that must be investigated, but in virtual
      environments it's possible to observe hypervisor/KVM issues that could
      lead to oopses shown in other guests CPUs (like virtual APIC crashes).
      This patch hence aims to help debug such complex issues without
      resorting to kdump.
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: Iurii Zaikin <yzaikin@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: http://lkml.kernel.org/r/20200327224116.21030-1-gpiccoli@canonical.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      60c958d8
    • G
      kernel/hung_task.c: introduce sysctl to print all traces when a hung task is detected · 0ec9dc9b
      Guilherme G. Piccoli 提交于
      Commit 401c636a ("kernel/hung_task.c: show all hung tasks before
      panic") introduced a change in that we started to show all CPUs
      backtraces when a hung task is detected _and_ the sysctl/kernel
      parameter "hung_task_panic" is set.  The idea is good, because usually
      when observing deadlocks (that may lead to hung tasks), the culprit is
      another task holding a lock and not necessarily the task detected as
      hung.
      
      The problem with this approach is that dumping backtraces is a slightly
      expensive task, specially printing that on console (and specially in
      many CPU machines, as servers commonly found nowadays).  So, users that
      plan to collect a kdump to investigate the hung tasks and narrow down
      the deadlock definitely don't need the CPUs backtrace on dmesg/console,
      which will delay the panic and pollute the log (crash tool would easily
      grab all CPUs traces with 'bt -a' command).
      
      Also, there's the reciprocal scenario: some users may be interested in
      seeing the CPUs backtraces but not have the system panic when a hung
      task is detected.  The current approach hence is almost as embedding a
      policy in the kernel, by forcing the CPUs backtraces' dump (only) on
      hung_task_panic.
      
      This patch decouples the panic event on hung task from the CPUs
      backtraces dump, by creating (and documenting) a new sysctl called
      "hung_task_all_cpu_backtrace", analog to the approach taken on soft/hard
      lockups, that have both a panic and an "all_cpu_backtrace" sysctl to
      allow individual control.  The new mechanism for dumping the CPUs
      backtraces on hung task detection respects "hung_task_warnings" by not
      dumping the traces in case there's no warnings left.
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Link: http://lkml.kernel.org/r/20200327223646.20779-1-gpiccoli@canonical.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ec9dc9b
    • R
      kernel: add panic_on_taint · db38d5c1
      Rafael Aquini 提交于
      Analogously to the introduction of panic_on_warn, this patch introduces
      a kernel option named panic_on_taint in order to provide a simple and
      generic way to stop execution and catch a coredump when the kernel gets
      tainted by any given flag.
      
      This is useful for debugging sessions as it avoids having to rebuild the
      kernel to explicitly add calls to panic() into the code sites that
      introduce the taint flags of interest.
      
      For instance, if one is interested in proceeding with a post-mortem
      analysis at the point a given code path is hitting a bad page (i.e.
      unaccount_page_cache_page(), or slab_bug()), a coredump can be collected
      by rebooting the kernel with 'panic_on_taint=0x20' amended to the
      command line.
      
      Another, perhaps less frequent, use for this option would be as a means
      for assuring a security policy case where only a subset of taints, or no
      single taint (in paranoid mode), is allowed for the running system.  The
      optional switch 'nousertaint' is handy in this particular scenario, as
      it will avoid userspace induced crashes by writes to sysctl interface
      /proc/sys/kernel/tainted causing false positive hits for such policies.
      
      [akpm@linux-foundation.org: tweak kernel-parameters.txt wording]
      Suggested-by: NQian Cai <cai@lca.pw>
      Signed-off-by: NRafael Aquini <aquini@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NLuis Chamberlain <mcgrof@kernel.org>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Bunk <bunk@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Takashi Iwai <tiwai@suse.de>
      Link: http://lkml.kernel.org/r/20200515175502.146720-1-aquini@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      db38d5c1
  17. 26 5月, 2020 2 次提交
  18. 18 5月, 2020 1 次提交
  19. 16 5月, 2020 1 次提交
  20. 05 5月, 2020 3 次提交
  21. 29 4月, 2020 1 次提交
  22. 21 4月, 2020 1 次提交
  23. 16 4月, 2020 2 次提交
  24. 11 4月, 2020 1 次提交
  25. 11 3月, 2020 1 次提交
  26. 25 2月, 2020 2 次提交
  27. 19 2月, 2020 5 次提交