linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] docs: sysctl/kernel: document cad_pid
@ 2020-04-23 18:36 Stephen Kitt
  2020-04-23 18:36 ` [PATCH 2/3] docs: sysctl/kernel: document ftrace entries Stephen Kitt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Kitt @ 2020-04-23 18:36 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab, linux-doc
  Cc: linux-kernel, Stephen Kitt

Based on the implementation in kernel/sysctl.c (the proc_do_cad_pid()
function), kernel/reboot.c, and include/linux/sched/signal.h.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 Documentation/admin-guide/sysctl/kernel.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 55b24eada13c..82bfd5892663 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -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
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
  2020-04-23 18:36 [PATCH 1/3] docs: sysctl/kernel: document cad_pid Stephen Kitt
@ 2020-04-23 18:36 ` Stephen Kitt
  2020-04-28 18:41   ` Jonathan Corbet
  2020-04-23 18:36 ` [PATCH 3/3] docs: sysctl/kernel: document firmware_config Stephen Kitt
  2020-04-28 18:39 ` [PATCH 1/3] docs: sysctl/kernel: document cad_pid Jonathan Corbet
  2 siblings, 1 reply; 7+ messages in thread
From: Stephen Kitt @ 2020-04-23 18:36 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab, linux-doc
  Cc: linux-kernel, Stephen Kitt

Based on the ftrace documentation, the tp_printk boot parameter
documentation, and the implementation in kernel/trace/trace.c.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 82bfd5892663..d4bbdaf96ebc 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -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
 =================
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] docs: sysctl/kernel: document firmware_config
  2020-04-23 18:36 [PATCH 1/3] docs: sysctl/kernel: document cad_pid Stephen Kitt
  2020-04-23 18:36 ` [PATCH 2/3] docs: sysctl/kernel: document ftrace entries Stephen Kitt
@ 2020-04-23 18:36 ` Stephen Kitt
  2020-04-28 18:39 ` [PATCH 1/3] docs: sysctl/kernel: document cad_pid Jonathan Corbet
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Kitt @ 2020-04-23 18:36 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab, linux-doc
  Cc: linux-kernel, Stephen Kitt

Based on the firmware fallback mechanisms documentation and the
implementation in drivers/base/firmware_loader/fallback.c.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 Documentation/admin-guide/sysctl/kernel.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index d4bbdaf96ebc..cb6d5302b595 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -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
 ===================
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] docs: sysctl/kernel: document cad_pid
  2020-04-23 18:36 [PATCH 1/3] docs: sysctl/kernel: document cad_pid Stephen Kitt
  2020-04-23 18:36 ` [PATCH 2/3] docs: sysctl/kernel: document ftrace entries Stephen Kitt
  2020-04-23 18:36 ` [PATCH 3/3] docs: sysctl/kernel: document firmware_config Stephen Kitt
@ 2020-04-28 18:39 ` Jonathan Corbet
  2 siblings, 0 replies; 7+ messages in thread
From: Jonathan Corbet @ 2020-04-28 18:39 UTC (permalink / raw)
  To: Stephen Kitt; +Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel

On Thu, 23 Apr 2020 20:36:49 +0200
Stephen Kitt <steve@sk2.org> wrote:

> Based on the implementation in kernel/sysctl.c (the proc_do_cad_pid()
> function), kernel/reboot.c, and include/linux/sched/signal.h.
> 
> Signed-off-by: Stephen Kitt <steve@sk2.org>
> ---
>  Documentation/admin-guide/sysctl/kernel.rst | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
  2020-04-23 18:36 ` [PATCH 2/3] docs: sysctl/kernel: document ftrace entries Stephen Kitt
@ 2020-04-28 18:41   ` Jonathan Corbet
  2020-04-28 20:03     ` Steven Rostedt
  2020-04-29 20:56     ` Stephen Kitt
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Corbet @ 2020-04-28 18:41 UTC (permalink / raw)
  To: Stephen Kitt
  Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel, Steven Rostedt

On Thu, 23 Apr 2020 20:36:50 +0200
Stephen Kitt <steve@sk2.org> wrote:

> Based on the ftrace documentation, the tp_printk boot parameter
> documentation, and the implementation in kernel/trace/trace.c.
> 
> Signed-off-by: Stephen Kitt <steve@sk2.org>

This one could benefit from an ack from Steve (CC'd).  Also one other
little nit below:

>  Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> index 82bfd5892663..d4bbdaf96ebc 100644
> --- a/Documentation/admin-guide/sysctl/kernel.rst
> +++ b/Documentation/admin-guide/sysctl/kernel.rst
> @@ -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
> +
> +::

I would just make that ", and::" and avoid the separate line.

> +
> +    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
>  =================
>  

Thanks,

jon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
  2020-04-28 18:41   ` Jonathan Corbet
@ 2020-04-28 20:03     ` Steven Rostedt
  2020-04-29 20:56     ` Stephen Kitt
  1 sibling, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2020-04-28 20:03 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Stephen Kitt, Mauro Carvalho Chehab, linux-doc, linux-kernel

On Tue, 28 Apr 2020 12:41:33 -0600
Jonathan Corbet <corbet@lwn.net> wrote:

> On Thu, 23 Apr 2020 20:36:50 +0200
> Stephen Kitt <steve@sk2.org> wrote:
> 
> > Based on the ftrace documentation, the tp_printk boot parameter
> > documentation, and the implementation in kernel/trace/trace.c.
> > 
> > Signed-off-by: Stephen Kitt <steve@sk2.org>  
> 
> This one could benefit from an ack from Steve (CC'd).  Also one other

Thanks! I verified that the documentation is correct.

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve



> little nit below:
> 
> >  Documentation/admin-guide/sysctl/kernel.rst | 50 +++++++++++++++++++++
> >  1 file changed, 50 insertions(+)
> > 
> > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> > index 82bfd5892663..d4bbdaf96ebc 100644
> > --- a/Documentation/admin-guide/sysctl/kernel.rst
> > +++ b/Documentation/admin-guide/sysctl/kernel.rst
> > @@ -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
> > +
> > +::  
> 
> I would just make that ", and::" and avoid the separate line.
> 
> > +
> > +    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
> >  =================
> >    
> 
> Thanks,
> 
> jon


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] docs: sysctl/kernel: document ftrace entries
  2020-04-28 18:41   ` Jonathan Corbet
  2020-04-28 20:03     ` Steven Rostedt
@ 2020-04-29 20:56     ` Stephen Kitt
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Kitt @ 2020-04-29 20:56 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel, Steven Rostedt

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

On Tue, 28 Apr 2020 12:41:33 -0600, Jonathan Corbet <corbet@lwn.net> wrote:
> On Thu, 23 Apr 2020 20:36:50 +0200
> Stephen Kitt <steve@sk2.org> wrote:
> > Based on the ftrace documentation, the tp_printk boot parameter
> > documentation, and the implementation in kernel/trace/trace.c.
> > 
> > Signed-off-by: Stephen Kitt <steve@sk2.org>  
> 
> 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:

> > +the console.  This is very useful for capturing traces that lead to
> > +crashes and outputing it to a serial console.

in addition to this:

> > +will stop tracepoints from being sent to printk(), and
> > +
> > +::  
> 
> I would just make that ", and::" and avoid the separate line.

Regards,

Stephen

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-29 21:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 18:36 [PATCH 1/3] docs: sysctl/kernel: document cad_pid Stephen Kitt
2020-04-23 18:36 ` [PATCH 2/3] docs: sysctl/kernel: document ftrace entries Stephen Kitt
2020-04-28 18:41   ` Jonathan Corbet
2020-04-28 20:03     ` Steven Rostedt
2020-04-29 20:56     ` Stephen Kitt
2020-04-23 18:36 ` [PATCH 3/3] docs: sysctl/kernel: document firmware_config Stephen Kitt
2020-04-28 18:39 ` [PATCH 1/3] docs: sysctl/kernel: document cad_pid Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).