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

From: Tetsuo Handa
Date: Mon Mar 18 2019 - 20:42:23 EST


Dmitry Vyukov wrote:
> On Mon, Mar 18, 2019 at 1:32 PM Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
> > Wait, but isn't SYSLOG_ACTION_CONSOLE_LEVEL what we are looking for?
> > syzkaller knows about the syslog syscall:
> > https://github.com/google/syzkaller/blob/13026d10f09f0e801c342e6c009ff580d49b894b/sys/linux/sys.txt#L322
> > and even though it does not know SYSLOG_ACTION_CONSOLE_LEVEL const, it
> > can guess that number.
>
> I've restricted fuzzer from invoking SYSLOG_ACTION_CONSOLE_LEVEL.
> Let's see if it helps.
>

Oh, coverage page says that

/* Set level of messages printed to console */
case SYSLOG_ACTION_CONSOLE_LEVEL:
if (len < 1 || len > 8) /*covered*/
return -EINVAL;
if (len < minimum_console_loglevel) /*covered*/
len = minimum_console_loglevel;
console_loglevel = len;
/* Implicitly re-enable logging to console */
saved_console_loglevel = LOGLEVEL_DEFAULT;
break;

fuzzer was indeed testing SYSLOG_ACTION_CONSOLE_LEVEL case. ;-)