Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933471AbcDYTfb (ORCPT ); Mon, 25 Apr 2016 15:35:31 -0400 Received: from smtprelay0035.hostedemail.com ([216.40.44.35]:56442 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933381AbcDYTfa (ORCPT ); Mon, 25 Apr 2016 15:35:30 -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:3866:3867:3868:3871:3872:3873:3874:5007:6261:7875:7903:10004:10400:10848:10967:11232:11658:11914:12043:12517:12519:12740:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21212:21324:21433:30029:30051:30054:30056: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:10,LUA_SUMMARY:none X-HE-Tag: route01_86ff80612d13b X-Filterd-Recvd-Size: 2663 Date: Mon, 25 Apr 2016 15:35:26 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Peter Zijlstra , LKML , Ingo Molnar , Borislav Petkov , Greg Kroah-Hartman , Andrew Morton , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5p?= =?UTF-8?B?Zw==?= Subject: Re: [PATCH v2] printk: Add kernel parameter to disable writes to /dev/kmsg Message-ID: <20160425153526.284cb76a@gandalf.local.home> In-Reply-To: References: <20160425145606.598329f2@gandalf.local.home> <20160425190651.GL3448@twins.programming.kicks-ass.net> 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: 1367 Lines: 32 On Mon, 25 Apr 2016 12:28:30 -0700 Linus Torvalds wrote: > On Mon, Apr 25, 2016 at 12:06 PM, Peter Zijlstra wrote: > > > > Again, please default enable and use an easier name to toggle this. > > Userspace flooding this with junk is really insane. > > I think it should be a tristate with "yes/no/ratelimit", and let's > default to ratelimit. Hmm, as this is currently decided on opening, it would be an interesting task, and more complex. But I could look into it. > > And I also suspect that we would be better off not returning an error > (which could make user space decide to break, either intentionally or > just because some people think that "error handling is important" > means that you should abort on all errors you don't recognize), but > just silently drop the write. IOW, the "no" would just be a rather > extreme form of rate-limiting, while "yes" would just be the other > extreme. > Actually, systemd currently does the right thing when this errors on opening. It finds another way to do logging. At least on my boxes that I tested (Debian testing and Fedora 18). If it doesn't error out, systemd may decided to continue to use this as its means for general purpose logging, and now I lose out on the logging of userspace, as everything that systemd does is silently dropped. -- Steve