Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933405AbcDYScz (ORCPT ); Mon, 25 Apr 2016 14:32:55 -0400 Received: from mail.skyhub.de ([78.46.96.112]:47175 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933242AbcDYScy (ORCPT ); Mon, 25 Apr 2016 14:32:54 -0400 Date: Mon, 25 Apr 2016 20:32:50 +0200 From: Borislav Petkov To: Steven Rostedt Cc: Linus Torvalds , LKML , Andrew Morton , Ingo Molnar , Peter Zijlstra , Greg Kroah-Hartman Subject: Re: [PATCH] printk: Add kernel parameter to disable writes to /dev/kmsg Message-ID: <20160425183249.GK28454@pd.tnic> References: <20160425130629.188a901c@gandalf.local.home> <20160425130853.3656910b@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160425130853.3656910b@gandalf.local.home> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 30 On Mon, Apr 25, 2016 at 01:08:53PM -0400, Steven Rostedt wrote: > [ Sorry for the resend, I forgot to add "[PATCH]" to the subject, which > may make this fail filters. ] > > 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: ... > + disable_devkmsg_write > + Disable writing to /dev/kmsg. This prevents user space > + tools from writing into the kernel printk buffers. > + When set, opening /dev/kmsg for write mode will return > + -EPERM. I like the general idea. Perhaps can call that param "printk.disable_devkmsg" or so with the proper namespace and in light of printk.always_kmsg_dump=... Anyway, just my 2ยข. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.