public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit
Date: Wed, 19 Dec 2018 09:50:16 +0100	[thread overview]
Message-ID: <20181219085016.kvb6o7e4pz2hkjna@pathway.suse.cz> (raw)
In-Reply-To: <20181218123748.3aadd16c@gandalf.local.home>

On Tue 2018-12-18 12:37:48, Steven Rostedt wrote:
> On Tue, 18 Dec 2018 18:21:09 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > On Wed, Dec 19, 2018 at 01:52:17AM +0900, Sergey Senozhatsky wrote:
> > > On (12/18/18 16:24), Borislav Petkov wrote:  
> > > > On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Senozhatsky wrote:  
> > > > > Right, but unlike log_buf_len, devkmsg is a bit close to a "binary" knob:
> > > > > either all messages or none;  
> > > > 
> > > > ... which is perfectly fine for a debugging session.  
> > > 
> > > But devkmsg ratelimits systemd errors, so one does not even know that
> > > "some debugging is required". For instance from my x86 box:
> > > 
> > >  Unmounting /home...
> > >  [..]
> > >  home.mount: Mount process exited, code=exited status=32
> > >  Failed unmounting /home.
> > > 
> > > I don't want to debug systemd, I want to know that something didn't
> > > work out. 10 messages max and 5 seconds interval looks a bit too strict.  
> > 
> > Again, complain to system-doofus for printing so much crap to somewhere
> > it should not print to begin with.
> 
> I've been saying that it would be good to make the kmsg be a separate
> buffer that just gets interleaved with the kernel buffer. Userspace
> processes should never be able to overwrite messages from the kernel.

There was a proposal for this few years ago, see
https://lkml.kernel.org/r/1435920595-30879-1-git-send-email-m.niesluchow@samsung.com

Honestly, I got scared. It proposed an interface for dynamically adding
separate /dev/kmsg devices and related log buffers. This smells with
huge amount of messages that might fight for console throughput and
complicate printk code.

Best Regards,
Petr

  reply	other threads:[~2018-12-19  8:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18  9:18 [RFC][PATCH] printk: increase devkmsg write() ratelimit Sergey Senozhatsky
2018-12-18 10:48 ` Peter Zijlstra
2018-12-18 11:17   ` Sergey Senozhatsky
2018-12-18 11:29     ` Peter Zijlstra
2018-12-18 13:09       ` Sergey Senozhatsky
2018-12-18 11:47     ` Borislav Petkov
2018-12-18 13:07       ` Sergey Senozhatsky
2018-12-18 14:26         ` Borislav Petkov
2018-12-18 14:55           ` Sergey Senozhatsky
2018-12-18 15:03             ` Borislav Petkov
2018-12-18 15:14               ` Sergey Senozhatsky
2018-12-18 15:24                 ` Borislav Petkov
2018-12-18 16:52                   ` Sergey Senozhatsky
2018-12-18 17:21                     ` Peter Zijlstra
2018-12-18 17:37                       ` Steven Rostedt
2018-12-19  8:50                         ` Petr Mladek [this message]
2018-12-20 11:35                         ` Sergey Senozhatsky
2018-12-20 13:58                           ` Steven Rostedt
2018-12-21  7:32                             ` Sergey Senozhatsky
2018-12-18 17:47                     ` Borislav Petkov
2018-12-19  1:46                       ` Sergey Senozhatsky
2018-12-18 14:02 ` Sergey Senozhatsky

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=20181219085016.kvb6o7e4pz2hkjna@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --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