Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257914 - hardened-sources-2.6.2{8,9} vesafb invalid video mode
Summary: hardened-sources-2.6.2{8,9} vesafb invalid video mode
Status: RESOLVED DUPLICATE of bug 282201
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-06 17:57 UTC by Thomas Sachau
Modified: 2009-08-22 20:35 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Sachau gentoo-dev 2009-02-06 17:57:43 UTC
I am currently at 2.6.27-r3, which works fine. The problem occurs since 2.6.27-r4, also tested 2.6.27-r7. I will try to get some more infos and will use 2.6.27-r7 for those tests. For now, my emerge --info:

Portage 2.2_rc23 (hardened/amd64/multilib, gcc-4.4.0-alpha20090102, glibc-2.9_p20081201-r1, 2.6.27-hardened-r3 x86_64)
=================================================================
System uname: Linux-2.6.27-hardened-r3-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.4
Timestamp of tree: Unknown
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going"
FEATURES="autoconfig collision-protect distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo http://gentoo.osuosl.org/distfiles/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j5 --load-average=8"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/java-overlay /usr/local/portage/layman/toolchain-overlay /usr/local/portage/layman/enlightenment /usr/local/portage"
SYNC="cvs://tommy@cvs.gentoo.org:/var/cvsroot"
USE="3dnow X alsa amd64 berkdb cracklib crypt cups gpm hardened justify midi ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pic readline scanner sse sse2 ssl tcpd unicode urandom vorbis xorg 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Thomas Sachau gentoo-dev 2009-02-09 16:28:59 UTC
Since i found out that the problem with X not starting was nvidia-drivers related (setting opengl to xorg-x11 it starts fine, with setting it to nvidia, X does not start at all), i changed the summary to my remaining bug:

I used a config from previous hardened-sources-2.6.27-r3 for 2.6.28, did run make oldconfig, compiled and installed it. But at startup, it tells me, that my fb mode (0x31b) does not exist.

The config works ok with gentoo-sources-2.6.27-r7. If i copy the config over to gentoo-sources-2.6.28-r1, run make oldconfig (with using default settings), compile and install that, i also get a kernel with fb-support.

Because of this, i think, one of the disabled/removed options is the reason for my missing vesa-fb support in the currently latest hardened sources.

Diff between hardend- and gentoo-sources:

--- linux-2.6.28-hardened/.config	2009-02-06 17:12:21.000000000 +0100
+++ linux-2.6.28-gentoo-r1/.config	2009-02-05 21:27:54.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.28-hardened
-# Fri Feb  6 17:12:21 2009
+# Linux kernel version: 2.6.28-gentoo-r1
+# Thu Feb  5 21:27:54 2009
 #
 CONFIG_64BIT=y
 # CONFIG_X86_32 is not set
@@ -123,7 +123,7 @@
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
-# CONFIG_SLABINFO is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -205,7 +205,6 @@
 CONFIG_X86_CMPXCHG=y
 CONFIG_X86_L1_CACHE_SHIFT=6
 CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_ALIGNMENT_16=y
 CONFIG_X86_INTEL_USERCOPY=y
 CONFIG_X86_USE_PPRO_CHECKSUM=y
 CONFIG_X86_P6_NOP=y
@@ -292,6 +291,7 @@
 # CONFIG_RELOCATABLE is not set
 CONFIG_PHYSICAL_ALIGN=0x200000
 # CONFIG_HOTPLUG_CPU is not set
+# CONFIG_COMPAT_VDSO is not set
 # CONFIG_CMDLINE_BOOL is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
@@ -1096,6 +1096,7 @@
 CONFIG_FRAMEBUFFER_CONSOLE=y
 # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
 # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FB_CON_DECOR is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -1454,7 +1455,7 @@
 CONFIG_PROC_FS=y
 # CONFIG_PROC_KCORE is not set
 CONFIG_PROC_SYSCTL=y
-# CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
Comment 2 Thomas Sachau gentoo-dev 2009-03-13 16:41:55 UTC
A small update:

Testing hardened-sources-2.6.28-r2, i am still getting the same results:

-frambuffer console not working (vesafb), message at boot time:

Undefined video mode number: 31b

-xorg-server creats a blank screen, if started with nvidia-drivers, no chance to kill it, get back to the console or anything else
setting paxctl -m /usr/bin/Xorg works as a workaround.
This may be a bug in xorg-server or the kernel/pax itself, since gengor reported similar need for intel and ati-drivers in IRC.
Comment 3 Gordon Malm (RETIRED) gentoo-dev 2009-03-21 04:16:26 UTC
Just noticed the grsecurity patch does a bunch of stuff in modedb.c.  So CCing upstream.

PaX Team, if it helps hardened-sources-2.6.27-r3 consisted of:
http://sources.gentoo.org/viewcvs.py/linux-patches/genpatches-2.6/tags/2.6.27-7/
http://sources.gentoo.org/viewcvs.py/linux-patches/hardened/2.6/tags/2.6.27-4/

hardened-sources-2.6.27-r4 consisted of:
http://sources.gentoo.org/viewcvs.py/linux-patches/genpatches-2.6/tags/2.6.27-9/
http://sources.gentoo.org/viewcvs.py/linux-patches/hardened/2.6/tags/2.6.27-4/

As the OP mentioned, I have noticed that Intel drivers require paxctl -pm on /usr/bin/Xorg sometime during an upgrade of my laptop from a 2.6.26 release to a 2.6.27 release.  nvidia binary drivers also require paxctl -m on /usr/bin/Xorg when moving from 2.6.26 to 2.6.27 or greater in order to work.  ati-drivers require paxctl -pm on /usr/bin/Xorg with >=2.6.27, but I wasn't able to test earlier kernels against it.  Sorry I didn't report this earlier, but I didn't have time to properly investigate it.  Off the top of my head this is what I did notice:

On <=2.6.26 kernels the Xorg.0.log would show a signal 11 was sent during a vm86() call, but Xorg would still come up and you'd get a login screen.  With >=2.6.27 the screen is blank, the machine still responds and I can can ssh in via network, but can't switch VTs @ console.  Xorg has been killed completely.  Looking @ the Xorg.0.log it ends right where the vm86() signal 11 message would previously have begun.  So looks like a modesetting issue.  Don't know if it is related to this framebuffer invalid mode problem, but all 3 cases of Xorg issues (intel, nvidia and ati-drivers) still fail with the latest PaX patches unless paxctl -pm in the case of intel/ati and paxctl -m in the case of nvidia binary drivers.
Comment 5 PaX Team 2009-03-21 13:17:26 UTC
the only thing i can think of is my /dev/mem restriction related changes, some of which i reverted in the very latest patches (for both .27 and .28 as well), so before anything, try them first. other than that an strace would help me see what's going on exactly. probably some mmap on /dev/mem fails to use or get PROT_EXEC and later video BIOS calls meet with a SIGKILL or segfault. at least the need for paxctl -m or -p suggests that's the case.
Comment 6 Jory A. Pratt gentoo-dev 2009-08-21 17:17:02 UTC
This is still very much an issue with 2.6.29, I will test 2.6.30 in next few days.
Comment 7 Jory A. Pratt gentoo-dev 2009-08-22 20:35:06 UTC
This is actually an issue in the compiler. I will dig deeper to see if it is pie or ssp.
Comment 8 Jory A. Pratt gentoo-dev 2009-08-22 20:35:38 UTC

*** This bug has been marked as a duplicate of bug 282201 ***