Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-20 Thread Sergey Senozhatsky
On (12/20/18 08:58), Steven Rostedt wrote: > > > Userspace processes should never be able to overwrite messages > > > from the kernel. > > > > I would agree. > > > > It's a bit funny that kernel people first take the patch in and then, > > when user-space begins to use the feature, start to objec

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-20 Thread Steven Rostedt
On Thu, 20 Dec 2018 20:35:37 +0900 Sergey Senozhatsky wrote: > On (12/18/18 12:37), Steven Rostedt wrote: > > > > > > Again, complain to system-doofus for printing so much crap to somewhere > > > it should not print to begin with. > > > > I've been saying that it would be good to make the kms

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-20 Thread Sergey Senozhatsky
On (12/18/18 12:37), Steven Rostedt wrote: > > > > Again, complain to system-doofus for printing so much crap to somewhere > > it should not print to begin with. > > I've been saying that it would be good to make the kmsg be a separate > buffer that just gets interleaved with the kernel buffer.

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-19 Thread Petr Mladek
On Tue 2018-12-18 12:37:48, Steven Rostedt wrote: > On Tue, 18 Dec 2018 18:21:09 +0100 > Peter Zijlstra wrote: > > > On Wed, Dec 19, 2018 at 01:52:17AM +0900, Sergey Senozhatsky wrote: > > > On (12/18/18 16:24), Borislav Petkov wrote: > > > > On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Sen

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 18:47), Borislav Petkov wrote: > So how much is not strict? > > And what happens if you raise that ratelimiting level and the *one* line > which is most important for debugging an issue Like you said, for debugging devkmsg=off works just fine. I don't mind the ratelimiting and want to

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Borislav Petkov
On Wed, Dec 19, 2018 at 01:52:17AM +0900, Sergey Senozhatsky wrote: > But devkmsg ratelimits systemd errors, so one does not even know that > "some debugging is required". For instance from my x86 box: > > Unmounting /home... > [..] > home.mount: Mount process exited, code=exited status=32 > F

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Steven Rostedt
On Tue, 18 Dec 2018 18:21:09 +0100 Peter Zijlstra wrote: > On Wed, Dec 19, 2018 at 01:52:17AM +0900, Sergey Senozhatsky wrote: > > On (12/18/18 16:24), Borislav Petkov wrote: > > > On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Senozhatsky wrote: > > > > Right, but unlike log_buf_len, devkm

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Peter Zijlstra
On Wed, Dec 19, 2018 at 01:52:17AM +0900, Sergey Senozhatsky wrote: > On (12/18/18 16:24), Borislav Petkov wrote: > > On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Senozhatsky wrote: > > > Right, but unlike log_buf_len, devkmsg is a bit close to a "binary" knob: > > > either all messages or none

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 16:24), Borislav Petkov wrote: > On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Senozhatsky wrote: > > Right, but unlike log_buf_len, devkmsg is a bit close to a "binary" knob: > > either all messages or none; > > ... which is perfectly fine for a debugging session. But devkmsg rat

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Borislav Petkov
On Wed, Dec 19, 2018 at 12:14:55AM +0900, Sergey Senozhatsky wrote: > Right, but unlike log_buf_len, devkmsg is a bit close to a "binary" knob: > either all messages or none; ... which is perfectly fine for a debugging session. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 16:03), Borislav Petkov wrote: > On Tue, Dec 18, 2018 at 11:55:58PM +0900, Sergey Senozhatsky wrote: > > Good question. Theoretically, there can be some interesting stuff. > > Examples: https://bugzilla.redhat.com/show_bug.cgi?id=1515373#c6 > > orhttps://github.com/systemd/syst

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Borislav Petkov
On Tue, Dec 18, 2018 at 11:55:58PM +0900, Sergey Senozhatsky wrote: > Good question. Theoretically, there can be some interesting stuff. > Examples: https://bugzilla.redhat.com/show_bug.cgi?id=1515373#c6 > orhttps://github.com/systemd/systemd/issues/5433 Just like that last page says, peop

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 15:26), Borislav Petkov wrote: > On Tue, Dec 18, 2018 at 10:07:50PM +0900, Sergey Senozhatsky wrote: > > This is right before shutdown. dmesg is not really available anymore. > > I can only guess why do they write it to devkmsg - to make it appear > > on the serial/net console, perhaps

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Borislav Petkov
On Tue, Dec 18, 2018 at 10:07:50PM +0900, Sergey Senozhatsky wrote: > This is right before shutdown. dmesg is not really available anymore. > I can only guess why do they write it to devkmsg - to make it appear > on the serial/net console, perhaps. Dunno. But still, why do we want to see those mes

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 18:18), Sergey Senozhatsky wrote: > > I know that there is a "kernel.printk_devkmsg" interface; do we > expect every systemd-enabled distro to find that out and to tweak > kernel.printk_devkmsg My bad, this should be corrected. I thought that user space can adjust ratelimit, via file

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 12:29), Peter Zijlstra wrote: > > We certainly can. As far as I understand, they log shutdown events > > (including errors and warnings): what they kill, what they stop, > > what they umount, etc. The more partitions, services are running > > (I guess), the more things they need to umo

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 12:47), Borislav Petkov wrote: [..] > > systemd[1]: Unmounting /home... > > systemd[1]: Unmounting Temporary Directory (/tmp)... > > systemd[1]: Unmounted Temporary Directory (/tmp). > > systemd[1]: Stopped target Swap. > > systemd[1]: Unmounted /boot. > > systemd[1]: Stopped Fil

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Borislav Petkov
On Tue, Dec 18, 2018 at 08:17:01PM +0900, Sergey Senozhatsky wrote: > On (12/18/18 11:48), Peter Zijlstra wrote: > > > I know that there is a "kernel.printk_devkmsg" interface; do we > > > expect every systemd-enabled distro to find that out and to tweak > > > kernel.printk_devkmsg or shall we chan

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Peter Zijlstra
On Tue, Dec 18, 2018 at 08:17:01PM +0900, Sergey Senozhatsky wrote: > On (12/18/18 11:48), Peter Zijlstra wrote: > > > I know that there is a "kernel.printk_devkmsg" interface; do we > > > expect every systemd-enabled distro to find that out and to tweak > > > kernel.printk_devkmsg or shall we chan

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Sergey Senozhatsky
On (12/18/18 11:48), Peter Zijlstra wrote: > > I know that there is a "kernel.printk_devkmsg" interface; do we > > expect every systemd-enabled distro to find that out and to tweak > > kernel.printk_devkmsg or shall we change the default devkmsg > > ratelimit instead? > > How about we complain to

Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

2018-12-18 Thread Peter Zijlstra
On Tue, Dec 18, 2018 at 06:18:42PM +0900, Sergey Senozhatsky wrote: > Hello, > > RFC > > A painful subject: > > I just noticed that stock systemd (no systemd debugging enabled) on my > x86 box write()-s during shutdown to devkmsg more than before, so old > devkmsg ratelimits do