Since gentoo-sources-2.6.29 (or even vanilla-sources) my computer has a problem booting.
The message is:
"Undefined video mode number: ffff"
If I press enter (or use vga=ask) I get an empty list.
This is both at system boot or if I start the kernel in kvm with an empty cmdline.
After some compiling/recompiling I found that kernel versions 2.6.28 does not have this problem but newer.
The kernel configuration is the default you get if you do not pass any options to genkernel. have also tried "make defconfig" and have tried the config from the livecd.
So I do not know really where this problem is.
It came with the newer versions of the kernel, however fedora-11 nor ubuntu-9.04 seems to have this problem.
Steps to Reproduce:
1. emerge \>=gentoo-sources-2.6.29*
2. genkernel all
3. reboot into the new kernel
"Undefined video mode number: ffff"
and then the kernel wait for 30 seconds for you to either press enter (to get an empty list of avaible modes) or press space to resume boot.
booting should continue instantly
Portage 2.2_rc38 (hardened/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-rc6 x86_64)
System uname: Linux-2.6.31-rc6-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 21 Aug 2009 01:00:01 +0000
ccache version 2.4 [enabled]
dev-lang/python: 2.6.2-r1, 3.1.1
sys-devel/autoconf: 2.13, 2.63-r1
sys-devel/automake: 1.9.6-r2, 1.10.2, 1.11
CFLAGS="-march=native -O2 -pipe -ftree-vectorize -ggdb -mtune=native -floop-interchange -floop-strip-mine -floop-block"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe -ftree-vectorize -ggdb -mtune=native -floop-interchange -floop-strip-mine -floop-block"
FEATURES="assume-digests candy ccache distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,--warn-once,--hash-style=gnu"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/layman/gnome /usr/local/portage/layman/x11 /usr/local/portage/layman/xake-toolchain /usr/local/portage/mine /usr/local/portage/notify-osd-overlay"
USE="X a52 aac accessibility acl acpi alsa amd64 amr amrnb amrwb applet archive avahi bash-completion bluetooth bzip2 cairo ccache cdaudio cdda cdr cleartype cli consolekit cracklib crypt cups cxx dbus deskbar device-mapper devicekit devkit dhcpcd digitalradio djvu dmraid dri dts dvd dvdr dvi eds encode eselect evo exif faac fat fbcondecor ffmpeg fftw flac fuse gallium gdbm gif glib gmp gnome gnome-keyring gnutls gphoto2 gpm grammar graphite gsf gsm gstreamer gtk hal hardened iconv iconvacl icu id3tag idn ieee1394 iptc isdnlog jabber java6 jpeg jpeg2k justify kvm lcms libnotify logrotate lvm mad maps math matroska mktemp mms mmx mmxext moonlight mp2 mp3 mpeg mpi mtp mudflap multilib musepack musicbrainz nautilus ncurses network-cron networkmanager nfs nls nptl nptlonly ntfs offensive ogg opencore-amr opengl openmp openntpd ots pam pango parted pcre pdf perl pic pidgin png policykit pppd pulseaudio python qemu quicktime readline reflection samba session smp sms speex spell spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs test tex theora thesaurus threads tiff totem tracker truetype udev unicode urandom usb userlocales v4l vhook videos vim-syntax vorbis x264 x364 xcb xcomposite xmp xmpp xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="nv nouveau"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
The "video mode number" issue is making me believe you have improper drivers selected or some improper kernel configuration, as I've used genkernel successfully since 2.6.24, and am currently running 2.6.30-r4.
Did you read that I used the configuration from genkernel without changes? The way I did it was that I emptied /etc/kernels and ran 'genkernel all' which picks upp the kernel-config boundled with genkernel. 2.6.28 did not give the message, 2.6.29 did give the message. So in that case is the 'misconfiguration' in the default configuration for genkernel, thus a bug here.
Funny part is that the weekly livecd boots without problems, but using that configuration for gentoo-sources-2.6.30* (which is what the cd uses) gives me the message.
If you search the forums @ f.g.o you will find more people that seems to have this problem, one of them even suggested that it had to do with the introduction of Intel KMS which neither he or I uses.
I have another gentoo-computer which does not have this problem, and I do not know why...
The funny part is that I just took out grub2 for a spin, and doing no other change but to use grub2 the message disappered.
So I think this seems to be that newer kernels fails to init the VGABIOS or something like that with genkernels default configuration (or any other configuration I tried) and thus got no modes unless the bootloader does something.
SYSLINUX for the livecd seems to do the trick, grub2 seems to do the trick, grub-0.x does not do the trick for me. And if you were online over at #firstname.lastname@example.org you would see Anarchy complaining about what appeared to be the exact same problem.
Hardened will be assignee until we can rule out a toolchain issue first.
bringing in base-system, as I've been wondering something re grub1 and hardened kernels for a bit.
If you explicitly recompile and reinstall (the MBR) grub1 with a your GCC profile changed to non-hardened, does the problem go away?
Ok, efter som talking with Anarchy I realised the following (where /boot/kernel is a link to my current system kernel):
With hardened gcc-specs:
'kvm -kernel /boot/kernel'
gives the message.
With "-vanilla" gcc-specs there is no message.
Using kvm rules out that the bootloader got anything to do with this problem (even if it seems to be able to be used as a workaround).
So this seems to be miscompilation with hardened.
Next step: rule out SSP and/or PIE...
*** Bug 257914 has been marked as a duplicate of this bug. ***
This is defintely an issue when using PIE enabled gcc, disable PIE support in gcc will resolve the issue with framebuffers. This is a workaround until we find out what code is being generated that is causing such an issue.
I'm experiencing the same problem and must confess to being somewhat puzzled; aren't the hardened specs disregarded in the -D__KERNEL__ case? For the record, I'm also using grub-static-0.97-r9.
For reference the kernel commit that breaks this:
How this should be handled I leave to the one who wants to touch gcc-3.4.6-r2 and/or hardened gcc-4 and/or the kernel source.
doesnt seem related to grub ...
This issue seems to be due to video-vga.c being compiled incorrectly.
video-vga.o is missing the section .videocards when compiled with hardened-specs
while its there when compiled with hardenednopie
Reverting the the commit shown in comment #9 and compiling shows the section in the objectfile even for hardenedspecs
The funny part about it is that video-vga.c is compiled without hardened just like it should.
The only thing in the kernel tree built with hardened (like it always have been) is the userspace tools (like kallsyms and other stuff compiled with HOSTCC) and since those are used to generate headers and asm-symbol-tables and so on I am unsure if they can somehow have an impact.
Created attachment 202445 [details, diff]
Make gcc not use hardened when checking for command options
The arch/*/boot/Makefile use cc-options to check for GCC command options and
cc-options use the hardened specs when checking for GCC command options.
When -fPIE is pass to cc1 it can't use -ffreestanding or -fno-toplevel-reorder.
Then it fail to build stuff with -ffreestanding and -fno-toplevel-reorder.
I've got the same messages, using kvm and a hardened profile.
But I do not use genkernel. I'm using a self configured kernel.
Also my system dies after some time (a few minutes - some hours). Kernel stack trace is the result. I don't know if it has something to do with this bug or is another one.
(In reply to comment #14)
> I've got the same messages, using kvm and a hardened profile.
> But I do not use genkernel. I'm using a self configured kernel.
> Also my system dies after some time (a few minutes - some hours). Kernel stack
> trace is the result. I don't know if it has something to do with this bug or is
> another one.
Test the patch. ALl issues with framebuffer not working can be fixed with the simple inclusion of patch here on the bug report.
I have to say congratulations to Zorry and anarchy for landing this patch!
Now maybe it is time to reassign this bug to the gentoo kernel developers and maybe get this integrated into the genpatches-base since this hits all hardened gentoo-users currently, even them using gentoo-sources?
Kernel team please add to genpatches-base for all supported .29,30,31 kernels please.
InSVN for .30 and .31, the two currently supported gentoo-sources kernel.
released in both 2.6.30 and 2.6.31 gentoo sources
Will this get into hardened-sources as well?
(In reply to comment #20)
> Will this get into hardened-sources as well?
For hardened-sources this breaks currently only with 2.6.29, and that will probably never go stable and is currently not worked on. Instead the hardened team is working on 2.6.31, where this is fixed and it should enter the tree "when it is ready"(tm) which is hopefully soon.
Great! Thank you very much.