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]
Date:   Tue, 10 Nov 2020 15:58:34 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Matteo Croce <mcroce@...ux.microsoft.com>
Cc:     linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Arnd Bergmann <arnd@...db.de>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Tyler Hicks <tyhicks@...ux.microsoft.com>
Subject: Re: [PATCH v3] reboot: allow to specify reboot mode via sysfs

On Mon 2020-11-09 17:45:38, Matteo Croce wrote:
> From: Matteo Croce <mcroce@...rosoft.com>
> 
> The kernel cmdline reboot= option offers some sort of control
> on how the reboot is issued.
> Add handles in sysfs to allow setting these reboot options, so they
> can be changed when the system is booted, other than at boot time.
> 
> The handlers are under <sysfs>/kernel/reboot, can be read to
> get the current configuration and written to alter it.
> 
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-kernel-reboot
> @@ -0,0 +1,31 @@
> +What:		/sys/kernel/reboot
> +Date:		November 2020
> +KernelVersion:	5.11
> +Contact:	Matteo Croce <mcroce@...rosoft.com>
> +Description:	Interface to set the kernel reboot mode, similarly to
> +		what can be done via the reboot= cmdline option.
> +		(see Documentation/admin-guide/kernel-parameters.txt)
> +

s/reboot mode/reboot behavior/

The reboot mode is only one of the modified parameters.


> +What:		/sys/kernel/reboot/mode
> +Date:		November 2020
> +KernelVersion:	5.11
> +Contact:	Matteo Croce <mcroce@...rosoft.com>
> +Description:	Reboot mode. Valid values are: cold warm hard soft gpio
> +
> +What:		/sys/kernel/reboot/type
> +Date:		November 2020
> +KernelVersion:	5.11
> +Contact:	Matteo Croce <mcroce@...rosoft.com>
> +Description:	Reboot type. Valid values are: bios acpi kbd triple efi pci
> +
> +What:		/sys/kernel/reboot/cpu
> +Date:		November 2020
> +KernelVersion:	5.11
> +Contact:	Matteo Croce <mcroce@...rosoft.com>
> +Description:	CPU number to use to reboot.
> +
> +What:		/sys/kernel/reboot/force
> +Date:		November 2020
> +KernelVersion:	5.11
> +Contact:	Matteo Croce <mcroce@...rosoft.com>
> +Description:	Force an immediate reboot.

This makes me feel like that the kernel will reboot
immediately when you write "1". It would deserve a better
explanation that would make it clear, something like:

Description:	Use forced reboot that does not contact the init system.


Otherwise, it looks good to me. With the two above updates:

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ