[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyphF8kd4OwWdar4p5M1=Sxc54sfk0RWFPpO6zrezZwJA@mail.gmail.com>
Date: Wed, 2 Apr 2014 18:47:57 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jiri Kosina <jkosina@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mateusz Guzik <mguzik@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
Ingo Molnar <mingo@...nel.org>, Mel Gorman <mgorman@...e.de>,
Kay Sievers <kay@...y.org>
Subject: Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline
On Wed, Apr 2, 2014 at 4:52 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> TOTALLY UNTESTED. But it really isn't complex.
Oh, and here's a patch that is actually lightly tested. I did
while :; do echo hello; done > /dev/kmsg
(the 'yes' program buffers output, so won't work) and I get
[ 122.062912] hello
[ 122.062915] hello
[ 122.062918] hello
[ 122.062921] hello
[ 122.062924] hello
[ 122.062927] hello
[ 122.062930] hello
[ 122.062932] hello
[ 122.062935] hello
[ 122.062938] hello
[ 127.062671] bash: 2104439 callbacks suppressed
so it works (repeating every five seconds, as expected).
It's definitely not perfect - if we suppress output, and the process
then closes the file descriptor rather than continuing to write more,
you won't get that "suppressed" message. But it's a usable starting
point for testing and commentary on the actual limits.
So we should probably add reporting about suppressed messages at file
close time, and we should tweak the limits (for example, perhaps not
limit things if the buffers are largely empty - which happens at
bootup), but on the whole I think this is a reasonable thing to do.
Whether it actually fixes the problem that Borislav had is
questionable, of course. For all I know, systemd debug mode generates
so much data in *other* ways and then causes feedback loops with the
kernel debugging that this patch is totally immaterial, and dmesg was
never the main issue. But unlike the "hide 'debug' from
/proc/cmdline", I think this patch at least _conceptually_ makes a lot
of sense, even if systemd gets fixed, so ...
Borislav?
Linus
View attachment "patch.diff" of type "text/plain" (1907 bytes)
Powered by blists - more mailing lists