NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56965: panic messages are sometimes garbled in syzkaller

>Number:         56965
>Category:       kern
>Synopsis:       panic messages are sometimes garbled in syzkaller
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 11 12:35:01 +0000 2022
>Originator:     Taylor R Campbell
>Release:        current
La Fondation NètBSD
not sure
Panic messages are sometimes garbled in syzkaller reports, such as this one:

[ 388.47pmap58845] panic: _get_physpage: out of memory

Somehow part of the message `pmap_get_physpage: out of memory' has appeared in the middle of the dmesg timestamp, and _before_ the text `panic: ', even though the logic in subr_prf.c is serialized by a mutex and prints `panic: ' first:

    265 	kprintf_lock();
    266 	kprintf_internal("panic: ", TOLOG|TOCONS, NULL, NULL);
    267 	if (panicstr == NULL) {
    268 		/* first time in panic - store fmt first for precaution */
    269 		panicstr = fmt;
    271 		vsnprintf(scratchstr, sizeof(scratchstr), fmt, ap);
    272 		kprintf_internal("%s", TOLOG|TOCONS, NULL, NULL, scratchstr);
    273 		panicstr = scratchstr;
    274 	} else {
    275 		kprintf(fmt, TOLOG|TOCONS, NULL, NULL, ap);
    276 	}
    277 	kprintf_internal("\n", TOLOG|TOCONS, NULL, NULL);
    278 	kprintf_unlock();
whatever syzbot does -- kernel config for example above:

include "arch/amd64/conf/GENERIC"

options		DEBUG
options		LOCKDEBUG

makeoptions	KMSAN=1
options		KMSAN
no options	SVS
no options	MODULAR
options		KMSAN_PANIC

makeoptions	KCOV=1
options		KCOV

options		FAULT

pseudo-device	vhci
usb*	at vhci?
Yes, please!

Home | Main Index | Thread Index | Old Index