Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933447AbcDYTal (ORCPT ); Mon, 25 Apr 2016 15:30:41 -0400 Received: from smtprelay0179.hostedemail.com ([216.40.44.179]:34904 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933240AbcDYTak (ORCPT ); Mon, 25 Apr 2016 15:30:40 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2898:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3873:3874:5007:6119:6261:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12043:12050:12517:12519:12663:12740:13069:13075:13161:13200:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:21212:21433:30029:30051:30054:30070: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: skate56_5cb3b91ca5025 X-Filterd-Recvd-Size: 2836 Date: Mon, 25 Apr 2016 15:30:35 -0400 From: Steven Rostedt To: Greg Kroah-Hartman Cc: Peter Zijlstra , Linus Torvalds , LKML , Ingo Molnar , Borislav Petkov , Andrew Morton , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= Subject: Re: [PATCH v2] printk: Add kernel parameter to disable writes to /dev/kmsg Message-ID: <20160425153035.001a1225@gandalf.local.home> In-Reply-To: <20160425191815.GA24761@kroah.com> References: <20160425145606.598329f2@gandalf.local.home> <20160425190651.GL3448@twins.programming.kicks-ass.net> <20160425191815.GA24761@kroah.com> 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=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1610 Lines: 43 On Mon, 25 Apr 2016 12:18:15 -0700 Greg Kroah-Hartman wrote: > On Mon, Apr 25, 2016 at 09:06:51PM +0200, Peter Zijlstra wrote: > > On Mon, Apr 25, 2016 at 02:56:06PM -0400, Steven Rostedt wrote: > > > +static bool __read_mostly devkmsg_disabled; > > > +static int __init disable_devkmsg(char *str) > > > +{ > > > + devkmsg_disabled = true; > > > + return 0; > > > +} > > > +__setup("printk.disable_kmsg_write", disable_devkmsg); > > > > Again, please default enable and use an easier name to toggle this. > > Userspace flooding this with junk is really insane. Peter, I would love to default enable it, but as Greg said... > > If you default enable, you break working systems today that want to log > stuff through this interface, sorry. I'm not trying to be confrontational here, as these conversations usually become. I just want a way to keep my systems from having user space blowing away logs I care about. This is my way to compromise, letting distros continue to do things the way they always do, and a way for us to not be disrupted by it. I could also add a config that default enables it. Then you just need to make sure that config is set when you build your kernels. That doesn't help me as I also want this in kernels that I don't build. Peter, yes it's a rather long nasty name to remember, but it's documented in kernel-parameters.txt and once you add it as your default command line, you should be able to quickly forget about it. That's my plan. There's too many parameters already that namespace pollution pretty much dictates this. :-/ -- Steve