Linux kernel modifications for the Kernel Hacking exam
Find a file
Guilherme G. Piccoli 8d470a45d1 panic: add option to dump all CPUs backtraces in panic_print
Currently the "panic_print" parameter/sysctl allows some interesting debug
information to be printed during a panic event.  This is useful for
example in cases the user cannot kdump due to resource limits, or if the
user collects panic logs in a serial output (or pstore) and prefers a fast
reboot instead of a kdump.

Happens that currently there's no way to see all CPUs backtraces in a
panic using "panic_print" on architectures that support that.  We do have
"oops_all_cpu_backtrace" sysctl, but although partially overlapping in the
functionality, they are orthogonal in nature: "panic_print" is a panic
tuning (and we have panics without oopses, like direct calls to panic() or
maybe other paths that don't go through oops_enter() function), and the
original purpose of "oops_all_cpu_backtrace" is to provide more
information on oopses for cases in which the users desire to continue
running the kernel even after an oops, i.e., used in non-panic scenarios.

So, we hereby introduce an additional bit for "panic_print" to allow
dumping the CPUs backtraces during a panic event.

Link: https://lkml.kernel.org/r/20211109202848.610874-3-gpiccoli@igalia.com
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Reviewed-by: Feng Tang <feng.tang@intel.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-23 19:00:35 -07:00
arch arm64: mm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef 2022-03-23 19:00:34 -07:00
block block: release rq qos structures for queue without disk 2022-03-14 14:05:41 -06:00
certs
crypto
Documentation panic: add option to dump all CPUs backtraces in panic_print 2022-03-23 19:00:35 -07:00
drivers Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2022-03-20 09:27:52 -07:00
fs fat: use pointer to simple type in put_user() 2022-03-23 19:00:34 -07:00
include kexec: make crashk_res, crashk_low_res and crash_notes symbols always visible 2022-03-23 19:00:34 -07:00
init init/main.c: return 1 from handled __setup() functions 2022-03-23 19:00:34 -07:00
ipc
kernel panic: add option to dump all CPUs backtraces in panic_print 2022-03-23 19:00:35 -07:00
lib ubsan: no need to unset panic_on_warn in ubsan_epilogue() 2022-03-23 19:00:35 -07:00
LICENSES
mm kasan: no need to unset panic_on_warn in end_report() 2022-03-23 19:00:35 -07:00
net net: dsa: Add missing of_node_put() in dsa_port_parse_of 2022-03-17 13:13:27 +01:00
samples
scripts checkpatch: use python3 to find codespell dictionary 2022-03-23 19:00:34 -07:00
security
sound ALSA: intel_hdmi: Fix reference to PCM buffer address 2022-03-02 09:25:37 +01:00
tools linux/types.h: remove unnecessary __bitwise__ 2022-03-23 19:00:33 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap MAINTAINERS: Update Jisheng's email address 2022-03-08 17:30:32 +01:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Add Paolo Abeni to networking maintainers 2022-03-15 12:16:10 -07:00
Makefile Linux 5.17 2022-03-20 13:14:17 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.