Bug 154634 - sys-apps/microcode-ctl-1.15: "Bad data in microcode data file"
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
It works here on a newer kernel 2.6.19-rc4.
(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,
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.
Agreed - a bug in non-userspace is still a bug.
feel free to waste the kernel team's time then ... the bug will just stagnant
anyways until 2.6.19 hits portage, but whatever
nothing is stopping you from applying it to your own kernel
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?
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.
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 !
Thanks for the speedy testing
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
(In reply to comment #13)
> Created an attachment (id=102154) [edit] [details]
> 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 ?
*** Bug 155659 has been marked as a duplicate of this bug. ***
Fixed in gentoo-sources-2.6.18-r3 (genpatches-2.6.18-4)