* Re: [BUG] i386 relocable kernel breakes /proc/kcore debugging [not found] <200707280443.44048.maximlevitsky@gmail.com> @ 2007-07-28 1:58 ` Eric W. Biederman 2007-07-30 8:03 ` Vivek Goyal 1 sibling, 0 replies; 5+ messages in thread From: Eric W. Biederman @ 2007-07-28 1:58 UTC (permalink / raw) To: Maxim Levitsky; +Cc: linux-kernel, Vivek Goyal, Kexec Mailing List Maxim Levitsky <maximlevitsky@gmail.com> writes: > Hello, > > Today I noticed that gdb gets confused when I try to load a vmlinux image. > gdb 'thinks' that all kernel symbols are below 0x80000000 , while they are at > 0xC000.... > > Turning CONFIG_RELOCATABLE off fixes that, so I assume that is the reason for > that. > > I am using 2.6.23-rc1, although I don't think that older versions are better. > > Best regards, > Maxim Levitsky Weird. Vivek could this be related to the problem of problematic core dumps we were seeing earlier? Eric > PS: > This is what gdb says: > > (gdb) disassemble sys_open > Dump of assembler code for function sys_open: > 0x8026fa60 <sys_open+0>: Cannot access memory at address 0x8026fa60 > > While real address of sys_open is: > > [root@MAIN linux-2.6]# nm ./.obj/vmlinux | grep sys_open > ......... > c016ea60 T sys_open > > Strange, but gdb recordnizes the above address directly: > > (gdb) disassemble 0xc016ea60 > Dump of assembler code for function sys_open: > 0xc016ea60 <sys_open+0>: sub $0x4,%esp > 0xc016ea63 <sys_open+3>: mov 0x10(%esp),%eax > ............... ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] i386 relocable kernel breakes /proc/kcore debugging [not found] <200707280443.44048.maximlevitsky@gmail.com> 2007-07-28 1:58 ` [BUG] i386 relocable kernel breakes /proc/kcore debugging Eric W. Biederman @ 2007-07-30 8:03 ` Vivek Goyal 2007-07-30 8:41 ` Jan Kratochvil 1 sibling, 1 reply; 5+ messages in thread From: Vivek Goyal @ 2007-07-30 8:03 UTC (permalink / raw) To: Maxim Levitsky; +Cc: linux-kernel, Eric W. Biederman, jan.kratochvil On Sat, Jul 28, 2007 at 04:43:43AM +0300, Maxim Levitsky wrote: > Hello, > > Today I noticed that gdb gets confused when I try to load a vmlinux image. > gdb 'thinks' that all kernel symbols are below 0x80000000 , while they are at > 0xC000.... > > Turning CONFIG_RELOCATABLE off fixes that, so I assume that is the reason for > that. > This is a gdb issue. I had raised it in gdb mailing list some time back. http://sourceware.org/ml/gdb/2006-08/msg00137.html What version of gdb you are using? I know it got fixed for gdb shipped with RHEL5. I am not sure about what upstream version of gdb it got fixed in. I think Jan Kratochvil had put a patch to fix the issue. I am copying him on the mail and he should be able to tell which version of gdb to use. Thanks Vivek ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] i386 relocable kernel breakes /proc/kcore debugging 2007-07-30 8:03 ` Vivek Goyal @ 2007-07-30 8:41 ` Jan Kratochvil 2007-07-30 9:32 ` Maxim Levitsky 2007-07-30 14:23 ` Eric W. Biederman 0 siblings, 2 replies; 5+ messages in thread From: Jan Kratochvil @ 2007-07-30 8:41 UTC (permalink / raw) To: Vivek Goyal; +Cc: Maxim Levitsky, linux-kernel, Eric W. Biederman On Mon, 30 Jul 2007 10:03:03 +0200, Vivek Goyal wrote: > On Sat, Jul 28, 2007 at 04:43:43AM +0300, Maxim Levitsky wrote: ... > > gdb 'thinks' that all kernel symbols are below 0x80000000 , while they are at > > 0xC000.... > > > > Turning CONFIG_RELOCATABLE off fixes that, so I assume that is the reason for > > that. > > This is a gdb issue. I had raised it in gdb mailing list some time back. > > http://sourceware.org/ml/gdb/2006-08/msg00137.html There was the patch post: http://sources.redhat.com/ml/gdb/2006-08/msg00182.html > What version of gdb you are using? I know it got fixed for gdb shipped > with RHEL5. I am not sure about what upstream version of gdb it got fixed > in. It did not make it to the upstream as the patch above is an imperfect one. It is fixed in RH gdb-6.5-5 upwards, therefore Fedora 6 + RHEL-5. http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gdb/gdb-6.5-bz203661-emit-relocs.patch?root=core Regards, Jan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] i386 relocable kernel breakes /proc/kcore debugging 2007-07-30 8:41 ` Jan Kratochvil @ 2007-07-30 9:32 ` Maxim Levitsky 2007-07-30 14:23 ` Eric W. Biederman 1 sibling, 0 replies; 5+ messages in thread From: Maxim Levitsky @ 2007-07-30 9:32 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Vivek Goyal, linux-kernel, Eric W. Biederman On Monday 30 July 2007 11:41, Jan Kratochvil wrote: > On Mon, 30 Jul 2007 10:03:03 +0200, Vivek Goyal wrote: > > On Sat, Jul 28, 2007 at 04:43:43AM +0300, Maxim Levitsky wrote: > > ... > > > > gdb 'thinks' that all kernel symbols are below 0x80000000 , while they > > > are at 0xC000.... > > > > > > Turning CONFIG_RELOCATABLE off fixes that, so I assume that is the > > > reason for that. > > > > This is a gdb issue. I had raised it in gdb mailing list some time back. > > > > http://sourceware.org/ml/gdb/2006-08/msg00137.html > > There was the patch post: > http://sources.redhat.com/ml/gdb/2006-08/msg00182.html > > > What version of gdb you are using? I know it got fixed for gdb shipped > > with RHEL5. I am not sure about what upstream version of gdb it got fixed > > in. > > It did not make it to the upstream as the patch above is an imperfect one. > It is fixed in RH gdb-6.5-5 upwards, therefore Fedora 6 + RHEL-5. > http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gdb/gdb-6.5-bz203661 >-emit-relocs.patch?root=core > > > Regards, > Jan Hi, I am using mandriva 2007 and gdb that come with it ( 6.3 I think) I also compiled gdb 6.6, but the same issue persist. Thanks for the info, and I will try to apply the above patch and see if helps, Will it make into gdb? By the way, I had another issue with /proc/kcore. That enabling sparse memory model instead of flat causes /proc/kcore not to work at all. I traced that to a "FIXME" in sparcemem. /* XXX: FIXME -- wli */ #define kern_addr_valid(kaddr) (0) Kconfig should contatin a warning for those who select sparcemem that /proc/kcore will be disabled. or maybe this should be implemented (it is not easy since spacemem allows memory to be discontinous, and nobody wants to allow user to read reserved regions) Except the above, /proc/kcore works fine, and it is very usefull. Best regards, Maxim Levitsky Best regards, Maxim Levitsky ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] i386 relocable kernel breakes /proc/kcore debugging 2007-07-30 8:41 ` Jan Kratochvil 2007-07-30 9:32 ` Maxim Levitsky @ 2007-07-30 14:23 ` Eric W. Biederman 1 sibling, 0 replies; 5+ messages in thread From: Eric W. Biederman @ 2007-07-30 14:23 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Vivek Goyal, Maxim Levitsky, linux-kernel Jan Kratochvil <jan.kratochvil@redhat.com> writes: > On Mon, 30 Jul 2007 10:03:03 +0200, Vivek Goyal wrote: >> On Sat, Jul 28, 2007 at 04:43:43AM +0300, Maxim Levitsky wrote: > ... >> > gdb 'thinks' that all kernel symbols are below 0x80000000 , while they are > at >> > 0xC000.... >> > >> > Turning CONFIG_RELOCATABLE off fixes that, so I assume that is the reason > for >> > that. >> >> This is a gdb issue. I had raised it in gdb mailing list some time back. >> >> http://sourceware.org/ml/gdb/2006-08/msg00137.html > > There was the patch post: > http://sources.redhat.com/ml/gdb/2006-08/msg00182.html > >> What version of gdb you are using? I know it got fixed for gdb shipped >> with RHEL5. I am not sure about what upstream version of gdb it got fixed >> in. > > It did not make it to the upstream as the patch above is an imperfect one. > It is fixed in RH gdb-6.5-5 upwards, therefore Fedora 6 + RHEL-5. > http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gdb/gdb-6.5-bz203661-emit-relocs.patch?root=core Has anyone looked at the filtering by ignoring SHTSYM_TAB? The other approach suggested? The patch above only works for ET_EXEC because we can safely ignore everything. Eric ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-30 14:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200707280443.44048.maximlevitsky@gmail.com>
2007-07-28 1:58 ` [BUG] i386 relocable kernel breakes /proc/kcore debugging Eric W. Biederman
2007-07-30 8:03 ` Vivek Goyal
2007-07-30 8:41 ` Jan Kratochvil
2007-07-30 9:32 ` Maxim Levitsky
2007-07-30 14:23 ` Eric W. Biederman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox