linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Petr Mladek <pmladek@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Ondrej Mosnacek <omosnace@redhat.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v2] twist: allow converting pr_devel()/pr_debug() into snprintf()
Date: Thu, 28 May 2020 17:28:42 -0700	[thread overview]
Message-ID: <CAHk-=wjj9ooYACNvO2P_Gr_=aN0g=iEqtg0TwBJo18wbn4gthg@mail.gmail.com> (raw)
In-Reply-To: <13b0a475-e70e-c490-d34d-0c7a34facf7c@i-love.sakura.ne.jp>

On Thu, May 28, 2020 at 5:08 PM Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
>
> You mean "export these behavior as kernel command line options"? That will
> involve run-time costs (while build-time branching based on #ifdef can
> completely eliminate run-time costs).

Are _any_ of these things meaningful?

> Also, as number of options which
> can be controlled at boot-time grows, the kernel command line will become
> too long to specify all of these behavior.

So? We have explicitly added boot-config files for exactly this,
because people who do boot-time tracing wanted this.

> Why do you think "syzkaller is special" ? There is no syzkaller-specific
> choice.

ALL of these are designed to be totally about syzkaller. Nobody else
has ever asked for the TWIST options. And if they have, they'd still
make more sense as generic real actual options than as some odd
"twist" thing.

> Current kernel is not well segmented enough to allow switching based on
> per process flags. We can't distinguish whether some kernel message was
> caused by a process with such flags.

Who said anything at all about per process?

> All we could afford is to switch based on kernel boot command line. But
> that will entail a lot of code/data (and runtime-cost) which is not used
> if the administrator does not turn on the switches.

Absolutely nobody cares.

In fact, I'd prefer it just so that the options would be individually
explained, and not hidden away in some odd kernel config file, and
would be visible and force people to have sane nam,es.

> After all, switching at the kernel configuration phase is the most simple
> approach.

No it isn't. It's the UGLIEST possible approach, forcing a nasty
horrible config process to be even worse, forcing a compile-time
decision for something that isn't at all obvious should be
compile-time, and forcing crazy ugly config option names because they
are all just odd.

I have complained about this for MONTHS. You never never actually
explained why you want these badly named config options.

If it's something _so_ core that it affects performance, then no,
syzkaller shouldn't be messing with it in the first place, because
then you'd be testing something that is entirely irrelevant to anybody
else.

And if it's about things like "disable sysrq-k", and it might be
useful to somebody else than syzkaller, then it would be *much* better
off as a boot option so that you don't have to recompile the kernel to
pick it.

Some things might even be worth having a runtime option for.

But this "put random options, give them random names, and force them
all as compile-time options in a nasty kernel config process" just
smells.

And if they are _so_ specialized that only syzkaller could possibly
care, I still maintain that they shouldn't go upstream at all.

               Linus

  reply	other threads:[~2020-05-29  0:29 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 14:50 [PATCH] twist: allow converting pr_devel()/pr_debug() into printk(KERN_DEBUG) Tetsuo Handa
2020-05-24 17:38 ` Joe Perches
2020-05-24 19:18   ` Ondrej Mosnacek
2020-05-25  5:03     ` Tetsuo Handa
2020-05-25  6:07       ` Joe Perches
2020-05-25  7:38         ` Dmitry Vyukov
2020-05-25  8:42 ` Petr Mladek
2020-05-25  9:11   ` Sergey Senozhatsky
2020-05-25 10:43     ` Tetsuo Handa
2020-05-27  8:37       ` Petr Mladek
2020-05-27 10:13         ` Tetsuo Handa
2020-05-27 15:55           ` Petr Mladek
2020-05-27 23:33             ` Tetsuo Handa
2020-05-28  6:56               ` [PATCH v2] twist: allow converting pr_devel()/pr_debug() into snprintf() Tetsuo Handa
2020-05-28 11:06                 ` Petr Mladek
2020-05-28 15:16                   ` Tetsuo Handa
2020-05-28 19:10                     ` Andrew Morton
2020-05-28 19:50                     ` Linus Torvalds
2020-05-28 20:01                       ` Linus Torvalds
2020-05-29  0:07                         ` Tetsuo Handa
2020-05-29  0:28                           ` Linus Torvalds [this message]
2020-05-29  2:13                             ` Tetsuo Handa
2020-05-29  2:24                               ` Linus Torvalds
2020-05-29  4:47                                 ` Tetsuo Handa
2020-05-29 13:26                                   ` Tetsuo Handa
2020-06-03 11:03                                     ` twist: allow disabling reboot request Tetsuo Handa
2020-06-03 12:44                                       ` Petr Mladek
2020-06-03 13:35                                         ` Tetsuo Handa
2020-06-04 10:21                                           ` Petr Mladek
2020-06-08  7:48                                     ` [PATCH v2] twist: allow converting pr_devel()/pr_debug() into snprintf() Dmitry Vyukov
2020-06-08 10:30                                       ` Tetsuo Handa
2020-06-08 11:31                                       ` Andrey Konovalov
2020-05-29  8:17                       ` Petr Mladek
2020-06-08 16:39                 ` Geert Uytterhoeven
2020-05-28 10:59               ` [PATCH] twist: allow converting pr_devel()/pr_debug() into printk(KERN_DEBUG) Petr Mladek
2020-05-28 11:33                 ` Tetsuo Handa
2020-05-28 12:14                   ` Petr Mladek
2020-05-28 14:13                     ` Tetsuo Handa
2020-05-28 17:08                     ` Joe Perches
2020-05-29  2:04       ` Sergey Senozhatsky
2020-05-29  5:06         ` Tetsuo Handa
2020-05-27  9:59 ` kbuild test robot
2020-05-27 13:41   ` Tetsuo Handa
2020-05-27 12:37 ` kbuild test robot

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='CAHk-=wjj9ooYACNvO2P_Gr_=aN0g=iEqtg0TwBJo18wbn4gthg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.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).