Re: [syzbot? printk?] no WARN_ON() messages printed before "Kernel panic - not syncing: panic_on_warn set ..."

From: Dmitry Vyukov
Date: Tue Mar 19 2019 - 04:10:40 EST


On Mon, Mar 18, 2019 at 3:09 PM Sergey Senozhatsky
<sergey.senozhatsky@xxxxxxxxx> wrote:
>
> On (03/18/19 14:42), Dmitry Vyukov wrote:
> > > There is also SYSLOG_ACTION_CONSOLE_OFF, which disables logging.
> >
> > That one I somehow figured earlier, here is the exact check:
> > https://github.com/google/syzkaller/blob/61f9c92f3a465025d2b9d91f429aaec968aeaa2a/sys/linux/init.go#L152-L155
>
> OK, cool.
> You probably would also want to add SYSLOG_ACTION_CLEAR to the list.

It's not hard to add, but I would like to understand why exactly.
syzkaller reads out console output from qemu, GCE VM, android phone
all the time. So if something was already written and we read it out
right away, it seems that clearing won't affect things. Does
SYSLOG_ACTION_CLEAR affect only reading output via syslog syscall,
/dev/something?

In some setups we read out output with "dmesg -w" (should stream
output as well) in absence of a better solution. Will this be affected
by SYSLOG_ACTION_CLEAR?