Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754969AbcDYSlF (ORCPT ); Mon, 25 Apr 2016 14:41:05 -0400 Received: from smtprelay0223.hostedemail.com ([216.40.44.223]:50672 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933058AbcDYSlE convert rfc822-to-8bit (ORCPT ); Mon, 25 Apr 2016 14:41:04 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3167:3352:3622:3865:3866:3867:3868:3870:3872:3874:5007:6117:6261:7875:7903:8660:10004:10226:10400:10848:10967:11026:11232:11658:11914:12050:12296:12438:12517:12519:12740:13069:13148:13230:13311:13357:14181:14659:14721:21080:21212:21220:30051:30054:30083:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: chain49_5fad2de839d43 X-Filterd-Recvd-Size: 2225 Date: Mon, 25 Apr 2016 14:40:56 -0400 From: Steven Rostedt To: Borislav Petkov Cc: Linus Torvalds , LKML , Andrew Morton , Ingo Molnar , Peter Zijlstra , Greg Kroah-Hartman , Uwe =?UTF-8?B?S2xlaW5lLUs=?= =?UTF-8?B?w7ZuaWc=?= Subject: Re: [PATCH] printk: Add kernel parameter to disable writes to /dev/kmsg Message-ID: <20160425144056.288eea62@gandalf.local.home> In-Reply-To: <20160425183249.GK28454@pd.tnic> References: <20160425130629.188a901c@gandalf.local.home> <20160425130853.3656910b@gandalf.local.home> <20160425183249.GK28454@pd.tnic> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 30 On Mon, 25 Apr 2016 20:32:50 +0200 Borislav Petkov wrote: > 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=... > I agree. And Uwe Kleine-König suggested to make it read_mostly. I'll send a v2. -- Steve