LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-24-2006, 12:47 PM   #1
iw05t
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
Linux 2.4.31 with kdb and aslr


Hi,

I'm running Linux 2.4.31 and I have patched it with PaX ASLRfor 2.4.31, which went smoothly. I then patched the kernel with kdb-v4.3-2.4.27-common-1 and kdb-v4.3-2.4.27-i386-1 since there is no patch for the 2.4.31 kernel.

I got a few errors but fixed that by hand.

>>> cat ../kdb-v4.3-2.4.27-common-1 | patch - p1 <<<
patching file Documentation/Configure.help
Hunk #1 succeeded at 22301 (offset 44 lines).
patching file Documentation/kdb/dump.txt
patching file Documentation/kdb/kdb.mm
patching file Documentation/kdb/kdb_bp.man
patching file Documentation/kdb/kdb_bt.man
patching file Documentation/kdb/kdb_env.man
patching file Documentation/kdb/kdb_ll.man
patching file Documentation/kdb/kdb_md.man
patching file Documentation/kdb/kdb_rd.man
patching file Documentation/kdb/kdb_sr.man
patching file Documentation/kdb/kdb_ss.man
patching file Documentation/kdb/slides
patching file Makefile
patching file drivers/char/keyboard.c
patching file drivers/char/serial.c
Hunk #2 succeeded at 603 with fuzz 1 (offset 11 lines).
Hunk #3 succeeded at 6030 (offset -6 lines).
patching file drivers/char/sn_serial.c
patching file drivers/sbus/char/sab82532.c
patching file drivers/sbus/char/su.c
Hunk #3 succeeded at 2991 (offset -7 lines).
patching file drivers/sbus/char/sunkbd.c
patching file drivers/sbus/char/sunkeymap.c
patching file drivers/usb/hid-core.c
Hunk #2 succeeded at 1458 (offset 22 lines).
patching file drivers/usb/host/usb-uhci.c
Hunk #2 succeeded at 2916 (offset -5 lines).
patching file drivers/usb/usbkbd.c
patching file include/linux/dis-asm.h
patching file include/linux/kallsyms.h
patching file include/linux/kdb.h
patching file include/linux/kdbprivate.h
patching file include/linux/module.h
patching file include/linux/sysctl.h
patching file init/main.c
Hunk #2 succeeded at 274 (offset 14 lines).
patching file kdb/ChangeLog
patching file kdb/Makefile
patching file kdb/kdb_bp.c
patching file kdb/kdb_bt.c
patching file kdb/kdb_cmds
patching file kdb/kdb_id.c
patching file kdb/kdb_io.c
patching file kdb/kdbmain.c
patching file kdb/kdbsupport.c
patching file kdb/modules/Makefile
patching file kdb/modules/kdbm_pg.c
patching file kdb/modules/kdbm_task.c
patching file kdb/modules/kdbm_vm.c
patching file kernel/Makefile
patching file kernel/kallsyms.c
patching file kernel/ksyms.c
Hunk #2 succeeded at 87 with fuzz 1.
Hunk #3 succeeded at 635 (offset 1 line).
patching file kernel/module.c
patching file kernel/printk.c
Hunk #1 succeeded at 297 (offset 1 line).
patching file kernel/sched.c
patching file kernel/signal.c
patching file kernel/sysctl.c
Hunk #2 FAILED at 281.
1 out of 2 hunks FAILED -- saving rejects to file kernel/sysctl.c.rej
patching file mm/memory.c
Hunk #1 succeeded at 1664 (offset 167 lines).


>>> cat ../kdb-v4.3-2.4.27-i386-1 | patch -p1 <<<
patching file arch/i386/Makefile
Hunk #1 succeeded at 105 (offset 4 lines).
Hunk #2 succeeded at 118 with fuzz 1.
patching file arch/i386/config.in
Hunk #1 succeeded at 483 (offset 4 lines).
patching file arch/i386/kdb/ChangeLog
patching file arch/i386/kdb/Makefile
patching file arch/i386/kdb/ansidecl.h
patching file arch/i386/kdb/bfd.h
patching file arch/i386/kdb/i386-dis.c
patching file arch/i386/kdb/kdba_bp.c
patching file arch/i386/kdb/kdba_bt.c
patching file arch/i386/kdb/kdba_id.c
patching file arch/i386/kdb/kdba_io.c
patching file arch/i386/kdb/kdbasupport.c
patching file arch/i386/kernel/bluesmoke.c
patching file arch/i386/kernel/entry.S
Hunk #2 succeeded at 411 with fuzz 2 (offset 11 lines).
patching file arch/i386/kernel/i8259.c
patching file arch/i386/kernel/io_apic.c
patching file arch/i386/kernel/irq.c
patching file arch/i386/kernel/nmi.c
patching file arch/i386/kernel/process.c
patching file arch/i386/kernel/smp.c
patching file arch/i386/kernel/smpboot.c
patching file arch/i386/kernel/traps.c
Hunk #3 succeeded at 81 (offset -5 lines).
Hunk #5 succeeded at 214 (offset -5 lines).
Hunk #6 FAILED at 236.
Hunk #8 succeeded at 398 (offset -5 lines).
Hunk #9 succeeded at 489 (offset 7 lines).
Hunk #10 succeeded at 566 with fuzz 2 (offset -6 lines).
Hunk #11 succeeded at 649 (offset 7 lines).
Hunk #12 succeeded at 1061 (offset 29 lines).
Hunk #13 succeeded at 1057 (offset 7 lines).
1 out of 13 hunks FAILED -- saving rejects to file arch/i386/kernel/traps.c.rej
patching file arch/i386/vmlinux.lds
Hunk #1 FAILED at 28.
Hunk #2 succeeded at 279 (offset 229 lines).
Hunk #3 FAILED at 305.
2 out of 3 hunks FAILED -- saving rejects to file arch/i386/vmlinux.lds.rej
patching file include/asm-i386/hw_irq.h
patching file include/asm-i386/kdb.h
patching file include/asm-i386/kdbprivate.h
patching file include/asm-i386/keyboard.h
patching file include/asm-i386/kmap_types.h
patching file include/asm-i386/ptrace.h
patching file kdb/modules/kdbm_x86.c


The number of rejects were very small and easily fixed manually. However, the arch/i386/vmlinux.lds file did not exist (when make mrproper) or was a blank file. Instead, there was arch/i386/vmlinux.lds.S, to which I applied the changes initially meant for vmlinux.lds.

On compilation, I get these errors

*** Instance 1 ***
ld:~/tmp/linux-2.4.31-test/arch/i386/vmlinux.lds:358: syntax error
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `~/tmp/linux-2.4.31-test'
make: *** [vmlinux] Error 2

*** Instance 2 ***
kdb/kdb.o(.text.init+0x8e3): In function `kdb_inittab':
: undefined reference to `__kdb_initcall_start'
kdb/kdb.o(.text.init+0x911): In function `kdb_inittab':
: undefined reference to `__kdb_initcall_end'
kdb/kdb.o(.text.init+0x927): In function `kdb_inittab':
: undefined reference to `__kdb_initcall_end'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `~tmp/linux-2.4.31-test2'
make: *** [vmlinux] Error 2

I'd be grateful for any help. Thanks in advance.
-Ian
 
Old 01-24-2006, 04:27 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to find the source for KGDB or KDB bhuvanmital Linux - Software 2 08-18-2008 01:23 AM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
patching linux kernel-2.4.20-8 with kdb enthusiast_abdul Programming 1 11-08-2005 09:11 AM
Debugging Linux Kernel Module with kdb Igor007 Programming 1 10-28-2005 01:21 AM
Reg. kdb patch blpriya12 Linux - Software 0 04-28-2005 03:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration