Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-20 Thread Rusty Russell
Diego Viola writes: > Can't you just make a commit to fix it? If you want I can submit a patch. > > Sorry to be so OCD about this. You know, I'd love to. If it were up to *me* I would. But my boss is a stickler, y'know, and I've all filled my quota of useless makework for the century. Hell, I

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-20 Thread Diego Viola
Can't you just make a commit to fix it? If you want I can submit a patch. Sorry to be so OCD about this. On Mon, May 19, 2014 at 10:26 PM, Rusty Russell wrote: > Randy Dunlap writes: >> On 05/19/2014 01:11 AM, Diego Viola wrote: >>> I mean "e.g.:" is wrong, it should be e.g. or e.g., >> >> I

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-20 Thread Diego Viola
Can't you just make a commit to fix it? If you want I can submit a patch. Sorry to be so OCD about this. On Mon, May 19, 2014 at 10:26 PM, Rusty Russell ru...@rustcorp.com.au wrote: Randy Dunlap rdun...@infradead.org writes: On 05/19/2014 01:11 AM, Diego Viola wrote: I mean e.g.: is wrong, it

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-20 Thread Rusty Russell
Diego Viola diego.vi...@gmail.com writes: Can't you just make a commit to fix it? If you want I can submit a patch. Sorry to be so OCD about this. You know, I'd love to. If it were up to *me* I would. But my boss is a stickler, y'know, and I've all filled my quota of useless makework for the

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-19 Thread Rusty Russell
Randy Dunlap writes: > On 05/19/2014 01:11 AM, Diego Viola wrote: >> I mean "e.g.:" is wrong, it should be e.g. or e.g., > > I don't see that in the wikipedia page. Are you basing that on > "in this usage it is sometimes followed by a comma, depending on style."? > > I don't see a problem with

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-19 Thread Randy Dunlap
On 05/19/2014 01:11 AM, Diego Viola wrote: > I mean "e.g.:" is wrong, it should be e.g. or e.g., I don't see that in the wikipedia page. Are you basing that on "in this usage it is sometimes followed by a comma, depending on style."? I don't see a problem with the colon, since the quoted phrase

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-19 Thread Diego Viola
I mean "e.g.:" is wrong, it should be e.g. or e.g., Sorry to be too nitpicky or annoying about this. Diego On Mon, May 19, 2014 at 5:06 AM, Diego Viola wrote: > e.g. should be written as e.g. or e.g., > > There's no need to add another colon ":" after the one that it's already > there. > >

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-19 Thread Diego Viola
e.g. should be written as e.g. or e.g., There's no need to add another colon ":" after the one that it's already there. See, http://en.wikipedia.org/wiki/E.g.#e.g. Please fix that. Thanks, Diego On Mon, May 5, 2014 at 9:57 PM, Rusty Russell wrote: > Randy Dunlap writes: >> All looks good

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-19 Thread Rusty Russell
Randy Dunlap rdun...@infradead.org writes: On 05/19/2014 01:11 AM, Diego Viola wrote: I mean e.g.: is wrong, it should be e.g. or e.g., I don't see that in the wikipedia page. Are you basing that on in this usage it is sometimes followed by a comma, depending on style.? I don't see a

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-19 Thread Diego Viola
e.g. should be written as e.g. or e.g., There's no need to add another colon : after the one that it's already there. See, http://en.wikipedia.org/wiki/E.g.#e.g. Please fix that. Thanks, Diego On Mon, May 5, 2014 at 9:57 PM, Rusty Russell ru...@rustcorp.com.au wrote: Randy Dunlap

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-19 Thread Diego Viola
I mean e.g.: is wrong, it should be e.g. or e.g., Sorry to be too nitpicky or annoying about this. Diego On Mon, May 19, 2014 at 5:06 AM, Diego Viola diego.vi...@gmail.com wrote: e.g. should be written as e.g. or e.g., There's no need to add another colon : after the one that it's already

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-19 Thread Randy Dunlap
On 05/19/2014 01:11 AM, Diego Viola wrote: I mean e.g.: is wrong, it should be e.g. or e.g., I don't see that in the wikipedia page. Are you basing that on in this usage it is sometimes followed by a comma, depending on style.? I don't see a problem with the colon, since the quoted phrase has

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Thu, Apr 3, 2014 at 5:03 AM, Borislav Petkov wrote: > On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: >> Once is an accident. Twice is incompetence. Three times is malice. > > Yeah, maybe it is time Linus started his own init daemon project, like > that other thing, git, he

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Sun, Apr 6, 2014 at 3:49 PM, David Timothy Strauss wrote: > On Fri, Apr 4, 2014 at 11:57 AM, Linus Torvalds > wrote: >> Since I haven't even heard a "my bad" from the systemd people, I'd be >> inclined to say that a bit of protection for future issues would be a >> good idea. > > Just coming

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Thu, Apr 3, 2014 at 12:06 PM, Greg Kroah-Hartman wrote: > On Thu, Apr 03, 2014 at 08:17:33AM -0700, Tim Bird wrote: >> >> I had no idea systemd was so verbose and was abusing the kernel >> log buffers so badly. I'm not a big fan of the rate-limiting, as this just >> seems to encourage this

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Thu, Apr 3, 2014 at 12:06 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Apr 03, 2014 at 08:17:33AM -0700, Tim Bird wrote: I had no idea systemd was so verbose and was abusing the kernel log buffers so badly. I'm not a big fan of the rate-limiting, as this just seems to

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Sun, Apr 6, 2014 at 3:49 PM, David Timothy Strauss da...@davidstrauss.net wrote: On Fri, Apr 4, 2014 at 11:57 AM, Linus Torvalds torva...@linux-foundation.org wrote: Since I haven't even heard a my bad from the systemd people, I'd be inclined to say that a bit of protection for future

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-06 Thread Felipe Contreras
On Thu, Apr 3, 2014 at 5:03 AM, Borislav Petkov b...@alien8.de wrote: On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: Once is an accident. Twice is incompetence. Three times is malice. Yeah, maybe it is time Linus started his own init daemon project, like that other thing,

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-05 Thread Rusty Russell
Randy Dunlap writes: > All looks good to me except for 2 instances of "eg" which should be > "e.g." (just above and about 4 paragraphs below here). Thanks, fixed: diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 56a4c2d0c741..a42b9dd6b46b 100644 ---

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-05 Thread Randy Dunlap
On 05/04/2014 07:17 PM, Rusty Russell wrote: Andrew Morton writes: On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell wrote: Subject: param: hand arguments after -- straight to init The kernel passes any args it doesn't need through to init, except it assumes anything containing '.' belongs

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-05 Thread Randy Dunlap
On 05/04/2014 07:17 PM, Rusty Russell wrote: Andrew Morton a...@linux-foundation.org writes: On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Subject: param: hand arguments after -- straight to init The kernel passes any args it doesn't need through to init,

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-05 Thread Rusty Russell
Randy Dunlap rdun...@infradead.org writes: All looks good to me except for 2 instances of eg which should be e.g. (just above and about 4 paragraphs below here). Thanks, fixed: diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-04 Thread Rusty Russell
Andrew Morton writes: > On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell > wrote: > >> Subject: param: hand arguments after -- straight to init >> >> The kernel passes any args it doesn't need through to init, except it >> assumes anything containing '.' belongs to the kernel (for a module).

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-04 Thread Rusty Russell
Andrew Morton a...@linux-foundation.org writes: On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Subject: param: hand arguments after -- straight to init The kernel passes any args it doesn't need through to init, except it assumes anything containing '.'

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-05-02 Thread Andrew Morton
On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell wrote: > Subject: param: hand arguments after -- straight to init > > The kernel passes any args it doesn't need through to init, except it > assumes anything containing '.' belongs to the kernel (for a module). > This change means all users can

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-05-02 Thread Andrew Morton
On Mon, 07 Apr 2014 14:24:45 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Subject: param: hand arguments after -- straight to init The kernel passes any args it doesn't need through to init, except it assumes anything containing '.' belongs to the kernel (for a module). This change

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-23 Thread Borislav Petkov
On Wed, Apr 23, 2014 at 05:15:07PM +0200, Borislav Petkov wrote: > Ok, here's a dirty hack that issues ratelimit messages at release > time. I probably should wrap it nicely in ratelimit_*() accessors > instead of poking directly at ratelimit_state. Yeah, maybe a > ratelimit_exit() wrapper which

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-23 Thread Borislav Petkov
Hi Linus, here's some more massaging of your patch. (Btw, let's start a new thread). On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: > It's definitely not perfect - if we suppress output, and the process > then closes the file descriptor rather than continuing to write more, >

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-23 Thread Borislav Petkov
On Wed, Apr 23, 2014 at 05:15:07PM +0200, Borislav Petkov wrote: Ok, here's a dirty hack that issues ratelimit messages at release time. I probably should wrap it nicely in ratelimit_*() accessors instead of poking directly at ratelimit_state. Yeah, maybe a ratelimit_exit() wrapper which does

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-23 Thread Borislav Petkov
Hi Linus, here's some more massaging of your patch. (Btw, let's start a new thread). On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: It's definitely not perfect - if we suppress output, and the process then closes the file descriptor rather than continuing to write more, you

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-15 Thread Borislav Petkov
Hi Linus, just checking on the status here: what did we decide on this one in the end? It works as expected, it is a good idea to have it as a protection against every user space abuser, maybe we should apply it now that the merge window is over and things are calming down? Or should I remind

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-15 Thread Borislav Petkov
Hi Linus, just checking on the status here: what did we decide on this one in the end? It works as expected, it is a good idea to have it as a protection against every user space abuser, maybe we should apply it now that the merge window is over and things are calming down? Or should I remind

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-06 Thread Rusty Russell
Linus Torvalds writes: > On Wed, Apr 2, 2014 at 3:12 PM, Mateusz Guzik wrote: >> >> Well, parsing kernel cmdline by systemd is a bad idea > > No, we very much expose /proc/cmdline for a reason. System services > are *supposed* to parse it, because it gives a unified way for people > to pass in

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-06 Thread David Timothy Strauss
On Fri, Apr 4, 2014 at 11:57 AM, Linus Torvalds wrote: > Since I haven't even heard a "my bad" from the systemd people, I'd be > inclined to say that a bit of protection for future issues would be a > good idea. Just coming back to this thread now, I'll say something. I'm a systemd maintainer,

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-06 Thread One Thousand Gnomes
On Thu, 3 Apr 2014 13:03:39 +0200 Borislav Petkov wrote: > On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: > > Once is an accident. Twice is incompetence. Three times is malice. > > Yeah, maybe it is time Linus started his own init daemon project, like > that other thing, git,

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-06 Thread One Thousand Gnomes
On Thu, 3 Apr 2014 13:03:39 +0200 Borislav Petkov b...@alien8.de wrote: On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: Once is an accident. Twice is incompetence. Three times is malice. Yeah, maybe it is time Linus started his own init daemon project, like that other

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-06 Thread David Timothy Strauss
On Fri, Apr 4, 2014 at 11:57 AM, Linus Torvalds torva...@linux-foundation.org wrote: Since I haven't even heard a my bad from the systemd people, I'd be inclined to say that a bit of protection for future issues would be a good idea. Just coming back to this thread now, I'll say something. I'm

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-06 Thread Rusty Russell
Linus Torvalds torva...@linux-foundation.org writes: On Wed, Apr 2, 2014 at 3:12 PM, Mateusz Guzik mgu...@redhat.com wrote: Well, parsing kernel cmdline by systemd is a bad idea No, we very much expose /proc/cmdline for a reason. System services are *supposed* to parse it, because it gives a

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-05 Thread Theodore Ts'o
On Fri, Apr 04, 2014 at 04:17:49PM -0700, Greg Kroah-Hartman wrote: > > I think you mean "dmesg -T", and unfortunately it seems Debian 6.0.9 > > (or older) doesn ship a new enough linux-util since I've only got > > 2.17.2-9 install. > > No, 'dmesg -H' is the right thing, you just need a modern

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-05 Thread John Stoffel
> "Greg" == Greg Kroah-Hartman writes: Greg> On Fri, Apr 04, 2014 at 05:17:09PM -0400, John Stoffel wrote: >> > "Linus" == Linus Torvalds writes: >> Linus> On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: >> >> >> >> The other thing I've used /dev/kmsg for is to shove a "I'm

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-05 Thread John Stoffel
Greg == Greg Kroah-Hartman gre...@linuxfoundation.org writes: Greg On Fri, Apr 04, 2014 at 05:17:09PM -0400, John Stoffel wrote: Linus == Linus Torvalds torva...@linux-foundation.org writes: Linus On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: The other

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-05 Thread Theodore Ts'o
On Fri, Apr 04, 2014 at 04:17:49PM -0700, Greg Kroah-Hartman wrote: I think you mean dmesg -T, and unfortunately it seems Debian 6.0.9 (or older) doesn ship a new enough linux-util since I've only got 2.17.2-9 install. No, 'dmesg -H' is the right thing, you just need a modern version of

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Greg Kroah-Hartman
On Fri, Apr 04, 2014 at 05:17:09PM -0400, John Stoffel wrote: > > "Linus" == Linus Torvalds writes: > > Linus> On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski > wrote: > >> > >> The other thing I've used /dev/kmsg for is to shove a "I'm starting > >> something now" message in. This is

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Alexei Starovoitov
On Fri, Apr 4, 2014 at 1:17 PM, Theodore Ts'o wrote: > On Fri, Apr 04, 2014 at 03:44:26PM -0400, Steven Rostedt wrote: >> I saw one commenter say that this was a kernel bug because writing to >> kmsg shouldn't cause the system to hang. >> >> The rate-limit patch would go along with that idea, and

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 3:45 PM, Alexei Starovoitov wrote: > > can there be two bulletproof buffers: one for in kernel printk > and another ratelimited one for writes into /dev/kmsg. > On the read from /dev/kmsg they're combined by time. Or, you know, people could just stop spamming /dev/kmsg.

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread John Stoffel
> "Linus" == Linus Torvalds writes: Linus> On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: >> >> The other thing I've used /dev/kmsg for is to shove a "I'm starting >> something now" message in. This is only really necessary because the >> current kernel log timestamps are

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Theodore Ts'o
On Fri, Apr 04, 2014 at 03:44:26PM -0400, Steven Rostedt wrote: > I saw one commenter say that this was a kernel bug because writing to > kmsg shouldn't cause the system to hang. > > The rate-limit patch would go along with that idea, and I honestly > think it would be good to rate-limit it in

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Steven Rostedt
On Fri, 4 Apr 2014 11:51:39 -0700 Andrew Morton wrote: > On Fri, 4 Apr 2014 11:42:51 -0700 Linus Torvalds > wrote: > > > Most users will never notice. The whole "writable /dev/kmsg" may go > > back to 2002, but there aren't _that_ many users, and pretty much all > > I've ever seen tend to

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:57 AM, Andy Lutomirski wrote: > > What would break if we used CLOCK_BOOTTIME or CLOCK_MONOTONIC? I wouldn't object to trying - I thought you meant changing the format itself. If we keep the semantics (seconds since boot) but just change the clock source in other ways, I

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On Fri, Apr 4, 2014 at 11:42 AM, Linus Torvalds wrote: > On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: >> >> I'm using /dev/kmsg in virtme so that I can easily capture, with >> timestamps, the ten or so log lines that it produces. It would be sad >> if I had to worry about small

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On Fri, Apr 4, 2014 at 11:32 AM, Linus Torvalds wrote: > On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: >> >> The other thing I've used /dev/kmsg for is to shove a "I'm starting >> something now" message in. This is only really necessary because the >> current kernel log timestamps are

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:51 AM, Andrew Morton wrote: > > Is there anything here that we really need to fix? What goes wrong if > we leave kmsg as-is and systemd gets fixed? Since I haven't even heard a "my bad" from the systemd people, I'd be inclined to say that a bit of protection for future

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Andrew Morton
On Fri, 4 Apr 2014 11:42:51 -0700 Linus Torvalds wrote: > Most users will never notice. The whole "writable /dev/kmsg" may go > back to 2002, but there aren't _that_ many users, and pretty much all > I've ever seen tend to write the occasional "I started up" messages or > other very small

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: > > I'm using /dev/kmsg in virtme so that I can easily capture, with > timestamps, the ten or so log lines that it produces. It would be sad > if I had to worry about small ratelimits here. So the _default_ rate limits (which is what my

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski wrote: > > The other thing I've used /dev/kmsg for is to shove a "I'm starting > something now" message in. This is only really necessary because the > current kernel log timestamps are unusable crap. (We could fix that, > hint hint.) I'd

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On 04/03/2014 10:05 AM, Theodore Ts'o wrote: > On Thu, Apr 03, 2014 at 12:43:08PM +0200, Joerg Roedel wrote: >> >> How about just ignoring writes to /dev/kmsg altogether by default >> (unless explicitly enabled in Kconfig or on the kernel cmdline)? Maybe I >> am missing something but what are the

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On 04/03/2014 10:05 AM, Theodore Ts'o wrote: On Thu, Apr 03, 2014 at 12:43:08PM +0200, Joerg Roedel wrote: How about just ignoring writes to /dev/kmsg altogether by default (unless explicitly enabled in Kconfig or on the kernel cmdline)? Maybe I am missing something but what are the

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: The other thing I've used /dev/kmsg for is to shove a I'm starting something now message in. This is only really necessary because the current kernel log timestamps are unusable crap. (We could fix that, hint hint.)

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: I'm using /dev/kmsg in virtme so that I can easily capture, with timestamps, the ten or so log lines that it produces. It would be sad if I had to worry about small ratelimits here. So the _default_ rate limits

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Andrew Morton
On Fri, 4 Apr 2014 11:42:51 -0700 Linus Torvalds torva...@linux-foundation.org wrote: Most users will never notice. The whole writable /dev/kmsg may go back to 2002, but there aren't _that_ many users, and pretty much all I've ever seen tend to write the occasional I started up messages or

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:51 AM, Andrew Morton a...@linux-foundation.org wrote: Is there anything here that we really need to fix? What goes wrong if we leave kmsg as-is and systemd gets fixed? Since I haven't even heard a my bad from the systemd people, I'd be inclined to say that a bit of

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On Fri, Apr 4, 2014 at 11:32 AM, Linus Torvalds torva...@linux-foundation.org wrote: On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: The other thing I've used /dev/kmsg for is to shove a I'm starting something now message in. This is only really necessary because

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Andy Lutomirski
On Fri, Apr 4, 2014 at 11:42 AM, Linus Torvalds torva...@linux-foundation.org wrote: On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: I'm using /dev/kmsg in virtme so that I can easily capture, with timestamps, the ten or so log lines that it produces. It would be

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 11:57 AM, Andy Lutomirski l...@amacapital.net wrote: What would break if we used CLOCK_BOOTTIME or CLOCK_MONOTONIC? I wouldn't object to trying - I thought you meant changing the format itself. If we keep the semantics (seconds since boot) but just change the clock source

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Steven Rostedt
On Fri, 4 Apr 2014 11:51:39 -0700 Andrew Morton a...@linux-foundation.org wrote: On Fri, 4 Apr 2014 11:42:51 -0700 Linus Torvalds torva...@linux-foundation.org wrote: Most users will never notice. The whole writable /dev/kmsg may go back to 2002, but there aren't _that_ many users, and

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Theodore Ts'o
On Fri, Apr 04, 2014 at 03:44:26PM -0400, Steven Rostedt wrote: I saw one commenter say that this was a kernel bug because writing to kmsg shouldn't cause the system to hang. The rate-limit patch would go along with that idea, and I honestly think it would be good to rate-limit it in case

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread John Stoffel
Linus == Linus Torvalds torva...@linux-foundation.org writes: Linus On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: The other thing I've used /dev/kmsg for is to shove a I'm starting something now message in. This is only really necessary because the current

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Linus Torvalds
On Fri, Apr 4, 2014 at 3:45 PM, Alexei Starovoitov alexei.starovoi...@gmail.com wrote: can there be two bulletproof buffers: one for in kernel printk and another ratelimited one for writes into /dev/kmsg. On the read from /dev/kmsg they're combined by time. Or, you know, people could just

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Alexei Starovoitov
On Fri, Apr 4, 2014 at 1:17 PM, Theodore Ts'o ty...@mit.edu wrote: On Fri, Apr 04, 2014 at 03:44:26PM -0400, Steven Rostedt wrote: I saw one commenter say that this was a kernel bug because writing to kmsg shouldn't cause the system to hang. The rate-limit patch would go along with that idea,

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-04 Thread Greg Kroah-Hartman
On Fri, Apr 04, 2014 at 05:17:09PM -0400, John Stoffel wrote: Linus == Linus Torvalds torva...@linux-foundation.org writes: Linus On Fri, Apr 4, 2014 at 11:21 AM, Andy Lutomirski l...@amacapital.net wrote: The other thing I've used /dev/kmsg for is to shove a I'm starting something

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread H. Peter Anvin
They will be in memory one way or another, and during boot memory is usually plentiful to the kernel. Also, of the kernel knows it is log data it can be dropped if needed. On April 3, 2014 10:18:55 AM PDT, Theodore Ts'o wrote: >On Thu, Apr 03, 2014 at 10:09:29AM -0700, H. Peter Anvin wrote:

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Greg Kroah-Hartman
On Thu, Apr 03, 2014 at 08:17:33AM -0700, Tim Bird wrote: > > I had no idea systemd was so verbose and was abusing the kernel > log buffers so badly. I'm not a big fan of the rate-limiting, as this just > seems to encourage this kind of abuse. That was a bug in systemd, and has been fixed up in

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Theodore Ts'o
On Thu, Apr 03, 2014 at 10:09:29AM -0700, H. Peter Anvin wrote: > > Having the kernel be the keeper of the logging IPC isn't at all > unreasonable. However, kmsg in its current form isn't adequate. > Augmenting it into a proper logging IPC might be the right thing to do. > (Hmm... new IPC...

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread H. Peter Anvin
On 04/03/2014 10:05 AM, Theodore Ts'o wrote: > > So there are so many other ways of solving this problem without trying > to abuse the kernel logging facilities (which were never intended to > be a general-purpose syslog replacement). I suspect some systemd > developer was being lazy >

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Theodore Ts'o
On Thu, Apr 03, 2014 at 12:43:08PM +0200, Joerg Roedel wrote: > > How about just ignoring writes to /dev/kmsg altogether by default > (unless explicitly enabled in Kconfig or on the kernel cmdline)? Maybe I > am missing something but what are the legitimate use-cases for generally > allowing

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Tim Bird
On Thu, Apr 3, 2014 at 4:25 AM, Måns Rullgård wrote: > Jiri Kosina writes: > >> On Wed, 2 Apr 2014, Linus Torvalds wrote: >> >>> Steven, Borislav, one thing that strikes me might be a good idea is to >>> limit the amount of non-kernel noise in dmesg. We already have the >>> concept of

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Ingo Molnar
* Borislav Petkov wrote: > On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: > > Whether it actually fixes the problem that Borislav had is > > questionable, of course. For all I know, systemd debug mode generates > > so much data in *other* ways and then causes feedback loops

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Måns Rullgård
Jiri Kosina writes: > On Wed, 2 Apr 2014, Linus Torvalds wrote: > >> Steven, Borislav, one thing that strikes me might be a good idea is to >> limit the amount of non-kernel noise in dmesg. We already have the >> concept of rate-limiting various spammy internal kernel messages for >> when

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: > Whether it actually fixes the problem that Borislav had is > questionable, of course. For all I know, systemd debug mode generates > so much data in *other* ways and then causes feedback loops with > the kernel debugging that this

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: > Once is an accident. Twice is incompetence. Three times is malice. Yeah, maybe it is time Linus started his own init daemon project, like that other thing, git, he did start a while ago. We can put it in tools/. I'm sure it can

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Joerg Roedel
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: > Whether it actually fixes the problem that Borislav had is > questionable, of course. For all I know, systemd debug mode generates > so much data in *other* ways and then causes feedback loops with the > kernel debugging that this

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Måns Rullgård
Linus Torvalds writes: > 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

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: > Borislav? We're trying to reproduce the original issue with the assertion firing and drowning dmesg but it is a huuge box and a bit flaky so it'll take some time. I'll let you know as soon as I have something. Thanks. --

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Tim Bird
On Thu, Apr 3, 2014 at 4:25 AM, Måns Rullgård m...@mansr.com wrote: Jiri Kosina jkos...@suse.cz writes: On Wed, 2 Apr 2014, Linus Torvalds wrote: Steven, Borislav, one thing that strikes me might be a good idea is to limit the amount of non-kernel noise in dmesg. We already have the concept

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Theodore Ts'o
On Thu, Apr 03, 2014 at 12:43:08PM +0200, Joerg Roedel wrote: How about just ignoring writes to /dev/kmsg altogether by default (unless explicitly enabled in Kconfig or on the kernel cmdline)? Maybe I am missing something but what are the legitimate use-cases for generally allowing

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread H. Peter Anvin
On 04/03/2014 10:05 AM, Theodore Ts'o wrote: So there are so many other ways of solving this problem without trying to abuse the kernel logging facilities (which were never intended to be a general-purpose syslog replacement). I suspect some systemd developer was being lazy Having

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Theodore Ts'o
On Thu, Apr 03, 2014 at 10:09:29AM -0700, H. Peter Anvin wrote: Having the kernel be the keeper of the logging IPC isn't at all unreasonable. However, kmsg in its current form isn't adequate. Augmenting it into a proper logging IPC might be the right thing to do. (Hmm... new IPC... does

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Greg Kroah-Hartman
On Thu, Apr 03, 2014 at 08:17:33AM -0700, Tim Bird wrote: I had no idea systemd was so verbose and was abusing the kernel log buffers so badly. I'm not a big fan of the rate-limiting, as this just seems to encourage this kind of abuse. That was a bug in systemd, and has been fixed up in the

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread H. Peter Anvin
They will be in memory one way or another, and during boot memory is usually plentiful to the kernel. Also, of the kernel knows it is log data it can be dropped if needed. On April 3, 2014 10:18:55 AM PDT, Theodore Ts'o ty...@mit.edu wrote: On Thu, Apr 03, 2014 at 10:09:29AM -0700, H. Peter

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: Borislav? We're trying to reproduce the original issue with the assertion firing and drowning dmesg but it is a huuge box and a bit flaky so it'll take some time. I'll let you know as soon as I have something. Thanks. --

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Måns Rullgård
Linus Torvalds torva...@linux-foundation.org writes: On Wed, Apr 2, 2014 at 4:47 PM, Jiri Kosina jkos...@suse.cz 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

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Joerg Roedel
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: Whether it actually fixes the problem that Borislav had is questionable, of course. For all I know, systemd debug mode generates so much data in *other* ways and then causes feedback loops with the kernel debugging that this patch

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Thu, Apr 03, 2014 at 11:34:15AM +0100, Måns Rullgård wrote: Once is an accident. Twice is incompetence. Three times is malice. Yeah, maybe it is time Linus started his own init daemon project, like that other thing, git, he did start a while ago. We can put it in tools/. I'm sure it can get

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Borislav Petkov
On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: Whether it actually fixes the problem that Borislav had is questionable, of course. For all I know, systemd debug mode generates so much data in *other* ways and then causes feedback loops with the kernel debugging that this patch

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Måns Rullgård
Jiri Kosina jkos...@suse.cz writes: On Wed, 2 Apr 2014, Linus Torvalds wrote: Steven, Borislav, one thing that strikes me might be a good idea is to limit the amount of non-kernel noise in dmesg. We already have the concept of rate-limiting various spammy internal kernel messages for

Re: [RFC PATCH] cmdline: Hide debug from /proc/cmdline

2014-04-03 Thread Ingo Molnar
* Borislav Petkov b...@alien8.de wrote: On Wed, Apr 02, 2014 at 06:47:57PM -0700, Linus Torvalds wrote: Whether it actually fixes the problem that Borislav had is questionable, of course. For all I know, systemd debug mode generates so much data in *other* ways and then causes feedback

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-02 Thread Linus Torvalds
On Wed, Apr 2, 2014 at 4:52 PM, Linus Torvalds wrote: > > TOTALLY UNTESTED. But it really isn't complex. Oh, and here's a patch that is actually lightly tested. I did while :; do echo hello; done > /dev/kmsg (the 'yes' program buffers output, so won't work) and I get [ 122.062912]

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-02 Thread Steven Rostedt
On Wed, 2 Apr 2014 16:52:59 -0700 Linus Torvalds wrote: > 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

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-02 Thread Steven Rostedt
On Thu, 3 Apr 2014 00:12:13 +0200 Mateusz Guzik wrote: > Well, parsing kernel cmdline by systemd is a bad idea, and hiding > "debug" is even worse. What will happen when the next keyword clashes? > And how should I check the kernel is booted with "debug"? No, I think you got it backwards.

Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

2014-04-02 Thread Jiri Kosina
On Wed, 2 Apr 2014, Linus Torvalds 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

  1   2   >