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: <CAFnufp1Gu7MV03hADAm2gvveHaeR7X_td2EmyEpxto1oW3sZvg@mail.gmail.com>
Date:   Mon, 22 Feb 2021 14:12:10 +0100
From:   Matteo Croce <mcroce@...ux.microsoft.com>
To:     Pavel Machek <pavel@....cz>
Cc:     linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Arnd Bergmann <arnd@...db.de>, Petr Mladek <pmladek@...e.com>,
        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 v4] reboot: allow to specify reboot mode via sysfs

On Mon, Feb 22, 2021 at 11:03 AM Pavel Machek <pavel@....cz> wrote:
>
> On Tue 2020-11-10 21:27:46, 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.
>
> We already have a reboot syscall, do we need sysfs interface, too?
>
>
> > +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 is difference between mode and type? What is difference between
> cold and hard for example? WTF is gpio?
>
> > +What:                /sys/kernel/reboot/cpu
> > +Date:                November 2020
> > +KernelVersion:       5.11
> > +Contact:     Matteo Croce <mcroce@...rosoft.com>
> > +Description: CPU number to use to reboot.
>
> Why should user care about this?
>

Mode is the reboot mode (soft, warm, cold, gpio), and type is an x86
specific type, (bios, acpi, uefi, etc.).
I never used GPIO reboot but it's used by some ARM devices.

I didn't invent anything from scratch, I just transposed the settings
available from the kernel command line (see
Documentation/admin-guide/kernel-parameters.txt) to sysfs.
Everithing was already tunable before, like the CPU used during reboot.

-- 
per aspera ad upstream

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ