Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154634 - sys-apps/microcode-ctl-1.15: "Bad data in microcode data file"
Summary: sys-apps/microcode-ctl-1.15: "Bad data in microcode data file"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL: http://www2.kernel.org/git/?p=linux/k...
Whiteboard:
Keywords:
: 155659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-09 21:35 UTC by Paul Taylor
Modified: 2006-11-20 08:55 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
backport to 2.6.18 (microcode.patch,1.22 KB, patch)
2006-11-16 14:25 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Taylor 2006-11-09 21:35:04 UTC
After upgrading to microcode-ctl-1.15, the microcode update fails with the following error; 1.14 was not affected:

# /etc/init.d/microcode_ctl start
 * Updating microcode ...
/usr/sbin/microcode_ctl: error writing to '/dev/cpu/microcode' errno=22 (Invalid argument)
/usr/sbin/microcode_ctl: there may be messages from the driver in your system log.
 * Failed to update microcode via '/dev/cpu/microcode'                    [ !! ]


# tail /var/log/messages
Nov 10 16:23:30 oxygen microcode: error! Bad data in microcode data file
Nov 10 16:23:30 oxygen microcode: Error in the microcode data
Nov 10 16:23:30 oxygen rc-scripts: Failed to update microcode via '/dev/cpu/microcode'


# emerge --info
Portage 2.1.2_rc1-r5 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r2 i686)
=================================================================
System uname: 2.6.18-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.6
Last Sync: Fri, 10 Nov 2006 02:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -mtune=pentium4 -O2 -pipe -msse -mfpmath=sse -msse2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium4 -mtune=pentium4 -O2 -pipe -msse -mfpmath=sse -msse2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="x86 X a52 aac alsa arts asf berkdb bitmap-fonts bzlib cairo cdparanoia cdr chroot cli cracklib crypt cups dbus dlloader dri dts dv dvd dvdr dvdread eds elibc_glibc emboss encode expat fam fbcon ffmpeg firefox flac foomaticdb fortran gdbm gif gimpprint glitz glut gpgme gpm gstreamer gtk hal i8x0 iconv imap imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg jpeg2k kde kernel_linux kqemu lcms libg++ lm_sensors lzo mad mikmod mjpeg mmap mmx mng mp3 mpeg mpeg4 musepack ncurses nls nptl nptlonly nsplugin ogg opengl pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session smp sndfile speex spell spl sse sse2 ssl svg symlink tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU userlocales vcd video_cards_i810 vidix vorbis vorbis-psy win32codecs wmf x264 xml xorg xprint xscreensaver xv xvid yvl12 zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Guillaume Castagnino 2006-11-10 01:04:20 UTC
I confirm this problem on 3 differents machines.

Reverting to 1.14 or using the http://urbanmyth.org/microcode/ucode/intel-ia32microcode-10May2006.txt.bz2 microcode.dat file solved the problem.

http://urbanmyth.org/microcode/ucode/intel-ia32microcode-07Sep2006.txt.bz2 included in 1.15 seems to be buggy...
Comment 2 Paul Taylor 2006-11-10 01:25:00 UTC
I found this kernel patch is supposed to fix the problem:
  http://linux.bkbits.net:8080/linux-2.6/gnupatch@451a9864jKk9Jk5CliEBE9pB86swnw
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-11-10 01:36:21 UTC
It works here on a newer kernel 2.6.19-rc4.
Comment 4 SpanKY gentoo-dev 2006-11-11 00:26:31 UTC
not a bug in userspace
Comment 5 Guillaume Castagnino 2006-11-11 01:17:52 UTC
(In reply to comment #4)
> not a bug in userspace
> 

Sorry, but if this version need a 2.6.19_rc kernel version, there is a missing dependancy. And ~x86 gentoo-sources does not provide a sufficient version to run ~x86 microcode-ctl (we can think that 2 different ~x86 packages of the tree should be in line).

So my position is : you should at least mask it untill ~x86 has an official kernel that have the patch that correct this problem, and probably better add a dependency asking for a minimal kernel version.

But this is only my opinion :)

Regards,
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-11-11 01:22:34 UTC
Guillaume Castagnino: there's one major flaw with dependancies on kernels.
Namely they exist to require that the kernel sources is of a sufficent version for a task. It says absolutely nothing about the kernel that is actually running.
Comment 7 Paul Taylor 2006-11-11 01:27:38 UTC
Agreed - a bug in non-userspace is still a bug.
Comment 8 SpanKY gentoo-dev 2006-11-11 01:32:25 UTC
feel free to waste the kernel team's time then ... the bug will just stagnant anyways until 2.6.19 hits portage, but whatever
Comment 9 Ivan Yosifov 2006-11-11 04:47:27 UTC
If the problem is to be fixed by the simple patch pointed by Paul Taylor* why wait for 2.6.19 ?

* http://linux.bkbits.net:8080/linux-2.6/gnupatch%40451a9864jKk9Jk5CliEBE9pB86swnw
Comment 10 SpanKY gentoo-dev 2006-11-12 20:33:42 UTC
nothing is stopping you from applying it to your own kernel
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-11-14 11:39:30 UTC
Mike, this seems like a legitimate kernel bug to me, but I don't have much knowledge in this area.

If you apply that patch to 2.6.18, can anyone confirm that both microcode-ctl-1.15 and microcode-ctl-1.16 work fine with 2.6.18?
Comment 12 Ivan Yosifov 2006-11-14 12:12:50 UTC
The patch per se does not seem to apply cleanly to 2.6.18. I tried bringing only  /arch/i386/kernel/microcode.c up to date with 2.6.19-rc5, the resulting kernel built ok but crashed with a backtrace on boot. I am no kernel programmer so it is very possible that I just messed up the patching.
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2006-11-16 14:25:58 UTC
Created attachment 102154 [details, diff]
backport to 2.6.18

please run the above tests with this patch
Comment 14 Guillaume Castagnino 2006-11-16 14:38:38 UTC
microcode-ctl-1.14 works always fine with this patch applied, and microcode-ctl-1.15 also works fine.

This patch seems to be OK
Thanks !
Comment 15 Daniel Drake (RETIRED) gentoo-dev 2006-11-16 15:00:41 UTC
Thanks for the speedy testing
Comment 16 Guillaume Castagnino 2006-11-16 23:12:41 UTC
Just performed the same test on hardened-sources-2.6.18 patched with this patch : same result, it's all fine with both version.

Thanks
Comment 17 Ivan Yosifov 2006-11-18 15:19:48 UTC
(In reply to comment #13)
> Created an attachment (id=102154) [edit]
> backport to 2.6.18
> 
> please run the above tests with this patch
> 
I've applied the patch, the resulting kernel builds, boots and works fine. Microcode updates ( with both 1.15 and 1.14) appear to work:

home ~ # microcode_ctl -u
microcode_ctl: writing microcode (length: 265216)
microcode_ctl: microcode successfuly written to /dev/cpu/microcode
home ~ #  

However:

home ~ # dmesg | grep -i microcode
IA-32 Microcode Update Driver: v1.14a <tigran@veritas.com>
home ~ #    

I fail to see any confirmation message in the kernel log. Is this normal ?
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-11-19 04:46:52 UTC
*** Bug 155659 has been marked as a duplicate of this bug. ***
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2006-11-20 08:55:33 UTC
Fixed in gentoo-sources-2.6.18-r3 (genpatches-2.6.18-4)