[...] MODPOST vmlinux WARNING: kernel/built-in.o(.text+0x142fd): Section mismatch: reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head') Kernel: arch/i386/boot/bzImage is ready (#1) [...] The resulting kernel does not boot. I tried both -r5 and -r6. Portage 2.1.3.9 (selinux/2007.0/x86/hardened, gcc-3.4.6, glibc-2.5-r4, 2.6.20-hardened-r6 i686) ================================================================= System uname: 2.6.20-hardened-r6 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz Timestamp of tree: Sat, 29 Sep 2007 17:20:01 +0000 app-shells/bash: 3.2_p17 dev-lang/python: 2.4.4-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0_rc4-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="collision-protect distlocks loadpolicy metadata-transfer nodoc noinfo parallel-fetch sandbox selinux sesandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.ing.unibo.it/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LINGUAS="en en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--prune-empty-dirs" 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 --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="bash-completion berkdb bitmap-fonts bzip2 caps cli cracklib crypt dbus dri fam gnutls hardened iconv idn isdnlog kerberos ldap mailwrapper mbox midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre pic pppd python radius readline reflection samba sasl selinux session snmp socks5 spl sqlite sse sse2 ssl tcpd threads truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
i second that... not sure if it's related to the section mismatch but the kernel refuses to boot and gives a "Bad EIP value" and "General Protectecion Fault".
I found the following commit log message in ChangeLog-2.6.23-rc2: commit e804a4a4dd596d853f6d6f814fbdcf97b8efcdea Author: Satyam Sharma <ssatyam@cse.iitk.ac.in> Date: Tue Jul 31 00:39:16 2007 -0700 kthread: silence bogus section mismatch warning WARNING: kernel/built-in.o(.text+0x16910): Section mismatch: reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head') comes because kernel/kthread.c:kthreadd() is not __init but calls kthreadd_setup() which is __init. But this is ok, because kthreadd_setup() is only ever called at init time, and then kthreadd() proceeds into its "for (;;)" loop. We could mark kthreadd __init_refok, but kthreadd_setup() with just one callsite and 4 lines in it (it's been that small since 10ab825bdef8df51) doesn't need to be a separate function at all -- so let's just move those four lines at beginning of kthreadd() itself. Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Seems that the section mismatch is not the cause of my boot failure according to that. Since the panic is happening very early in the boot stages, consoles and netconsole haven't been initialized yet so I can't see any error message.
Ok. I tried the patch to fix the section mismatch (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e804a4a4dd596d853f6d6f814fbdcf97b8efcdea) and I can confirm that it is a bogus warning, i.e. it is not the cause of the boot failure.
http://forums.grsecurity.net/viewtopic.php?t=1808
OK, both of you try the current hardened-sources-2.6.22 (that's -r7). It contains the newest patch from spender's devspace, and should hopefully fix your issues from what I gathered in the grsecurity forums.
Bug hasn't been fixed. :(
OK, could you please attach your .config or at least tell me what a zgrep PCI_GO /proc/config.gz returns for you.
(In reply to comment #7) > OK, could you please attach your .config or at least tell me what a zgrep > PCI_GO /proc/config.gz returns for you. > # zgrep PCI_GO /proc/config.gz # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set CONFIG_PCI_GOANY=y
(In reply to comment #8) > (In reply to comment #7) > > OK, could you please attach your .config or at least tell me what a zgrep > > PCI_GO /proc/config.gz returns for you. > > > > # zgrep PCI_GO /proc/config.gz > # CONFIG_PCI_GOBIOS is not set > # CONFIG_PCI_GOMMCONFIG is not set > # CONFIG_PCI_GODIRECT is not set > CONFIG_PCI_GOANY=y Please try setting it to CONFIG_PCI_GODIRECT, that's usually fixing it.
I tried hardened-sources-2.6.23 with CONFIG_PCI_GODIRECT and my box boots fine now. What's the correct resolution for this bug then?
(In reply to comment #10) > I tried hardened-sources-2.6.23 with CONFIG_PCI_GODIRECT and my box boots fine > now. What's the correct resolution for this bug then? For you to enable it. The kernel can't really try to figure if your BIOS is buggy or not ;)