Messages in this thread | | | From | Thomas Renninger <> | Subject | Re: [PATCH 1/8] Add driver auto probing for x86 features v2 | Date | Fri, 23 Dec 2011 14:16:09 +0100 |
| |
Hi,
for info:
On Tuesday, December 20, 2011 12:46:27 AM Andi Kleen wrote: > From: Andi Kleen <ak@linux.intel.com> > > Old patchkit, resurrect due to popular demand. ... > + n = snprintf(buf, size, "x86cpu:vendor:%04x:family:%04x:model:%04x:feature:", this must be uppercase hex values (%04X) ... > + if (boot_cpu_has(i)) { > + n = snprintf(buf, size, ",%04x", i); same here. Looks like a string compare is happening and in scripts/mod/file2alias.c sizeof(field) == 2 ? "%04X" is used and the modalias added to the driver and showing up in /lib/modules/*/modales.alias is uppercase.
... > + } > + *buf++ = ','; > + *buf++ = '\n'; this must be: + *buf++ = '\0'; otherwise one can hit: WARNING: at lib/kobject_uevent.c:362 add_uevent_var+0xf2/0x100() add_uevent_var: buffer size too small Hm, then /sys/devices/system/cpu/modalias has not a newline. Using kzalloc in arch_cpu_uevent() should be the nicest way to address this.
Now things work much better, hope that's all. I just send out a new patchset (with cpuid vs cpu kobject broken out in a separate patch for better backporting).
Thomas
| |