FTBFS at mm/mmap.c:85 using pristine 2.6.24.3 kernel +2.1.11

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

FTBFS at mm/mmap.c:85 using pristine 2.6.24.3 kernel +2.1.11

Postby supaplex » Mon Mar 10, 2008 12:13 pm

I have a 2.6.24.3 kernel that does not build while using the 2.1.11 grsec patch. While applying patches, all went without a hitch, and didn't even suggest 'fuzz'. I'm building a uml kernel for a -x86 host. The build env is running Debian Etch.

Quick rundown of my build:

tar -xf sources/linux-2.6.24.tar.gz
mv linux-2.6.24 uml.linux-2.6.24.3-scrub-02
cd uml.linux-2.6.24.3-scrub-02
zcat ../patches/linux/patch-2.6.24.3.gz | patch -p1
zcat ../patches/grsec/grsecurity-2.1.11-2.6.24.3-200803031942.patch.gz | patch -p1
cp ../mykonfigz/config-2.6.24-scrub-01 .config
ARCH=um make

CC mm/mmap.o
mm/mmap.c: In function ‘vm_get_page_prot’:
mm/mmap.c:85: error: ‘nx_enabled’ undeclared (first use in this function)
mm/mmap.c:85: error: (Each undeclared identifier is reported only once
mm/mmap.c:85: error: for each function it appears in.)
mm/mmap.c:88: error: implicit declaration of function ‘pte_exprotect’
mm/mmap.c:88: error: request for member ‘pte’ in something not a structure or union
make[1]: *** [mm/mmap.o] Error 1
make: *** [mm] Error 2


If there's anything else I can provide, just let me know. thanks!
supaplex
 
Posts: 4
Joined: Mon Mar 10, 2008 11:14 am

Re: FTBFS at mm/mmap.c:85 using pristine 2.6.24.3 kernel +2.1.11

Postby PaX Team » Mon Mar 10, 2008 6:41 pm

supaplex wrote:I have a 2.6.24.3 kernel that does not build while using the 2.1.11 grsec patch. While applying patches, all went without a hitch, and didn't even suggest 'fuzz'. I'm building a uml kernel for a -x86 host.
i guess UML requires special support/changes from PaX, i've never even tried it and to be honest, it's got a low priority for me. patches are welcome though ;).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: FTBFS at mm/mmap.c:85 using pristine 2.6.24.3 kernel +2.1.11

Postby supaplex » Mon Mar 10, 2008 7:10 pm

I'm not much of a kernel code hacker, but okay :) I'm already on build 8 with different variants now, so we'll see what happens. If I can get this working, I'll try to backport the unionfs patch that works from 2.6.25-rc3-mm1 8)
supaplex
 
Posts: 4
Joined: Mon Mar 10, 2008 11:14 am

2.1.11 FTBFS using pristine 2.6.24.3 ARCH=um - so close!

Postby supaplex » Mon Mar 10, 2008 7:45 pm

LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
mm/built-in.o: In function `do_mmap_pgoff':
(.text+0xe35d): undefined reference to `i386_mmap_check'
mm/built-in.o: In function `do_brk':
(.text+0xf3be): undefined reference to `i386_mmap_check'
collect2: ld returned 1 exit status
SYSMAP System.map
nm: 'vmlinux': No such file
make: *** [vmlinux] Error 1
Script done, file is ../uml.linux-2.6.24.3-scrub-08.3b7a66a4-1774-448b-8ac3-65cb88c18950.txt
supaplex@armada: uml.linux-2.6.24.3-scrub-08$ ls -A
arch drivers kernel Module.symvers sound
block fs lib net System.map
.config .gitignore localversion-grsec .old_version .tmp_versions
.config.old grsecurity .mailmap README usr
COPYING include MAINTAINERS REPORTING-BUGS .version
CREDITS init Makefile samples .vmlinux.cmd
crypto ipc .missing-syscalls.d scripts vmlinux.o
Documentation Kbuild mm security .vmlinux.o.cmd
supaplex
 
Posts: 4
Joined: Mon Mar 10, 2008 11:14 am

lkml "grsec patch erronusly has arch specific stuff"

Postby supaplex » Tue Mar 11, 2008 11:06 am

Please see http://marc.info/?t=120521174000001&r=1&w=2

This is a pretty big patch, but i'll try wrapping my head around it anyway. any tips/insight/help/etc welcome.
supaplex
 
Posts: 4
Joined: Mon Mar 10, 2008 11:14 am

Re: lkml "grsec patch erronusly has arch specific stuff"

Postby PaX Team » Tue Mar 11, 2008 4:04 pm

supaplex wrote:Please see http://marc.info/?t=120521174000001&r=1&w=2

This is a pretty big patch, but i'll try wrapping my head around it anyway. any tips/insight/help/etc welcome.
did you grep the sources for i386_mmap_check? it would have led you to the right places in include/asm-x86/mman.h and arch/x86/kernel/sys_i386_32.c .
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support