Page 1 of 1

2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 9:08 am
by amdfanatyk
There is some problem with building kernels newer than 2.6.32.6.

I have following error:
Code: Select all
LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS


There were some releases between 2.6.32.6 and 2.6.32.11 that could be compiled without any problems but finally weren't working. So I guess some changes were made and forced me to stick with 2.6.32.6.

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 11:14 am
by PaX Team
amdfanatyk wrote:There were some releases between 2.6.32.6 and 2.6.32.11 that could be compiled without any problems but finally weren't working. So I guess some changes were made and forced me to stick with 2.6.32.6.
can you post the outout of diff -u System.map .tmp_System.map? also, for the kernels that compiled but didn't work, what errors did you get exactly?

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 11:55 am
by amdfanatyk
Code: Select all
diff -u System.map .tmp_System.map
--- System.map  2010-04-05 17:50:20.000000000 +0200
+++ .tmp_System.map     2010-04-05 17:50:20.000000000 +0200
@@ -21671,15 +21671,15 @@
 c1360ab4 r svc_pool_stats_seq_ops
 c1360ac4 r rpc_proc_fops
 c1360b2c R kallsyms_addresses
-c13737bc R kallsyms_num_syms
-c13737c0 R kallsyms_names
-c13a5c30 R kallsyms_markers
-c13a5d60 R kallsyms_token_table
-c13a60a0 R kallsyms_token_index
-c13b4b39 r .LC1
-c13c4784 r .LC12
-c13c478c r .LC13
-c13d73e0 r .LC19
+c13737b4 R kallsyms_num_syms
+c13737b8 R kallsyms_names
+c13a5c08 R kallsyms_markers
+c13a5d38 R kallsyms_token_table
+c13a6078 R kallsyms_token_index
+c13b4b11 r .LC1
+c13c475c r .LC12
+c13c4764 r .LC13
+c13d73b8 r .LC19
 c1408000 r mtrr_ops
 c1408024 r real_mode_gdt_entries
 c1409000 R __supported_pte_mask


Currently I don't exactly remember what was wrong but when I will be able to build new kernel I will also be able to reproduce the same problems (probably).

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 12:07 pm
by gottlob
I also have a problem when trying to boot into a 2.6.32.10 patched kernel. When i try to boot the new kernel i get this error
Code: Select all
WARNING bootdevice may be renamed. Try root=/dev/sda1
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)ition type 0x83
   - Check rootdelay= (did the system wait long enough?)quiet
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/hda1 does not exist. Dropping to a shell!!

BusyBox v1.10.2 ...

/bin/sh: can't access tty: job control turned off
(initramfs)

I use a Debian Lenny distro which i run into a virtual box vm. Because debian have an old libc version, and the kernel initally did not compile i skipped building lguest which caused the build error. However i saw various people following that solution in order to build the kernel so i don't think that the problem is there.
Any ideas why this is happening?

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 3:56 pm
by PaX Team
amdfanatyk wrote:Currently I don't exactly remember what was wrong but when I will be able to build new kernel I will also be able to reproduce the same problems (probably).
hmm, interesting, looks like the linker created two slightly different images. i guess you didn't try CONFIG_KALLSYMS_EXTRA_PASS yet? its help says that these inconsistency messages are a sign of kallsyms bugs, so you'll probably have to talk to the kernel developers about it.

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 4:05 pm
by PaX Team
gottlob wrote:I use a Debian Lenny distro which i run into a virtual box vm. Because debian have an old libc version, and the kernel initally did not compile i skipped building lguest which caused the build error. However i saw various people following that solution in order to build the kernel so i don't think that the problem is there.
Any ideas why this is happening?
this is an unrelated issue in this thread so please open a new one. next, follow http://en.wikibooks.org/wiki/Grsecurity/Reporting_Bugs ;).

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Mon Apr 05, 2010 4:50 pm
by amdfanatyk
PaX Team wrote:hmm, interesting, looks like the linker created two slightly different images. i guess you didn't try CONFIG_KALLSYMS_EXTRA_PASS yet? its help says that these inconsistency messages are a sign of kallsyms bugs, so you'll probably have to talk to the kernel developers about it.


I haven't tried CONFIG_KALLSYMS_EXTRA_PASS yet. Do You use binutils version 2.18?

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Tue Apr 06, 2010 5:19 am
by PaX Team
amdfanatyk wrote:Do You use binutils version 2.18?
no, i'm always on the latest and greatest ;), 2.10.1 at the moment, also in case it matters, i use gcc 4.4.3.

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Tue Apr 06, 2010 10:16 am
by amdfanatyk
Update of binutils didn't solve the problem.

Vanilla 2.6.32.11 compilation:
Code: Select all
Setup is 11820 bytes (padded to 12288 bytes).
System is 2542 kB
CRC dc8a5873
Kernel: arch/x86/boot/bzImage is ready  (#1)


Code: Select all
$ diff -u System.map .tmp_System.map
$


PaX 2.6.32.11 compilation:
Code: Select all
Setup is 11820 bytes (padded to 12288 bytes).
System is 2719 kB
CRC 5c8614e9
Kernel: arch/x86/boot/bzImage is ready  (#4)
  Building modules, stage 2.
  MODPOST 26 modules
WARNING: modpost: Found 441 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'


Code: Select all
$ diff -u System.map .tmp_System.map
$


I have used pax-linux-2.6.32.11-test28.patch.

grsecurity-2.1.14-2.6.32.11-201004051743.patch solves the problem.

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Tue Apr 06, 2010 11:46 am
by amdfanatyk
However I still cannot use 2.6.32.11-grsec because NVIDIA module fails to load.

Code: Select all
vmap allocation for size 6746112 failed: use vmalloc=<size> to increase size.
vmap allocation for size 6746112 failed: use vmalloc=<size> to increase size.
vmap allocation for size 6635520 failed: use vmalloc=<size> to increase size.

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Tue Apr 06, 2010 12:47 pm
by spender
I believe you need to use the new KERNEXEC option for increasing the amount of memory reserved for modules. It defaults to 4MB, which won't be enough for the NVIDIA drivers.

-Brad

Re: 2.6.33.2 & 2.6.32.11 problems

PostPosted: Tue Apr 06, 2010 1:51 pm
by amdfanatyk
It's working (2.6.32.11-grsec), thanks.