Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030213AbaDBTHj (ORCPT ); Wed, 2 Apr 2014 15:07:39 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40796 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932910AbaDBTHg (ORCPT ); Wed, 2 Apr 2014 15:07:36 -0400 Message-ID: <533C6012.20800@infradead.org> Date: Wed, 02 Apr 2014 12:08:02 -0700 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 MIME-Version: 1.0 To: Andrew Morton CC: Steven Rostedt , LKML , Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov , Ingo Molnar , Mel Gorman , Kay Sievers Subject: Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline References: <20140402144219.4cafbe37@gandalf.local.home> <20140402120440.1644d6a6486c554a33e584bc@linux-foundation.org> In-Reply-To: <20140402120440.1644d6a6486c554a33e584bc@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02/2014 12:04 PM, Andrew Morton wrote: > On Wed, 2 Apr 2014 14:42:19 -0400 Steven Rostedt wrote: > >> It has come to our attention that a system running a specific user >> space init program will not boot if you add "debug" to the kernel >> command line. What happens is that the user space tool parses the >> kernel command line, and if it sees "debug" it will spit out so much >> information that the system fails to boot. This basically renders the >> "debug" option for the kernel useless. >> >> This bug has been reported to the developers of said tool >> here: >> >> https://bugs.freedesktop.org/show_bug.cgi?id=76935 >> >> The response is: >> >> "Generic terms are generic, not the first user owns them." >> >> That is, the "debug" statement on the *kernel* command line is not >> owned by the kernel just because it was the first user of it, and >> they refuse to fix their bug. >> >> Well, my response is, we OWN the kernel command line, and as such, we >> can keep the users from seeing stuff on it if we so choose. And with >> that, I propose this patch, which hides "debug" from /proc/cmdline, >> such that we don't have to worry about tools parsing for it and causing >> hardship for those trying to debug the kernel. >> > > I had to check the date on this but surprisingly, it's all post > April 1. > > --- a/fs/read_write.c~a > +++ a/fs/read_write.c > @@ -513,6 +513,8 @@ SYSCALL_DEFINE3(read, unsigned int, fd, > struct fd f = fdget_pos(fd); > ssize_t ret = -EBADF; > > + BUG_ON(!strcmp(current->comm, "systemd")); > + > if (f.file) { > loff_t pos = file_pos_read(f.file); > ret = vfs_read(f.file, buf, count, &pos); > _ Ack here. This situation is ridiculous. -- ~Randy -- 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/