Bug 8052 - dmesg output is garbled for core-image-minimal when SLIRP is used
Summary: dmesg output is garbled for core-image-minimal when SLIRP is used
Status: VERIFIED FIXED
Alias: None
Product: General Runtime
Classification: Runtime
Component: General Runtime (show other bugs)
Version: unspecified
Hardware: Other Multiple
: Medium normal
Target Milestone: 1.9 M3
Assignee: Cristian Iorga
QA Contact: Cristina Agurida
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-07-27 11:52 UTC by Cristian Iorga
Modified: 2015-10-20 14:21 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
dmesg output garbled (414.58 KB, image/png)
2015-07-27 11:52 UTC, Cristian Iorga
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Iorga 2015-07-27 11:52:23 UTC
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.
Comment 1 Cristian Iorga 2015-08-03 09:02:02 UTC
Investigation started.
Comment 2 Cristian Iorga 2015-08-03 09:28:16 UTC
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.
Comment 3 Cristian Iorga 2015-08-03 09:30:05 UTC
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
Comment 4 Cristian Iorga 2015-08-06 17:04:36 UTC
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.
Comment 5 Richard Purdie 2015-09-11 14:42:58 UTC
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;
Comment 7 Cristina Agurida 2015-10-20 14:21:55 UTC
Verified on master: a9053ac0829eb01f6f002587854d01e47a78e6f0