Created attachment 2602 [details] dmesg output garbled dmesg output is garbled for core-image-minimal when SLIRP is used For qemux86-64 machine, if a core-image-minimal image is started with: runqemu qemux86-64 core-image-minimal kvm slirp dmesg output is garbled and also garbles the console, so no longer display of text is correct. Issue is not reproducible if: 1. core-image-sato is used 2. slirp runqemu option is not used 3. serial runqemu option is used See attached screenshot for details.
Investigation started.
Issue is present also on: runqemu qemux86-64 core-image-full-cmdline kvm So the networking being run via SLIRP is not a condition. Under core-image-full-cmdline image, the output of dmesg is colorized.
The exact line from dmesg output that makes the entire terminal being garbled (text input and output) is: [ 2.671865] wacom 0003:056A:0000.0001: \xfffffff8u\xffffffcf: USB HID v10.01 Mouse [QEMU Wacom PenPartner] on usb-0000:00:01.2-1/input0
It seems that the issue is triggered by an uninitialized buffer in the kernel HID stack. Specifically in linux: drivers/hid/hid-core.c in the function hid_connect(), buf array is not initialized.
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-core.c#n1614 is a link to the file. Needs a buf[0] = NULL;
Fixed with commit: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7fb3fb9cc279c2e1fd2b8dd0040f7cab6a5a28db
Verified on master: a9053ac0829eb01f6f002587854d01e47a78e6f0