* epc status cause all are reported zero?
@ 2002-11-20 10:46 atul srivastava
2002-11-20 11:23 ` Kevin D. Kissell
2002-11-20 12:35 ` Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: atul srivastava @ 2002-11-20 10:46 UTC (permalink / raw)
To: linux-mips
Hello all,
I have a wiered problem.
following is the Oops by kernel when it tries to exec the shell.
while loading /bin/sh it reads the elf_ex.e_entry as 0x4000b0 this
address is confirmed by
mip-linux-objdump -S bin/sh after mount -o loop on my host.
$mips-linux-objdump -S ./sh
./sh: file format elf32-bigmips
Disassembly of section .text:
00000000004000b0 <.text>:
4000b0: 3c1c0fc1 lui $gp,0xfc1
4000b4: 279c96e0 addiu $gp,$gp,-26912
4000b8: 0399e021 addu $gp,$gp,$t9
During exec there is a page fault of 4000b0 but immediately after
that i get another page fault 0f 0x0fc01788 and following register
dump after it
fails to get a fixup address.
Unable to handle kernel paging request at virtual address
0fc01788, epc == 00000Oops in fault.c:do_page_fault, line 230:
$0 : 00000000 00000000 00000000 00000000
$4 : 00007340 800f0474 00000000 801fa000
$8 : 00000000 00000000 00000000 4c696e75
$12: 78000000 00000000 00000000 00000000
$16: 00000000 00000000 00000000 00000000
$20: 00000000 00000000 00000000 00000000
$24: 00000000 00000000
$28: 6e652900 00000000 00000000 00000000
epc : 00000000
Status: 00000000
Cause : 00000000
Process sh (pid: 1, stackpage=801fa000)
i am confused how come the epc status and cause register all are
reported zero.
whether my regs ( pointer to struct pt_regs) is pointing somewhere
else..?
secondly Is this a problem with shell or kernel..? may be
somewhere the kernel is not checking the
validity of user space address and hence this problem..
to avoid any other posibilities i am running uncached.
any thought
Best Regards,
Atul
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: epc status cause all are reported zero?
2002-11-20 10:46 epc status cause all are reported zero? atul srivastava
@ 2002-11-20 11:23 ` Kevin D. Kissell
2002-11-20 11:23 ` Kevin D. Kissell
2002-11-20 12:35 ` Ralf Baechle
1 sibling, 1 reply; 4+ messages in thread
From: Kevin D. Kissell @ 2002-11-20 11:23 UTC (permalink / raw)
To: atul srivastava; +Cc: linux-mips
> During exec there is a page fault of 4000b0 but immediately after
> that i get another page fault 0f 0x0fc01788 and following register
> dump after it
> fails to get a fixup address.
>
> Unable to handle kernel paging request at virtual address
> 0fc01788, epc == 00000Oops in fault.c:do_page_fault, line 230:
> $0 : 00000000 00000000 00000000 00000000
> $4 : 00007340 800f0474 00000000 801fa000
> $8 : 00000000 00000000 00000000 4c696e75
> $12: 78000000 00000000 00000000 00000000
> $16: 00000000 00000000 00000000 00000000
> $20: 00000000 00000000 00000000 00000000
> $24: 00000000 00000000
> $28: 6e652900 00000000 00000000 00000000
> epc : 00000000
> Status: 00000000
> Cause : 00000000
> Process sh (pid: 1, stackpage=801fa000)
>
>
> i am confused how come the epc status and cause register all are
> reported zero.
> whether my regs ( pointer to struct pt_regs) is pointing somewhere
> else..?
When you see a register dump like that, it's a safe
bet that your regs pointer is trashed.
> secondly Is this a problem with shell or kernel..? may be
> somewhere the kernel is not checking the
> validity of user space address and hence this problem.
By definition, it would be a kernel problem even if
the shell *had* made a bogus reference. Worst
case, an error in user mode should cause a core
dump (of course, if it's init that dumps core, you
aren't likely to get to a system login).
You seem to be pretty new to this, so let me recommend
that you first read the FAQ and related information at
http://www.linux-mips.org/, and if you want further
help from the mailing list, please specify what CPU and
board/system you are targeting, which kernel sources you used,
and what tools you used to build it, all of which are pretty
important.
Kevin K.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: epc status cause all are reported zero?
2002-11-20 11:23 ` Kevin D. Kissell
@ 2002-11-20 11:23 ` Kevin D. Kissell
0 siblings, 0 replies; 4+ messages in thread
From: Kevin D. Kissell @ 2002-11-20 11:23 UTC (permalink / raw)
To: atul srivastava; +Cc: linux-mips
> During exec there is a page fault of 4000b0 but immediately after
> that i get another page fault 0f 0x0fc01788 and following register
> dump after it
> fails to get a fixup address.
>
> Unable to handle kernel paging request at virtual address
> 0fc01788, epc == 00000Oops in fault.c:do_page_fault, line 230:
> $0 : 00000000 00000000 00000000 00000000
> $4 : 00007340 800f0474 00000000 801fa000
> $8 : 00000000 00000000 00000000 4c696e75
> $12: 78000000 00000000 00000000 00000000
> $16: 00000000 00000000 00000000 00000000
> $20: 00000000 00000000 00000000 00000000
> $24: 00000000 00000000
> $28: 6e652900 00000000 00000000 00000000
> epc : 00000000
> Status: 00000000
> Cause : 00000000
> Process sh (pid: 1, stackpage=801fa000)
>
>
> i am confused how come the epc status and cause register all are
> reported zero.
> whether my regs ( pointer to struct pt_regs) is pointing somewhere
> else..?
When you see a register dump like that, it's a safe
bet that your regs pointer is trashed.
> secondly Is this a problem with shell or kernel..? may be
> somewhere the kernel is not checking the
> validity of user space address and hence this problem.
By definition, it would be a kernel problem even if
the shell *had* made a bogus reference. Worst
case, an error in user mode should cause a core
dump (of course, if it's init that dumps core, you
aren't likely to get to a system login).
You seem to be pretty new to this, so let me recommend
that you first read the FAQ and related information at
http://www.linux-mips.org/, and if you want further
help from the mailing list, please specify what CPU and
board/system you are targeting, which kernel sources you used,
and what tools you used to build it, all of which are pretty
important.
Kevin K.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: epc status cause all are reported zero?
2002-11-20 10:46 epc status cause all are reported zero? atul srivastava
2002-11-20 11:23 ` Kevin D. Kissell
@ 2002-11-20 12:35 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2002-11-20 12:35 UTC (permalink / raw)
To: atul srivastava; +Cc: linux-mips
On Wed, Nov 20, 2002 at 10:46:38AM -0000, atul srivastava wrote:
> During exec there is a page fault of 4000b0 but immediately after
> that i get another page fault 0f 0x0fc01788 and following register
> dump after it
> fails to get a fixup address.
>
> Unable to handle kernel paging request at virtual address
> 0fc01788, epc == 00000Oops in fault.c:do_page_fault, line 230:
> $0 : 00000000 00000000 00000000 00000000
> $4 : 00007340 800f0474 00000000 801fa000
> $8 : 00000000 00000000 00000000 4c696e75
> $12: 78000000 00000000 00000000 00000000
> $16: 00000000 00000000 00000000 00000000
> $20: 00000000 00000000 00000000 00000000
> $24: 00000000 00000000
> $28: 6e652900 00000000 00000000 00000000
> epc : 00000000
> Status: 00000000
> Cause : 00000000
> Process sh (pid: 1, stackpage=801fa000)
>
>
> i am confused how come the epc status and cause register all are
> reported zero.
> whether my regs ( pointer to struct pt_regs) is pointing somewhere
> else..?
Let me elaborate a bit beyond what Kevin already said. Normally a
sane register dump will contain an 8kB aligned KSEG0 address in $28;
$29 which is the stack pointer should be a little bit less than 8kB
bigger than $28. The status register should never become 0.
The value in $28 should be identical to the address printed by
for stackpage, 0x801fa000. They're not in your case so you may want
to start tracking there and find why they're not identical.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-20 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 10:46 epc status cause all are reported zero? atul srivastava
2002-11-20 11:23 ` Kevin D. Kissell
2002-11-20 11:23 ` Kevin D. Kissell
2002-11-20 12:35 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox