mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage
@ 2025-10-23  1:41 Bagas Sanjaya
  2025-10-23  4:42 ` Randy Dunlap
  2025-11-03 23:33 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Bagas Sanjaya @ 2025-10-23  1:41 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux Documentation, Linux Serial
  Cc: Jonathan Corbet, Cengiz Can, Bagas Sanjaya, Tomas Mudrunka,
	Jiri Slaby, Greg Kroah-Hartman, Anselm Schüler,
	Randy Dunlap

/proc/sysrq-trigger usage documentation (in "On all" section) states
that it is not recommended to write extra characters to it. The sentence
may imply a contradiction to previous sentence which writes that such
characters are ignored.

Rewrite the description.

Link: https://lore.kernel.org/lkml/7ca05672-dc20-413f-a923-f77ce0a9d307@anselmschueler.com/
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Changes since v2 [1]:

  - Keep /proc/sysrq-trigger future API change note (Tomas)

Anselm: Do you object to the rewrite?

[1]: https://lore.kernel.org/linux-doc/20251016103609.33897-2-bagasdotme@gmail.com/

 Documentation/admin-guide/sysrq.rst | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst
index 9c7aa817adc72d..a88266b171aa17 100644
--- a/Documentation/admin-guide/sysrq.rst
+++ b/Documentation/admin-guide/sysrq.rst
@@ -75,16 +75,15 @@ On other
 	submit a patch to be included in this section.
 
 On all
-	Write a single character to /proc/sysrq-trigger.
-	Only the first character is processed, the rest of the string is
-	ignored. However, it is not recommended to write any extra characters
-	as the behavior is undefined and might change in the future versions.
-	E.g.::
+	Write a single character to /proc/sysrq-trigger. E.g.::
 
 		echo t > /proc/sysrq-trigger
 
-	Alternatively, write multiple characters prepended by underscore.
-	This way, all characters will be processed. E.g.::
+	Only the first character is processed; any following characters are
+	ignored for now, which might change in the future.
+
+	Alternatively, to write multiple characters, prepend them with an
+	underscore so that these all will be processed. E.g.::
 
 		echo _reisub > /proc/sysrq-trigger
 

base-commit: 0aa760051f4eb3d3bcd812125557bd09629a71e8
-- 
An old man doll... just what I always wanted! - Clara


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

* Re: [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage
  2025-10-23  1:41 [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage Bagas Sanjaya
@ 2025-10-23  4:42 ` Randy Dunlap
  2025-11-03 23:33 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2025-10-23  4:42 UTC (permalink / raw)
  To: Bagas Sanjaya, Linux Kernel Mailing List, Linux Documentation,
	Linux Serial
  Cc: Jonathan Corbet, Cengiz Can, Tomas Mudrunka, Jiri Slaby,
	Greg Kroah-Hartman, Anselm Schüler



On 10/22/25 6:41 PM, Bagas Sanjaya wrote:
> /proc/sysrq-trigger usage documentation (in "On all" section) states
> that it is not recommended to write extra characters to it. The sentence
> may imply a contradiction to previous sentence which writes that such
> characters are ignored.
> 
> Rewrite the description.
> 
> Link: https://lore.kernel.org/lkml/7ca05672-dc20-413f-a923-f77ce0a9d307@anselmschueler.com/
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> Changes since v2 [1]:
> 
>   - Keep /proc/sysrq-trigger future API change note (Tomas)
> 
> Anselm: Do you object to the rewrite?
> 
> [1]: https://lore.kernel.org/linux-doc/20251016103609.33897-2-bagasdotme@gmail.com/
> 
>  Documentation/admin-guide/sysrq.rst | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst
> index 9c7aa817adc72d..a88266b171aa17 100644
> --- a/Documentation/admin-guide/sysrq.rst
> +++ b/Documentation/admin-guide/sysrq.rst
> @@ -75,16 +75,15 @@ On other
>  	submit a patch to be included in this section.
>  
>  On all
> -	Write a single character to /proc/sysrq-trigger.
> -	Only the first character is processed, the rest of the string is
> -	ignored. However, it is not recommended to write any extra characters
> -	as the behavior is undefined and might change in the future versions.
> -	E.g.::
> +	Write a single character to /proc/sysrq-trigger. E.g.::
>  
>  		echo t > /proc/sysrq-trigger
>  
> -	Alternatively, write multiple characters prepended by underscore.
> -	This way, all characters will be processed. E.g.::
> +	Only the first character is processed; any following characters are
> +	ignored for now, which might change in the future.
> +
> +	Alternatively, to write multiple characters, prepend them with an
> +	underscore so that these all will be processed. E.g.::
>  
>  		echo _reisub > /proc/sysrq-trigger
>  
> 
> base-commit: 0aa760051f4eb3d3bcd812125557bd09629a71e8

-- 
~Randy

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

* Re: [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage
  2025-10-23  1:41 [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage Bagas Sanjaya
  2025-10-23  4:42 ` Randy Dunlap
@ 2025-11-03 23:33 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2025-11-03 23:33 UTC (permalink / raw)
  To: Bagas Sanjaya, Linux Kernel Mailing List, Linux Documentation,
	Linux Serial
  Cc: Cengiz Can, Bagas Sanjaya, Tomas Mudrunka, Jiri Slaby,
	Greg Kroah-Hartman, Anselm Schüler, Randy Dunlap

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> /proc/sysrq-trigger usage documentation (in "On all" section) states
> that it is not recommended to write extra characters to it. The sentence
> may imply a contradiction to previous sentence which writes that such
> characters are ignored.
>
> Rewrite the description.
>
> Link: https://lore.kernel.org/lkml/7ca05672-dc20-413f-a923-f77ce0a9d307@anselmschueler.com/
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
> Changes since v2 [1]:
>
>   - Keep /proc/sysrq-trigger future API change note (Tomas)
>
> Anselm: Do you object to the rewrite?

It still seems confusing...

> [1]: https://lore.kernel.org/linux-doc/20251016103609.33897-2-bagasdotme@gmail.com/
>
>  Documentation/admin-guide/sysrq.rst | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst
> index 9c7aa817adc72d..a88266b171aa17 100644
> --- a/Documentation/admin-guide/sysrq.rst
> +++ b/Documentation/admin-guide/sysrq.rst
> @@ -75,16 +75,15 @@ On other
>  	submit a patch to be included in this section.
>  
>  On all
> -	Write a single character to /proc/sysrq-trigger.
> -	Only the first character is processed, the rest of the string is
> -	ignored. However, it is not recommended to write any extra characters
> -	as the behavior is undefined and might change in the future versions.
> -	E.g.::
> +	Write a single character to /proc/sysrq-trigger. E.g.::
>  
>  		echo t > /proc/sysrq-trigger
>  
> -	Alternatively, write multiple characters prepended by underscore.
> -	This way, all characters will be processed. E.g.::
> +	Only the first character is processed; any following characters are
> +	ignored for now, which might change in the future.
> +
> +	Alternatively, to write multiple characters, prepend them with an
> +	underscore so that these all will be processed. E.g.::

You're still saying that following characters are ignored, then give an
example where they are not:

>  		echo _reisub > /proc/sysrq-trigger

So, for me, this still isn't really right.

This, I think, is a holdover from before, but I have to point out that:

>  		echo t > /proc/sysrq-trigger

Does *not* write a single character: it writes "t\n".

jon

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

end of thread, other threads:[~2025-11-03 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-23  1:41 [PATCH v3] Documentation: sysrq: Rewrite /proc/sysrq-trigger usage Bagas Sanjaya
2025-10-23  4:42 ` Randy Dunlap
2025-11-03 23:33 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®