linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, "Franck Bui" <fbui@suse.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH -v4 2/2] printk: Add kernel parameter to control writes to /dev/kmsg
Date: Mon, 18 Jul 2016 10:18:09 +0800	[thread overview]
Message-ID: <20160718021809.GA6310@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <20160717054035.GA16383@nazgul.tnic>

On 07/17/16 at 07:40am, Borislav Petkov wrote:
> On Sat, Jul 16, 2016 at 06:44:25PM +0800, Dave Young wrote:
> 
> ...
> 
> > Mis-ratelimit cause critical userspace messages being lost, that is worse
> 
> The current setting is quite generous so that all critical messages
> should land in dmesg. Besides, we don't ratelimit during boot. The idea
> is that userspace should switch to a different logging facility once the
> system is up... which userspace does reportedly.

I would say avoiding ratelimit during boot make no much sense. Userspace can not
write to /dev/kmsg when system_state == SYSTEM_BOOTING because init process
has not run yet.

> 
> IOW, /dev/kmsg should handle a relatively big logging amount without
> ratelimiting.
> 
> > than use off as default. Suppose we turn off devkmsg by default distributions
> > can still turn on it with sysctl and for us who do not want the flooding we can
> > use printk.devkmsg=off in kernel cmdline to override it.
> 
> That part I cannot parse.

I do not understand, care to elaborate a bit?

Let me explain my comments, I means to set printk.devkmsg=off by default,
userspace can set it to on by sysctl. User can provide kernel cmdline
printk.devkmsg=off if he/she want.

Or set printk.devkmsg=on by default to avoid break userspace, it is also fine.

> 
> > Of course if we turn off it by default we can print a warning to alert user.
> > 
> > BTW, for userspace messages maybe they should not go to same log buffer, maybe
> > a separate log buffer for /dev/msg will be better.
> 
> See above.
> 

Thanks
Dave

  reply	other threads:[~2016-07-18  2:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08  9:18 [PATCH -v4 0/2] printk.devkmsg: Ratelimit it by default Borislav Petkov
2016-07-08  9:18 ` [PATCH -v4 1/2] ratelimit: Extend to print suppressed messages on release Borislav Petkov
2016-07-14 20:29   ` Andrew Morton
2016-07-15  4:00     ` Borislav Petkov
2016-07-08  9:18 ` [PATCH -v4 2/2] printk: Add kernel parameter to control writes to /dev/kmsg Borislav Petkov
2016-07-14 20:23   ` Andrew Morton
2016-07-14 20:39     ` Steven Rostedt
2016-07-15  4:29     ` Borislav Petkov
2016-07-15  6:21   ` Dave Young
2016-07-15 12:45     ` Borislav Petkov
2016-07-16 10:44       ` Dave Young
2016-07-17  5:40         ` Borislav Petkov
2016-07-18  2:18           ` Dave Young [this message]
2016-07-18  4:44             ` Borislav Petkov
2016-07-18  5:20               ` Dave Young
2016-07-18  7:21                 ` Borislav Petkov
2016-07-18  7:38                   ` Dave Young
2016-07-18  8:08                     ` Borislav Petkov
2016-07-18  8:17                       ` Dave Young
2016-07-18  9:06                         ` Borislav Petkov
2016-07-19  0:35                           ` Dave Young
2016-07-19  6:49                             ` Borislav Petkov
2016-07-19  7:02                               ` Dave Young
2016-07-25 15:18                         ` Steven Rostedt

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=20160718021809.GA6310@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=fbui@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).