Re: [RFC] : Is /proc/kcore still usefull and/or maintained ?

From: Maxim
Date: Wed Mar 21 2007 - 19:28:44 EST


On Thursday 22 March 2007 01:11:57 Jan Engelhardt wrote:
>
> On Mar 21 2007 23:58, Eric Dumazet wrote:
> > Hi all
> >
> > On i386 , 2.6.20 / 2.6.21-rc4 :
> >
> > # gdb vmlinux /proc/kcore
> > error
> > # file /proc/kcore
> > error
>
> 00:11 ichi:/hld # file /proc/kcore
> /proc/kcore: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
> SVR4-style, from 'vmlinux'
> 00:11 ichi:/hld # hexdump -C /proc/kcore | head -n5
> 00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
> 00000010 04 00 03 00 01 00 00 00 00 00 00 00 34 00 00 00 |............4...|
> 00000020 00 00 00 00 00 00 00 00 34 00 20 00 03 00 00 00 |........4. .....|
> 00000030 00 00 00 00 04 00 00 00 94 00 00 00 00 00 00 00 |................|
> 00000040 00 00 00 00 a8 06 00 00 00 00 00 00 00 00 00 00 |................|
> 00:11 ichi:/hld # uname -rm
> 2.6.20.2 i686
>
> >
> >
> > Apparently we can not llseek() anymore on this file (returns -EINVAL)
> >
> > On x86_64 2.6.20 it's working
> >
> > # file /proc/kcore
> > /proc/kcore: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style
> >
> >
> > On i386 2.6.14 it's working too.
> >
> > Eric
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
> >
>
> Jan

Hello,

I once had similar problem with /proc/kcore

then gdb showed all zeros for all kernel memory,

I had look at code , and I found that "Sparse memory model" was the problem, it doesn't say where kernel memory is
(I don't remember details now)
I once choosed it just for experiment, so I switched to Flat memory, and /proc/kcore works fine till then,

I use 32 bit x86 kernel.

Regards,
Maxim Levitsky
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/