Linice 2.1 released - support for 2.6 kernels!

8 views
Skip to first unread message

Goran Devic

unread,
Dec 23, 2004, 4:00:08 AM12/23/04
to lin...@googlegroups.com
I tested it on a Debian with 2.6 kernel (and on older RH with 2.4 for
compatibility); everything runs fine, as far as I could tell :)

I rearranged some directories, moved common files into include,
extension interface into 2.4/ext (needs to be ported to 2.6/ext),
cleaned up the files; hopefully should be no suprises ;-)

The next would be to fix up all the commands under 2.6; there are some
that for some reason broke under 2.4 ('proc'); hook up module load and
unload with 2.6; compile 2.6 kernel with debug information and get to
source-level debug it,... We'd also need some good stress testing to
find out all the big and small problems.

Thanks!
- Goran

prcoder

unread,
Dec 23, 2004, 5:40:23 AM12/23/04
to lin...@googlegroups.com
Nice !
But it again does not want to be loaded on my system :-(

[root@tpchome bin]# linsym -i
Linice Debugger Symbol Translator/Loader Version 2.1
Linice and Linsym (C) 2004 by Goran Devic. All Rights Reserved.

Error (256) loading linice module!
[root@tpchome bin]# insmod linice_kernel.o
insmod: error inserting 'linice_kernel.o': -1 Accessing a corrupted
shared library
[root@tpchome bin]#
Maybe better use kbuild for building module entirely ?

prcoder

unread,
Dec 23, 2004, 6:03:11 AM12/23/04
to lin...@googlegroups.com
There can be at new insmod more good error-checking ?

[root@tpchome root]# uname -sr
Linux 2.6.9-1.640asptpc
[root@tpchome root]# insmod -V
module-init-tools version 3.1-pre5

prcoder

unread,
Dec 23, 2004, 6:24:37 AM12/23/04
to lin...@googlegroups.com
And output from kernel:
Dec 23 14:26:03 tpchome kernel: Verify ELF error [sec 2 rel 367]
(assertion 286)
Dec 23 14:26:03 tpchome kernel: Module failed ELF checks

daniel reznick

unread,
Dec 23, 2004, 7:00:47 AM12/23/04
to lin...@googlegroups.com
I did manage to create symbols and source debug 2.6, it worked mostly.

The way I got it to work is was to add -gstabs+ and -gstabs to the
CFLAGS and AFLAGS in the kernel's Makefile and recompile. I think the
strip step and re-link (described in 2.4 documentation) is not
necessary on 2.6, it looks like it automatically strips vmlinux before
building the bzImage.

I needed to run linsym in two passes to load the symbols (after
changing linice.dat to have more space for the 25meg file). 'linsym
-t vmlinux.dbg -o 26.sym', followed by 'linsym -s
26.sym'

The first linice step gives a lot of errors, but seems to be able to
load the file it creates. If I just use 'linsym -t vmlinux.dbg' in an
attempt to do it all in one step it seems to fail after a bunch of
errors. 'fail' means the symbols didnt show up in linice, eventhough
linsym says they should. (the errors may only show up with -v 3, i
cant remember).

Is there any way to load lighter weight symbolic information? I care
more about symbols than src, and it would be nice to be able to load
up something like all the symbols found by linice in the System.map
file automatically (or /proc/kallsyms, if its configured).

all of the above was tested with a patched linice 2.0, not 2.1.

rezn

unread,
Dec 23, 2004, 7:43:38 AM12/23/04
to lin...@googlegroups.com
one thing you can try is using strace on insmod (or strace -f on
linsym) to try to get some better error information.

Goran Devic

unread,
Dec 23, 2004, 11:57:48 AM12/23/04
to lin...@googlegroups.com
Daniel,
Yes, it looks like I need to add more granularity for the selection of
symbols to use. M$ SoftIce has options to load symbols only, without
source. I had similar mechanism in place, but I removed it at one time
since it was not elegant enough :)
I think it would be really nice to have a good selection of not only
what kind of symbols get imported, but also a better specification of
the _portions_ of the project (like, if you are debugging a scheduler,
have only that/those sources and types, and not keep _all_ of the
kernel stuff). Will think about that through the Christmas :)

prcoder - it looks like there might be something wrong with your module
compile environment. Can you compile any other module (let's say, that
you wrote, not anything that came preinstalled so to mimick the custom
setup) and load?

Thanks!
- Goran

prcoder

unread,
Dec 24, 2004, 9:38:09 AM12/24/04
to lin...@googlegroups.com
Yes, certainly, I build modules of different complexity from "hello
world" up to nvidia-drivers and all works wonderfully.
System is out of box and stable, almost all of frequetly used programs
recompiled from sources (and programs with kernel modules too).

linice module with my Makefile (using kbuild) builds successfully and
runs, but module from 2.1 source
builds, but does not want to be loaded

prcoder

unread,
Dec 24, 2004, 10:01:54 AM12/24/04
to lin...@googlegroups.com
Nothing interesting...

open("linice_2.6.9-1.640asptpc/linice.o", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1\0\3\0\1\0\0\0\0\0\0\0"...,
16384) = 16384
read(3, "[^_\311\303\215v\0\203\354\10j\5\3775\4\31\0\0\350\374"...,
16384) = 16384
read(3, "\0\2\311\303U\211\345\203\354\24h\244<\0\0\350\374\377"...,
32768) = 32768
read(3, "\377\5@T\0\0\242DT\0\0\211\330\301\340\6\200\210\200U\0"...,
65536) = 65536
mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xf6fa3000
read(3, ".\0\0\0Bus %02X Device %02X Funct"..., 131072) = 131072
mremap(0xf6fa3000, 266240, 528384, MREMAP_MAYMOVE) = 0xf6f22000
read(3, "52,32;truncate:(123,156)=*(123,1"..., 262144) = 97360
read(3, "", 164784) = 0
close(3) = 0
init_module("ELF", 0x57c50) = -1 ELIBBAD (Accessing a corrupted
shared library)
write(2, "insmod: error inserting \'linice_"..., 101) = 101
exit_group(1) = ?

Reply all
Reply to author
Forward
0 new messages