Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161072AbaDBXxC (ORCPT ); Wed, 2 Apr 2014 19:53:02 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:44970 "EHLO mail-vc0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030190AbaDBXxA (ORCPT ); Wed, 2 Apr 2014 19:53:00 -0400 MIME-Version: 1.0 In-Reply-To: References: <20140402144219.4cafbe37@gandalf.local.home> <20140402221212.GD16570@mguzik.redhat.com> <20140402162839.d3c00e9845e89d0f092c2ce3@linux-foundation.org> Date: Wed, 2 Apr 2014 16:52:59 -0700 X-Google-Sender-Auth: Jpb89jSCqRj_FUgsGgtBia7acNU Message-ID: Subject: Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline From: Linus Torvalds To: Jiri Kosina Cc: Andrew Morton , Mateusz Guzik , Greg Kroah-Hartman , Steven Rostedt , LKML , Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov , Ingo Molnar , Mel Gorman , Kay Sievers Content-Type: multipart/mixed; boundary=047d7b3436d2044bbf04f617fc46 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --047d7b3436d2044bbf04f617fc46 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 2, 2014 at 4:47 PM, Jiri Kosina wrote: > > Which doesn't really protect you from tasks that do open()/write()/close() > cycle for /dev/kmsg write every 2ms though. I don't think we should try to protect against wilful bad behavior unless that is shown to be necessary. Yeah, if it turns out that systemd really does that just to mess with us, we'd need to extend it, but in the absence of proof to the contrary, maybe this simple attached patch works? TOTALLY UNTESTED. But it really isn't complex. The complexity is likely to be about setting the actual default values. So consider this a RFC and a "does this fix the problem that Borislav reported?" test-patch. Borislav? Linus --047d7b3436d2044bbf04f617fc46 Content-Type: text/plain; charset=US-ASCII; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f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FRkFVTFRfUkFURUxJTUlUX0lOVEVSVkFMLCBERUZBVUxUX1JBVEVMSU1JVF9CVVJTVCk7CisK IAltdXRleF9pbml0KCZ1c2VyLT5sb2NrKTsKIAogCXJhd19zcGluX2xvY2tfaXJxKCZsb2didWZf bG9jayk7Cg== --047d7b3436d2044bbf04f617fc46-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/