Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378449 - hardened-sources-2.6.39-r9 causes kernel panic on boot
Summary: hardened-sources-2.6.39-r9 causes kernel panic on boot
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: Normal critical
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 09:14 UTC by Alexander Stoll
Modified: 2011-08-11 08:10 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 Alexander Stoll 2011-08-09 09:14:35 UTC
Two different test systems are not able to boot 2.6.39-r9, both system freeze with kernel panic. This must be a regression introduced with r9, all 2.6.39 before r9 were running fine on these systems, identical kernel config of course.


Reproducible: Always

Steps to Reproduce:
1. Build kernel
2. boot
3. watch kernel panic
Actual Results:  
kernel panic

Expected Results:  
boot up
Comment 1 Marcin Mirosław 2011-08-09 11:42:03 UTC
I've got problems with with kernell too. My system started but in dmesg i've got:

[   17.240388] grsec: mount of /dev/mapper/system-lportage to /usr/portage by /bin/mount[mount:1449] uid/euid:0/0 gid/egid:0/0, parent /lib64/rc/sh/runscript.sh[runscript.sh:1442] uid/euid:0/0 gid/egid:0/0
[   17.841086] BUG: unable to handle kernel paging request at 0000000000001180
[   17.842290] IP: [<0000000000001180>] 0x117f
[   17.843092] PGD 1ebbd000 
[   17.843972] Oops: 0010 [#1] SMP 
[   17.844982] last sysfs file: /sys/devices/pci0000:00/0000:00:01.1/host0/target0:0:0/0:0:0:0/block/sda/dev
[   17.846080] CPU 1 
[   17.846392] Modules linked in: jfs dm_mod 8139too sr_mod evdev 8139cp cdrom
[   17.849906] 
[   17.850000] Pid: 1508, comm: dd Not tainted 2.6.39-hardened-r9 #1 Xen HVM domU
[   17.850000] RIP: 0010:[<0000000000001180>]  [<0000000000001180>] 0x117f
[   17.850000] RSP: 0018:ffff88001c9d1f20  EFLAGS: 00010282
[   17.850000] RAX: ffff88001e907e40 RBX: 0000000000000001 RCX: 0000000000000000
[   17.850000] RDX: ffffffffffffffea RSI: ffff88001c9d1f28 RDI: 0000000000000001
[   17.850000] RBP: 00000399894854f0 R08: 0000000000000000 R09: 0000000000000000
[   17.850000] R10: 0000000000000000 R11: 0000000000000206 R12: ffff88001c9d1f28
[   17.850000] R13: 00000000ffffffff R14: 0000000000000200 R15: 0000000000000000
[   17.850000] FS:  000003716cb54700(0000) GS:ffff88001fd00000(0000) knlGS:0000000000000000
[   17.850000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   17.850000] CR2: 0000000000001180 CR3: 0000000001342000 CR4: 00000000000006b0
[   17.850000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   17.850000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   17.850000] Process dd (pid: 1508, threadinfo ffff88001e2338d0, task ffff88001e233500)
[   17.850000] Stack:
[   17.850000]  ffffffff81057834 0000000000000000 ffffffff81331325 0000000000000001
[   17.850000]  00000399894854f0 0000000000000000 ffffffff81331859 0000000000000206
[   17.850000]  0000000000000000 0000000000000000 0000000000000000 00000000000000e4
[   17.850000] Call Trace:
[   17.850000]  [<ffffffff81057834>] ? sys_clock_gettime+0x34/0x170
[   17.850000]  [<ffffffff81331325>] ? page_fault+0x35/0x40
[   17.850000]  [<ffffffff81331859>] ? system_call_fastpath+0x16/0x1b
[   17.850000]  [<ffffffff813317f7>] ? system_call_after_swapgs+0x17/0x63
[   17.850000] Code:  Bad RIP value.
[   17.850000] RIP  [<0000000000001180>] 0x117f
[   17.850000]  RSP <ffff88001c9d1f20>
[   17.850000] CR2: 0000000000001180
[   17.850000] ---[ end trace daab144ed173ca9a ]---
[   17.950484] Adding 1172708k swap on /dev/sda5.  Priority:-1 extents:1 across:1172708k 
[   19.632284] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   19.746221] nf_conntrack version 0.5.0 (3950 buckets, 15800 max)
[   20.222121] ip_set version 4 loaded
[   21.301934] 8139cp 0000:00:04.0: eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
[   22.004397] IPv6 over IPv4 tunneling driver
[   24.520932] BUG: unable to handle kernel paging request at 0000039ff1575ab0
[   24.521864] IP: [<0000039ff1575ab0>] 0x39ff1575aaf
[   24.522536] PGD 1b8c3000 
[   24.523275] Oops: 0010 [#2] SMP 
[   24.524099] last sysfs file: /sys/devices/virtual/block/dm-8/dm/name
[   24.524626] CPU 1 
[   24.524855] Modules linked in: sit tunnel4 xt_TCPMSS xt_multiport xt_geoip ipt_set xt_TARPIT ip_set_iphash ip_set_nethash sha1_generic xt_SYSRQ compat_xtables nf_conntrack_ipv6 nf_defrag_ipv6 ip6t_rt xt_state ip_set ip6table_mangle iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip6table_filter ip6_tables iptable_filter jfs dm_mod 8139too sr_mod evdev 8139cp cdrom
[   24.530000] 
[   24.530000] Pid: 2449, comm: date Tainted: G      D     2.6.39-hardened-r9 #1 Xen HVM domU
[   24.530000] RIP: 0010:[<0000039ff1575ab0>]  [<0000039ff1575ab0>] 0x39ff1575aaf
[   24.530000] RSP: 0018:ffff88001ded9ed0  EFLAGS: 00010286
[   24.530000] RAX: ffff88001e907e90 RBX: 0000000000000000 RCX: 000003644b5cd12c
[   24.530000] RDX: ffffffffffffffea RSI: ffff88001ded9ed8 RDI: 0000000000000000
[   24.530000] RBP: 0000039e30d6a010 R08: 000003644b5cc0f4 R09: 0000000000000000
[   24.530000] R10: 000003644b5cd12c R11: 0000000000000206 R12: ffff88001ded9ed8
[   24.530000] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[   24.530000] FS:  000003644b9e4700(0000) GS:ffff88001fd00000(0000) knlGS:0000000000000000
[   24.530000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   24.530000] CR2: 0000039ff1575ab0 CR3: 0000000001342000 CR4: 00000000000006b0
[   24.530000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   24.530000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   24.530000] Process date (pid: 2449, threadinfo ffff88001e2c3f70, task ffff88001e2c3ba0)
[   24.530000] Stack:
[   24.530000]  ffffffff81057834 0000000000000000 0000000000000000 0000000000000000
[   24.530000]  0000039e30d6a010 0000000000000002 ffffffff81331859 0000000000000206
[   24.530000]  000003644b5cd12c 0000000000000000 000003644b5cc0f4 00000000000000e4
[   24.530000] Call Trace:
[   24.530000]  [<ffffffff81057834>] ? sys_clock_gettime+0x34/0x170
[   24.530000]  [<ffffffff81331859>] ? system_call_fastpath+0x16/0x1b
[   24.530000]  [<ffffffff813317f7>] ? system_call_after_swapgs+0x17/0x63
[   24.530000] Code:  Bad RIP value.
[   24.530000] RIP  [<0000039ff1575ab0>] 0x39ff1575aaf
[   24.530000]  RSP <ffff88001ded9ed0>
[   24.530000] CR2: 0000039ff1575ab0
[   24.530000] ---[ end trace daab144ed173ca9b ]---


And works slooowly.
Comment 2 Marcin Mirosław 2011-08-09 11:49:18 UTC
emerge --info
FEATURES variable contains unknown value(s): Xkeepwork, Xtest, Yfail-clean, Yprofile, Ysplitdebug, Yuserpriv, profile-use
Portage 2.1.10.3 (hardened/linux/amd64, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-hardened-r7 x86_64)
=================================================================
System uname: Linux-2.6.39-hardened-r7-x86_64-Intel-R-_Core-TM-_i7_CPU_930_@_2.80GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 09 Aug 2011 07:30:01 +0000
ccache version 3.1.5 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5, 4.5.3
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sping science x-local miro-testowe horhe
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe         -fprefetch-loop-arrays -fpeel-loops     -fgraphite-identity -floop-interchange -floop-block -floop-strip-mine -fira-loop-pressure     -fpredictive-commoning -freorder-blocks-and-partition -ftracer -ftree-loop-distribution -ftree-vectorize        --param l2-cache-size=128 --param l1-cache-size=16 --param l1-cache-line-size=32"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe       -fprefetch-loop-arrays -fpeel-loops     -fgraphite-identity -floop-interchange -floop-block -floop-strip-mine -fira-loop-pressure     -fpredictive-commoning -freorder-blocks-and-partition -ftracer -ftree-loop-distribution -ftree-vectorize        --param l2-cache-size=128 --param l1-cache-size=16 --param l1-cache-line-size=32"
DISTDIR="/usr/portage/distfiles"
FEATURES="Xkeepwork Xtest Yfail-clean Yprofile Ysplitdebug Yuserpriv assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch profile-use protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
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="/var/lib/layman/sping /var/lib/layman/science /usr/portage/local /usr/local/portage/miro/staging /usr/local/portage/miro/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi amd64 apache2 bash-completion bzip2 caps cli crypt cups cxx dri hardened iconv idn iproute2 ipv6 justify mmap mmx mmxext modules mudflap multilib ncurses nls nptl nptlonly openmp openssl pcre pppd readline session slang smp sse sse2 sse3 sse4 sse4a ssl ssse3 sysfs syslog threads threadsafe unicode urandom vhosts vim-syntax xattr zlib" 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 auth_digest authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user cache cgid dav dav_fs dav_lock dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif status unique_id usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" ELIBC="glibc" KERNEL="linux" LINGUAS="pl en" NGINX_MODULES_HTTP="access browser charset gzip map limit_zone proxy rewrite stub_status" PHP_TARGETS="php5-3" USERLAND="GNU" XTABLES_ADDONS="geoip ipset psd sysrq tarpit" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Anthony Basile gentoo-dev 2011-08-09 12:19:11 UTC
Thanks for the report.  I'm pretty sure that this was introduced from the grsec patches.  I'll be getting -r10 soon and remove -r9 from the tree.  If -r10 has it, then I'll start tracing it down.

If anyone has the time, can they also test hardened-sources-2.6.32-r59 which is part of the same patchset?  I suspect it might have the same problem.
Comment 4 7v5w7go9ub0o 2011-08-09 14:53:46 UTC
I'm getting lots of compilation errors on the source: e.g.
 
include/linux/string.h:118:14: note: expected 'const char *' but argument is of type 'const unsigned char *'
include/linux/fsnotify.h:317:2: warning: pointer targets in return differ in signedness

/usr/src/linux-2.6.39-hardened-r9/arch/x86/include/asm/unistd_64.h:18:1: warning: initialized field overwritten
/usr/src/linux-2.6.39-hardened-r9/arch/x86/include/asm/unistd_64.h:18:1: warning: (near initialization for 'sys_call_table[1]')

arch/x86/kernel/apic/io_apic.c:2846:2: warning: comparison of unsigned expression >= 0 is always true
arch/x86/kernel/apic/io_apic.c:2856:3: warning: comparison of unsigned expression >= 0 is always true
arch/x86/kernel/apic/io_apic.c:2860:2: warning: comparison of unsigned expression >= 0 is always true

etc.

FWIW, I saw these types of messages before during the compilation of an earlier version of hardened-sources (can't find the thread in bugzilla) that resulted in kernel panics; I believe it was the grsec patch; IIRC it was this year; it was quickly updated and fixed.

HTH
Comment 5 7v5w7go9ub0o 2011-08-09 19:44:59 UTC
FWIW, I just got about 30 seconds into compiling 2.6.39-r10 and am seeing the same messages described above.  

I received virtually no warning messages compiling hardened-sources-2.6.39-r8 and gentoo-sources-3.0.1 - each of which works fine.
Comment 6 Anthony Basile gentoo-dev 2011-08-09 22:22:20 UTC
(In reply to comment #5)
> FWIW, I just got about 30 seconds into compiling 2.6.39-r10 and am seeing the
> same messages described above.  
> 
> I received virtually no warning messages compiling hardened-sources-2.6.39-r8
> and gentoo-sources-3.0.1 - each of which works fine.

Those are warnings.  Does it compile?  Did you boot into it?

@Alexander Stoll + Marcin Mirosław: can you let me know if -r10 fixes your problem?
Comment 7 Marcin Mirosław 2011-08-10 09:23:00 UTC
It looks it works for me without problem (r10).
Comment 8 Agostino Sarubbo gentoo-dev 2011-08-10 10:51:45 UTC
@blueness

works also for me r10. I didn't try r9.
Comment 9 Anthony Basile gentoo-dev 2011-08-10 10:59:35 UTC
Okay removing -r9 from the tree.  Thanks for testing.
Comment 10 7v5w7go9ub0o 2011-08-10 12:47:43 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > FWIW, I just got about 30 seconds into compiling 2.6.39-r10 and am seeing the
> > same messages described above.  
> > 
> > I received virtually no warning messages compiling hardened-sources-2.6.39-r8
> > and gentoo-sources-3.0.1 - each of which works fine.
> 
> Those are warnings.  Does it compile?  Did you boot into it?
> 

I did not finish the compilation.

It sounds as though others are having success with it; think I'll stick with r8 'til the next update.

Thanks for your quick action on this issue!!
Comment 11 Alexander Stoll 2011-08-10 13:49:43 UTC
Confirmed booting on test system, all seems fine so far, will keep on testing...
Comment 12 Pandu E Poluan 2011-08-11 08:10:20 UTC
Confirmed booting okay with r10.

With r9, I can boot okay *but* wget gets killed everytime it tries to pull something (after creating the local file).

That said, the HUGE amount of WARNINGs emitted is still somewhat unsettling, though.