docs: sysctl/kernel: document cad_pid
PATCH 1/3 docs: sysctl/kernel: document cad_pid
Based on the implementation in kernel/sysctl.c (the proc_do_cad_pid() function), kernel/reboot.c, and include/linux/sched/signal.h.
--- Documentation/admin-guide/sysctl/kernel.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/admin-guide/sysctl/kernel.rst +10 -0
@@ -116,6 +116,16 @@ run. The statistics can be seen using ``bpftool``. = =================================== +cad_pid +======= + +This is the pid which will be signalled on reboot (notably, by +Ctrl-Alt-Delete). Writing a value to this file which doesn't +correspond to a running process will result in ``-ESRCH``. + +See also `ctrl-alt-del`_. + + cap_last_cap ============
base-commit: 7b9121040d83eb9e332f7dbc140eca17643d3586
Signature · 1 line
2.20.1
PATCH 2/3 docs: sysctl/kernel: document ftrace entries
Based on the ftrace documentation, the tp_printk boot parameter documentation, and the implementation in kernel/trace/trace.c.
--- Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+)
Documentation/admin-guide/sysctl/kernel.rst +50 -0
@@ -265,6 +265,27 @@ domain names are in general different. For a detailed discussion see the ``hostname(1)`` man page. +ftrace_dump_on_oops +=================== + +Determines whether ``ftrace_dump()`` should be called on an oops (or +kernel panic). This will output the contents of the ftrace buffers to +the console. This is very useful for capturing traces that lead to +crashes and outputing it to a serial console. + += =================================================== +0 Disabled (default). +1 Dump buffers of all CPUs. +2 Dump the buffer of the CPU that triggered the oops. += =================================================== + + +ftrace_enabled, stack_tracer_enabled +==================================== + +See :doc:`/trace/ftrace`. + + hardlockup_all_cpu_backtrace ============================
@@ -1191,6 +1212,35 @@ If a value outside of this range is written to ``threads-max`` an ``EINVAL`` error occurs. +traceoff_on_warning +=================== + +When set, disables tracing (see :doc:`/trace/ftrace`) when a +``WARN()`` is hit. + + +tracepoint_printk +================= + +When tracepoints are sent to printk() (enabled by the ``tp_printk`` +boot parameter), this entry provides runtime control:: + + echo 0 > /proc/sys/kernel/tracepoint_printk + +will stop tracepoints from being sent to printk(), and + +:: + + echo 1 > /proc/sys/kernel/tracepoint_printk + +will send them to printk() again. + +This only works if the kernel was booted with ``tp_printk`` enabled. + +See :doc:`/admin-guide/kernel-parameters` and +:doc:`/trace/boottime-trace`. + + unknown_nmi_panic =================
Signature · 1 line
2.20.1
Jonathan Corbet
maintainerRe: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
Quoted 4 lines · On Thu, 23 Apr 2020 20:36:50 +0200 Stephen Kitt <[email protected]> wrote:
Based on the ftrace documentation, the
tp_printkboot parameter documentation, and the implementation inkernel/trace/trace.c.Signed-off-by Stephen Kitt <[email protected]>
This one could benefit from an ack from Steve (CC'd). Also one other little nit below:
Quoted 47 lines
Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+)Documentation/admin-guide/sysctl/kernel.rst +29
-0@@ -265,6 +265,27 @@ domain names are in general different. For a detailed discussion see the ``hostname(1)`` man page. +ftrace_dump_on_oops +=================== + +Determines whether ``ftrace_dump()`` should be called on an oops (or +kernel panic). This will output the contents of the ftrace buffers to +the console. This is very useful for capturing traces that lead to +crashes and outputing it to a serial console. + += =================================================== +0 Disabled (default). +1 Dump buffers of all CPUs. +2 Dump the buffer of the CPU that triggered the oops. += =================================================== + + +ftrace_enabled, stack_tracer_enabled +==================================== + +See :doc:`/trace/ftrace`. + + hardlockup_all_cpu_backtrace ============================@@ -1191,6 +1212,35 @@ If a value outside of this range is written to ``threads-max`` an ``EINVAL`` error occurs. +traceoff_on_warning +=================== + +When set, disables tracing (see :doc:`/trace/ftrace`) when a +``WARN()`` is hit. + + +tracepoint_printk
Documentation/admin-guide/sysctl/kernel.rst If a value outside of this range is written to ``threads-max`` an · line 1232
Quoted 10 lines
Documentation/admin-guide/sysctl/kernel.rst +10
-0+================= + +When tracepoints are sent to printk() (enabled by the ``tp_printk`` +boot parameter), this entry provides runtime control:: + + echo 0 > /proc/sys/kernel/tracepoint_printk + +will stop tracepoints from being sent to printk(), and + +::
I would just make that ", and::" and avoid the separate line.
Quoted 4 lines
Documentation/admin-guide/sysctl/kernel.rst +4
-0+ + echo 1 > /proc/sys/kernel/tracepoint_printk + +will send them to printk() again.
Documentation/admin-guide/sysctl/kernel.rst If a value outside of this range is written to ``threads-max`` an · line 1246
Quoted 10 lines
Documentation/admin-guide/sysctl/kernel.rst +7
-0+ +This only works if the kernel was booted with ``tp_printk`` enabled. + +See :doc:`/admin-guide/kernel-parameters` and +:doc:`/trace/boottime-trace`. + + unknown_nmi_panic =================
Thanks,
jon
Steven Rostedt
Acked-byRe: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
Quoted 9 lines · On Tue, 28 Apr 2020 12:41:33 -0600 Jonathan Corbet <[email protected]> wrote:
Quoted 4 lines · On Thu, 23 Apr 2020 20:36:50 +0200 Stephen Kitt <[email protected]> wrote:
Based on the ftrace documentation, the
tp_printkboot parameter documentation, and the implementation inkernel/trace/trace.c.Signed-off-by Stephen Kitt <[email protected]>This one could benefit from an ack from Steve (CC'd). Also one other
Thanks! I verified that the documentation is correct.
-- Steve
Quoted 80 lines
little nit below:
Quoted 47 lines
Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+)Documentation/admin-guide/sysctl/kernel.rst +29
-0@@ -265,6 +265,27 @@ domain names are in general different. For a detailed discussion see the ``hostname(1)`` man page. +ftrace_dump_on_oops +=================== + +Determines whether ``ftrace_dump()`` should be called on an oops (or +kernel panic). This will output the contents of the ftrace buffers to +the console. This is very useful for capturing traces that lead to +crashes and outputing it to a serial console. + += =================================================== +0 Disabled (default). +1 Dump buffers of all CPUs. +2 Dump the buffer of the CPU that triggered the oops. += =================================================== + + +ftrace_enabled, stack_tracer_enabled +==================================== + +See :doc:`/trace/ftrace`. + + hardlockup_all_cpu_backtrace ============================@@ -1191,6 +1212,35 @@ If a value outside of this range is written to ``threads-max`` an ``EINVAL`` error occurs. +traceoff_on_warning +=================== + +When set, disables tracing (see :doc:`/trace/ftrace`) when a +``WARN()`` is hit. + + +tracepoint_printkDocumentation/admin-guide/sysctl/kernel.rst If a value outside of this range is written to ``threads-max`` an · line 1232
Quoted 10 lines
Documentation/admin-guide/sysctl/kernel.rst +10
-0+================= + +When tracepoints are sent to printk() (enabled by the ``tp_printk`` +boot parameter), this entry provides runtime control:: + + echo 0 > /proc/sys/kernel/tracepoint_printk + +will stop tracepoints from being sent to printk(), and + +::I would just make that ", and::" and avoid the separate line.
Quoted 4 lines
Documentation/admin-guide/sysctl/kernel.rst +4
-0+ + echo 1 > /proc/sys/kernel/tracepoint_printk + +will send them to printk() again.Documentation/admin-guide/sysctl/kernel.rst If a value outside of this range is written to ``threads-max`` an · line 1246
Quoted 10 lines
Documentation/admin-guide/sysctl/kernel.rst +7
-0+ +This only works if the kernel was booted with ``tp_printk`` enabled. + +See :doc:`/admin-guide/kernel-parameters` and +:doc:`/trace/boottime-trace`. + + unknown_nmi_panic =================Thanks,
jon
Re: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
In reply to Jonathan CorbetQuoted 9 lines · Jonathan Corbet
Quoted 4 lines · On Thu, 23 Apr 2020 20:36:50 +0200 Stephen Kitt <[email protected]> wrote:
Based on the ftrace documentation, the
tp_printkboot parameter documentation, and the implementation inkernel/trace/trace.c.Signed-off-by Stephen Kitt <[email protected]>This one could benefit from an ack from Steve (CC'd). Also one other little nit below:
Thanks (and thanks for the review Steve). I’ll follow up with v2 shortly, fixing the spelling and grammar here:
Quoted 2 lines
Documentation/admin-guide/sysctl/kernel.rst domain names are in general different. For a detailed discussion · line 274
Quoted 2 lines
Documentation/admin-guide/sysctl/kernel.rst +2
-0+the console. This is very useful for capturing traces that lead to +crashes and outputing it to a serial console.
in addition to this:
Quoted 5 lines
Documentation/admin-guide/sysctl/kernel.rst If a value outside of this range is written to ``threads-max`` an · line 1232
Quoted 3 lines
Documentation/admin-guide/sysctl/kernel.rst +3
-0+will stop tracepoints from being sent to printk(), and + +::I would just make that ", and::" and avoid the separate line.
Regards,
Stephen
PATCH 3/3 docs: sysctl/kernel: document firmware_config
In reply to Stephen KittBased on the firmware fallback mechanisms documentation and the implementation in drivers/base/firmware_loader/fallback.c.
--- Documentation/admin-guide/sysctl/kernel.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Documentation/admin-guide/sysctl/kernel.rst +13 -0
@@ -265,6 +265,19 @@ domain names are in general different. For a detailed discussion see the ``hostname(1)`` man page. +firmware_config +=============== + +See :doc:`/driver-api/firmware/fallback-mechanisms`. + +The entries in this directory allow the firmware loader helper +fallback to be controlled: + +* ``force_sysfs_fallback``, when set to 1, forces the use of the + fallback; +* ``ignore_sysfs_fallback``, when set to 1, ignores any fallback. + + ftrace_dump_on_oops ===================
Signature · 1 line
2.20.1
Quoted 7 lines · On Thu, 23 Apr 2020 20:36:49 +0200 Stephen Kitt <[email protected]> wrote:
Based on the implementation in
kernel/sysctl.c(theproc_do_cad_pid()function),kernel/reboot.c, andinclude/linux/sched/signal.h.Signed-off-by Stephen Kitt <[email protected]>--- Documentation/admin-guide/sysctl/kernel.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
Applied, thanks.
jon