lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cc09ea7-d4f7-4e1c-9cd0-bf310faba217@kernel.org>
Date: Wed, 15 Oct 2025 08:18:44 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Bagas Sanjaya <bagasdotme@...il.com>, Randy Dunlap
 <rdunlap@...radead.org>, Jonathan Corbet <corbet@....net>,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 Linux Documentation <linux-doc@...r.kernel.org>,
 Linux Serial <linux-serial@...r.kernel.org>
Cc: Cengiz Can <cengiz@...nel.wtf>, Tomas Mudrunka
 <tomas.mudrunka@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Anselm Schüler <mail@...elmschueler.com>
Subject: Re: [PATCH] Documentation: sysrq: Remove contradicting sentence on
 extra /proc/sysrq-trigger characters

On 15. 10. 25, 2:11, Bagas Sanjaya wrote:
> On Tue, Oct 14, 2025 at 10:57:45AM -0700, Randy Dunlap wrote:
>>
>>
>> On 10/14/25 7:55 AM, Jonathan Corbet wrote:
>>> Bagas Sanjaya <bagasdotme@...il.com> writes:
>>>
>>>> /proc/sysrq-trigger documentation states that only first character is
>>>> processed and the rest is ignored, yet it is not recommended to write
>>>> any extra characters to it. The latter statement is contradictive as
>>>> these characters are also ignored as implied by preceding sentence.
>>>>
>>>> Remove it.
>>>>
>>>> Link: https://lore.kernel.org/lkml/7ca05672-dc20-413f-a923-f77ce0a9d307@anselmschueler.com/
>>>> Signed-off-by: Bagas Sanjaya <bagasdotme@...il.com>
>>>> ---
>>>>   Documentation/admin-guide/sysrq.rst | 4 +---
>>>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>>>
>>>> diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst
>>>> index 9c7aa817adc72d..63ff415ce85d66 100644
>>>> --- a/Documentation/admin-guide/sysrq.rst
>>>> +++ b/Documentation/admin-guide/sysrq.rst
>>>> @@ -77,9 +77,7 @@ On other
>>>>   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.::
>>>> +	ignored. E.g.::
>>>
>>> I'm not sure this is right - there is a warning here that additional
>>> characters may acquire a meaning in the future, so one should not
>>> develop the habit of writing them now.  After all these years, I think
>>> the chances of fundamental sysrq changes are pretty small, but I still
>>> don't see why we would take the warning out?
>>
>> but the following paragraph says:
>>
>> 	Alternatively, write multiple characters prepended by underscore.
>> 	This way, all characters will be processed. E.g.::
>>
>> 		echo _reisub > /proc/sysrq-trigger
>>
>> so it is confuzing.
> 
> I guess the whole "On all" description can be rewritten like:
> 
> Write a single character to /proc/sysrq-trigger, e.g.::
> 
> <snipped>...
> 
> If a string (multiple characters) is written instead, only the first character
> is processed unless the string is prepended by an underscore, like::
> 
> <snipped>...

Some kind of, yes. So Either:
* you write no underscore and a character -- the rest is ignored and you 
should not write more than one.
* you prepend underscore and write more of them -- all are processed.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ