Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964771AbcDYT2c (ORCPT ); Mon, 25 Apr 2016 15:28:32 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:36339 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933240AbcDYT2b (ORCPT ); Mon, 25 Apr 2016 15:28:31 -0400 MIME-Version: 1.0 In-Reply-To: <20160425190651.GL3448@twins.programming.kicks-ass.net> References: <20160425145606.598329f2@gandalf.local.home> <20160425190651.GL3448@twins.programming.kicks-ass.net> Date: Mon, 25 Apr 2016 12:28:30 -0700 X-Google-Sender-Auth: qPqjdf8XvoIILHMzUbHY3EP6hk4 Message-ID: Subject: Re: [PATCH v2] printk: Add kernel parameter to disable writes to /dev/kmsg From: Linus Torvalds To: Peter Zijlstra Cc: Steven Rostedt , LKML , Ingo Molnar , Borislav Petkov , Greg Kroah-Hartman , Andrew Morton , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 739 Lines: 17 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. 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. Linus