linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Matteo Croce <mcroce@linux.microsoft.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>,
	Pavel Tatashin <pasha.tatashin@soleen.com>,
	Mike Rapoport <rppt@kernel.org>,
	Tyler Hicks <tyhicks@linux.microsoft.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	clang-built-linux@googlegroups.com
Subject: Re: [PATCH] reboot: Fix variable assignments in type_store
Date: Fri, 13 Nov 2020 21:06:28 +0100	[thread overview]
Message-ID: <20201113162043.GO1602@alley> (raw)
In-Reply-To: <CAFnufp31YO9yTXVqgKNZGR9XXRKfGKM4Y4NLk+4_uXdoWa+G4w@mail.gmail.com>

On Fri 2020-11-13 03:58:49, Matteo Croce wrote:
> On Fri, Nov 13, 2020 at 3:46 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Fri, 13 Nov 2020 02:38:18 +0100 Matteo Croce <mcroce@linux.microsoft.com> wrote:
> >
> > > At this point, since 'pci' enables BOOT_CF9_FORCE type and
> > > BOOT_CF9_SAFE is not user selectable, should I simply leave only
> > > 'pci'?
> > > 
> > > This way, we'll have the same set of options for both sysfs and kernel cmdline.
> >
> > Well, you're the reboot expert ;)
> >
> 
> So honored! :)
> 
> > But my $0.02 is yes, let's keep the command-line and sysfs interfaces
> > in sync and cover it all in documentation.  It would of course be
> > problematic to change the existing reboot= interface.
> >
> > I assume that means doing this?
> >
> > - #define BOOT_CF9_FORCE_STR     "cf9_force"
> > + #define BOOT_CF9_FORCE_STR     "pci"
> > - #define BOOT_CF9_SAFE_STR      "cf9_safe"
> 
> Either BOOT_PCI_STR or BOOT_CF9_FORCE_STR, I have no strong preference.
> 
> The syntax is 'pci' while the enum BOOT_CF9_FORCE, so we can't please both.

The question is whether we should modify/allow to set these values at
all.

Anyway, we must prevent them on non-x86 architectures because
the reboot behavior would be undefined there. They could probably
make a mess even on many x86-architectures.

I have to admit it has become much more complicated than I thought.
It brings back Andrew's original question whether this interface is
really needed. Are you going to use in the real life?

The interface might do more harm then good when it allows to set
reboot_type that is not normally accessible or disable it when
it is strictly needed.

Anyway, we should get input from some x86-experts about the BOOT_CF9
values.

Best Regards,
Petr

  reply	other threads:[~2020-11-13 20:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 20:27 [PATCH v4] reboot: allow to specify reboot mode via sysfs Matteo Croce
2020-11-12  3:50 ` [PATCH] reboot: Fix variable assignments in type_store Nathan Chancellor
2020-11-12 11:26   ` Matteo Croce
2020-11-12 17:49     ` Nathan Chancellor
2020-11-12 17:59       ` Matteo Croce
2020-11-12 18:09         ` Nathan Chancellor
2020-11-12 23:13   ` Andrew Morton
2020-11-13  0:20     ` Matteo Croce
2020-11-13  0:41       ` Matteo Croce
2020-11-13  1:18       ` Andrew Morton
2020-11-13  1:38         ` Matteo Croce
2020-11-13  2:46           ` Andrew Morton
2020-11-13  2:58             ` Matteo Croce
2020-11-13 20:06               ` Petr Mladek [this message]
2020-11-13 21:28                 ` Matteo Croce
2020-11-18 11:47                   ` Petr Mladek
2020-11-13 15:56   ` Petr Mladek
2021-02-22 10:03 ` [PATCH v4] reboot: allow to specify reboot mode via sysfs Pavel Machek
2021-02-22 13:12   ` Matteo Croce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113162043.GO1602@alley \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mcroce@linux.microsoft.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=rppt@kernel.org \
    --cc=tyhicks@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).