public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: printk: Add kernel parameter to disable writes to /dev/kmsg
Date: Mon, 25 Apr 2016 20:50:15 +0200	[thread overview]
Message-ID: <20160425185015.GJ3448@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160425130629.188a901c@gandalf.local.home>

On Mon, Apr 25, 2016 at 01:06:29PM -0400, Steven Rostedt wrote:
> Over the weekend my server was acting funny. The display wasn't working
> well, and I assumed that a driver was going bad. I went to look at the
> kernel dmesg, but the buffer only had the following over and over:
> 
> [226062.401405] systemd-logind[3511]: Removed session 4168.
> [226063.381051] systemd-logind[3511]: Removed session 4169.

> The kernel buffer was completely overridden by useless spewing from

Yes it does this. I usually fix this with: apt-get install sysvinit

> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index bfbf284e4218..b704b48415a0 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -85,6 +85,15 @@ static struct lockdep_map console_lock_dep_map = {
>  };
>  #endif
>  
> +static bool devkmsg_disabled;
> +static int __init disable_devkmsg(char *str)
> +{
> +	devkmsg_disabled = true;
> +	return 0;
> +}
> +__setup("disable_devkmsg_write", disable_devkmsg);
> +

Can't we default enable this? Or at the very least make this easier to
type? I'll never remember how exactly this thing will be called.

  parent reply	other threads:[~2016-04-25 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 17:06 printk: Add kernel parameter to disable writes to /dev/kmsg Steven Rostedt
2016-04-25 17:08 ` [PATCH] " Steven Rostedt
2016-04-25 18:32   ` Borislav Petkov
2016-04-25 18:40     ` Steven Rostedt
2016-04-25 18:50 ` Peter Zijlstra [this message]
2016-04-26 18:44 ` Pavel Machek
2016-04-26 19:47   ` Steven Rostedt
2016-04-27 11:25     ` Austin S. Hemmelgarn

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=20160425185015.GJ3448@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /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