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] [day] [month] [year] [list]
Message-ID: <17217b83-12ba-e3f2-da78-f423275da4ad@oss.qualcomm.com>
Date: Mon, 17 Nov 2025 11:10:33 +0530
From: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: Sebastian Reichel <sre@...nel.org>,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        Bjorn Andersson <andersson@...nel.org>, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
        Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: Re: [PATCH 1/2] Documentation: ABI: Add
 sysfs-class-reboot-mode-reboot_modes



On 11/16/2025 11:14 PM, Dmitry Baryshkov wrote:
> On Sun, Nov 16, 2025 at 08:49:47PM +0530, Shivendra Pratap wrote:
>> Add ABI documentation for /sys/class/reboot-mode/*/reboot_modes, a
>> read-only sysfs attribute exposing the list of supported reboot-mode
>> arguments. This file is created by reboot-mode framework and provides a
>> user-readable interface to query available reboot-mode arguments.
>>
>> Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.com>
>> Signed-off-by: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
>> ---
>>  .../testing/sysfs-class-reboot-mode-reboot_modes   | 39 ++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..28280ffe9bf962ef9d2136ea5d7c6aef77c4bd34
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes
>> @@ -0,0 +1,39 @@
>> +What:		/sys/class/reboot-mode/<driver>/reboot_modes
>> +Date:		November 2025
>> +KernelVersion:	6.18.0-rc5
>> +Contact:	linux-pm@...r.kernel.org
>> +		Description:
>> +		This interface exposes the reboot-mode arguments
>> +		registered with the reboot-mode framework. It is
>> +		a read-only interface and provides a space
>> +		separated list of reboot-mode arguments supported
>> +		on the current platform.
>> +		Example:
>> +		 recovery fastboot bootloader
>> +
>> +		The exact sysfs path may vary depending on the
>> +		name of the driver that registers the arguments.
>> +		Example:
>> +		 /sys/class/reboot-mode/nvmem-reboot-mode/reboot_modes
>> +		 /sys/class/reboot-mode/syscon-reboot-mode/reboot_modes
>> +		 /sys/class/reboot-mode/qcom-pon/reboot_modes
> 
> This part is obvious, isn't it?

yes thats correct. Its just added for completeness of the documentation.

> 
>> +
>> +		The supported arguments can be used by userspace
>> +		to invoke device reset using the reboot() system
>> +		call, with the "argument" as string to "*arg"
>> +		parameter along with LINUX_REBOOT_CMD_RESTART2.
>> +		Example:
>> +		 reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
>> +		        LINUX_REBOOT_CMD_RESTART2, "bootloader");
> 
> So, does one need to write a tool for invoking reboot with the corerct
> set of args? If we are adding a sysfs interface, wouldn't it be logical
> to also add another sysfs file, setting the argument?

Some of such utilities are already in use and they pass command as an "*arg"
to the reboot SYSCALL.

reboot-mode is currently tied to the reboot SYSCALL - "*arg" being processed as
command. We can open a sysfs for setting the argument - That will be a design
change for reboot-mode and then we need to also decide that if the command
being passes will override the sysfs?

thanks,
Shivendra

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ