Page 1 of 1

kernel 2.6.22.2-grsec compile problem Please Help!

PostPosted: Tue Aug 14, 2007 8:41 am
by kid
Im using Slackware 10.2.0 and i just try to compile the new kernel with the latest grsecurity ptach.
And i got these errors on make:
Code: Select all
 CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  MODPOST vmlinux
WARNING: arch/i386/kernel/built-in.o(.exit.text+0x26): Section mismatch: reference to .init.text: (after 'cache_remove_dev')
WARNING: kernel/built-in.o(.text+0x14c52): Section mismatch: reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head')
WARNING: drivers/built-in.o(.text+0x41e63): Section mismatch: reference to .init.text: (between 'sis900_probe' and 'sis900_default_phy')
  OBJCOPY arch/i386/boot/compressed/vmlinux.bin
/bin/sh: line 1: 12876 File size limit exceededobjcopy -O binary -R .note -R .comment -S vmlinux arch/i386/boot/compressed/vmlinux.bin
make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 153
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2


Probably it is not a grsecurity problem... but i can't understand where is the problem. If anyone knows something please help.

Re: kernel 2.6.22.2-grsec compile problem Please Help!

PostPosted: Wed Aug 15, 2007 9:27 am
by PaX Team
kid wrote:
Code: Select all
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
/bin/sh: line 1: 12876 File size limit exceededobjcopy -O binary -R .note -R .comment -S vmlinux arch/i386/boot/compressed/vmlinux.bin
can you post readelf -e vmlinux and maybe the interesting parts of your .config?

Re: kernel 2.6.22.2-grsec compile problem Please Help!

PostPosted: Thu Aug 16, 2007 2:50 pm
by kid
PaX Team wrote:
kid wrote:
Code: Select all
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
/bin/sh: line 1: 12876 File size limit exceededobjcopy -O binary -R .note -R .comment -S vmlinux arch/i386/boot/compressed/vmlinux.bin
can you post readelf -e vmlinux and maybe the interesting parts of your .config?


Code: Select all
root@Hera:/usr/src/linux-2.6.22.2-grsec# readelf -e vmlinux
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x400000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          4780832 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         47
  Section header string table index: 44

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text.startup     PROGBITS        c0200000 001000 000007 00  WA  0   0  1
  [ 2] .smp_locks        PROGBITS        c0201000 2b5000 000000 00   W  0   0  1
  [ 3] .init.data        PROGBITS        c0201000 002000 009be0 00  WA  0   0 128
  [ 4] .init.setup       PROGBITS        c020abe0 00bbe0 00045c 00  WA  0   0  4
  [ 5] .initcall.init    PROGBITS        c020b03c 00c03c 000294 00  WA  0   0  4
  [ 6] .con_initcall.ini PROGBITS        c020b2d0 00c2d0 000004 00  WA  0   0  4
  [ 7] .security_initcal PROGBITS        c020b2d4 2b5000 000000 00   W  0   0  1
  [ 8] .altinstructions  PROGBITS        c020b2d4 00c2d4 002cc3 00   A  0   0  4
  [ 9] .altinstr_replace PROGBITS        c020df97 00ef97 000c0c 00   A  0   0  1
  [10] .parainstructions PROGBITS        c020eba4 2b5000 000000 00   W  0   0  1
  [11] .data.percpu      PROGBITS        00000000 010000 000004 00  WA  0   0  1
  [12] .init.text        PROGBITS        c0210000 011000 0192c8 00  AX  0   0 16
  [13] .exit.text        PROGBITS        c02292d0 02a2d0 00098e 00  AX  0   0 16
  [14] .filler           PROGBITS        c0229c5e 2b5c5e 1d63a1 00  WA  0   0  1
  [15] .text.head        PROGBITS        c0400000 02b000 0000cd 00  AX  0   0 16
  [16] .text             PROGBITS        c04000d0 02b0d0 1f735d 00  AX  0   0 16
  [17] __ex_table        PROGBITS        c05f7430 222430 000e78 00   A  0   0  8
  [18] __bug_table       PROGBITS        c05f82a8 2232a8 00387c 00   A  0   0  1
  [19] .tracedata        PROGBITS        c05fbb24 48bfff 000000 00   W  0   0  1
  [20] .rodata           PROGBITS        c05fc000 227000 04c314 00  WA  0   0 4096
  [21] .pci_fixup        PROGBITS        c0648314 273314 000708 00   A  0   0  4
  [22] .rio_route        PROGBITS        c0648a1c 48bfff 000000 00   W  0   0  1
  [23] __ksymtab         PROGBITS        c0648a1c 273a1c 0047e8 00   A  0   0  4
  [24] __ksymtab_gpl     PROGBITS        c064d204 278204 001838 00   A  0   0  4
  [25] __ksymtab_unused  PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [26] __ksymtab_unused_ PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [27] __ksymtab_gpl_fut PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [28] __kcrctab         PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [29] __kcrctab_gpl     PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [30] __kcrctab_unused  PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [31] __kcrctab_unused_ PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [32] __kcrctab_gpl_fut PROGBITS        c064ea3c 48bfff 000000 00   W  0   0  1
  [33] __ksymtab_strings PROGBITS        c064ea40 279a40 00d4f8 00   A  0   0 32
  [34] __param           PROGBITS        c065bf38 286f38 0005c8 00   A  0   0  4
  [35] .rodata.page_alig PROGBITS        c065d000 288000 002800 00   A  0   0 16
  [36] .data             PROGBITS        c0660000 28b000 020b44 00  WA  0   0 32
  [37] .data_nosave      PROGBITS        c0681000 48bfff 000000 00   W  0   0  1
  [38] .data.cacheline_a PROGBITS        c0681000 2ac000 002400 00  WA  0   0 128
  [39] .data.read_mostly PROGBITS        c0683400 2ae400 002df4 00  WA  0   0 128
  [40] .data.init_task   PROGBITS        c0688000 2b3000 002000 00  WA  0   0 32
  [41] .bss              NOBITS          c068a000 2b5000 045000 00  WA  0   0 128
  [42] .comment          PROGBITS        00000000 48bfff 0030ba 00      0   0  1
  [43] .notes            NOTE            000030ba 48f0b9 000000 00   X  0   0  1
  [44] .shstrtab         STRTAB          00000000 48f0b9 000265 00      0   0  1
  [45] .symtab           SYMTAB          00000000 48fa78 0621a0 10     46 18715  4
  [46] .strtab           STRTAB          00000000 4f1c18 07115a 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0xc0200000 0x00200000 0x0eba3 0x0eba3 RW  0x1000
  LOAD           0x010000 0x00000000 0x0020f000 0x00004 0x00004 RW  0x1000
  LOAD           0x011000 0xc0210000 0x00210000 0x19c5e 0x19c5e R E 0x1000
  LOAD           0x02b000 0xc0400000 0x00400000 0x1f742d 0x1f742d R E 0x1000
  LOAD           0x222430 0xc05f7430 0x005f7430 0x683d0 0x683d0 R   0x1000
  LOAD           0x28b000 0xc0660000 0x00660000 0x2a000 0x6f000 RW  0x1000
  NOTE           0x000000 0x000030ba 0x000030ba 0x00000 0x00000     0x1

 Section to Segment mapping:
  Segment Sections...
   00     .text.startup .init.data .init.setup .initcall.init .con_initcall.init .altinstructions .altinstr_replace
ment
   01     .data.percpu
   02     .init.text .exit.text
   03     .text.head .text
   04     __ex_table __bug_table .rodata .pci_fixup __ksymtab __ksymtab_gpl __ksymtab_strings __param .rodata.page_
aligned
   05     .data .data.cacheline_aligned .data.read_mostly .data.init_task .bss
   06
root@Hera:/usr/src/linux-2.6.22.2-grsec#


Here is the config: http://hera.bergon.net/.config

Thanks for the answer and help PaX Team!

Re: kernel 2.6.22.2-grsec compile problem Please Help!

PostPosted: Thu Aug 16, 2007 6:53 pm
by PaX Team
i don't see anything immediately wrong, so my next guess is that your binutils could be old, if it's <2.17, could you upgrade it and try again?

Re: kernel 2.6.22.2-grsec compile problem Please Help!

PostPosted: Fri Aug 17, 2007 4:24 am
by kid
PaX Team wrote:i don't see anything immediately wrong, so my next guess is that your binutils could be old, if it's <2.17, could you upgrade it and try again?

Thanks so much.. it works ;)
I upgrade my old binutils-2.15.92.0.2-i486-3 with the new binutils-2.17.50.0.17-i486-1 for slack 12.0
I hope all gonna work fine, without troubles caused by this new binutils version. ;)