Compiling trouble

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

Compiling trouble

Postby Obscure » Wed Dec 10, 2003 4:04 pm

Hi
Compiling grsec patch from Con Kolivas on my Slack 9.0 and 2.4.23 (http://www.plumlocosoft.com/kernel/patc ... 042057.bz2)
I got this error:
Code: Select all

#make bzImage
...
...
...
make[1]: Leaving directory `/usr/src/linux-2.4.23/arch/i386/lib'
gcc -E -C -P -I/usr/src/linux-2.4.23/include -imacros /usr/src/linux-2.4.23/include/linux/config.h -imacros /usr/src/linux-2.4.23/include/asm-i386/segment.h -imacros /usr/src/linux-2.4.23/include/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds
ld -m elf_i386 -T /usr/src/linux-2.4.23/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/sound/sounddrivers.o drivers/pci/driver.o drivers/pnp/pnp.o drivers/video/video.o drivers/usb/usbdrv.o drivers/usb/gadget/built-in.o drivers/media/media.o crypto/crypto.o \
        net/network.o \
        grsecurity/grsec.o \
        /usr/src/linux-2.4.23/arch/i386/lib/lib.a /usr/src/linux-2.4.23/lib/lib.a /usr/src/linux-2.4.23/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
grsecurity/grsec.o(.text+0xa40c): In function `gr_acl_handle_psacct':
: undefined reference to `__udivdi3'
make: *** [vmlinux] Error 1


Maybe I'm on the wrong forum 'cause it's not a pure grsecurity patch but maybe someone could help..
TNXVM
Obscure
 
Posts: 3
Joined: Wed Dec 10, 2003 3:27 pm

Re: Compiling trouble

Postby PaX Team » Wed Dec 10, 2003 4:49 pm

Obscure wrote:
Code: Select all
grsecurity/grsec.o(.text+0xa40c): In function `gr_acl_handle_psacct':
: undefined reference to `__udivdi3'
make: *** [vmlinux] Error 1
this is normally a sign of 64 bit arithmetic, maybe the -ck patch redefines one of the types used in gr_acl_handle_psacct and triggers a 64 bit division, it's not a grsec problem per se, but such division has to be modified to call do_div().
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Postby Sleight of Mind » Thu Dec 11, 2003 8:41 am

i made this patch and submitted it to Con. Unfortunately i missed a variable rename in ckbase. There is a 1-line fix for it now (also on that url). Did you apply it?
Sleight of Mind
 
Posts: 92
Joined: Tue Apr 08, 2003 10:41 am

Postby Obscure » Fri Dec 12, 2003 5:58 am

I've applied all the patches into ../kernel/patches/2.4/2.4.23/2.4.23-ck1/fixes/ :

2.4.23-ck1-grsecurity-fix.patch
patch-2.4.23-ck1-fix1

but the error still remains..
TnxVM
Obscure
 
Posts: 3
Joined: Wed Dec 10, 2003 3:27 pm

Postby Sleight of Mind » Fri Dec 12, 2003 8:45 am

The problem is the 64 bit jiffies in -ck since 2.4.23.
An updated patch will be made available later today, i'm the one to blame for this low quality patch that was made in very little time and not tested well enough. I just merged the 2 and fixed the rejects, not paying attention to variables that might have changed types or names.
The new patch will fully compile and work, and once tested well enough submitted to Con, or the new 2.4 -ck maintainer, to replace the old one and the fix.

EDIT:
http://deus.et.tudelft.nl/~sleight/patches/ck/patch-2.4.23-xfs1.3.1-grsec1.9.13-0312121449.bz2
Sleight of Mind
 
Posts: 92
Joined: Tue Apr 08, 2003 10:41 am

Postby Obscure » Fri Dec 12, 2003 12:34 pm

Sleight of Mind wrote:i'm the one to blame for this low quality patch that was made in very little time and not tested well enough. I just merged the 2 and fixed the rejects, not paying attention to variables that might have changed types or names.


Your work is always wonderful..
Only God is perfect...

Tnx VM again
Obscure
 
Posts: 3
Joined: Wed Dec 10, 2003 3:27 pm


Return to grsecurity support

cron