From: David Daney <ddaney@avtrex.com>
To: Chris Friesen <cfriesen@nortel.com>
Cc: Daniel Jacobowitz <dan@debian.org>,
linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: questions on struct sigcontext
Date: Wed, 12 Dec 2007 16:06:13 -0800 [thread overview]
Message-ID: <47607775.4020907@avtrex.com> (raw)
In-Reply-To: <47607327.5090709@nortel.com>
Chris Friesen wrote:
> Daniel Jacobowitz wrote:
>
>> There used to be slots for badvaddr and cause. You'll have to ask
>> Ralf why he decided to clobber them for DSP state, I don't remember
>> :-) I suspect they may never have held useful information for you;
>> we don't context switch them for userspace, so an intervening fault
>> in kernel space or in another thread could change them.
>
> I'm a bit confused as to how they would never have held useful
> information--did you mean the registers themselves, or the entries in
> struct sigcontext?
The entries in the sigcontext. As Ralf said, they never held valid values.
>
> If the cause/badvaddr entries in struct sigcontext were filled in by the
> exception handler in the kernel,
It would appear that they are not.
> wouldn't the values in that struct be
> completely valid even if the registers themselves were changed before
> userspace could handle the signal?
>
> If this is not the case then it seems like si_addr/si_code wouldn't be
> trustworthy either.
This I am not sure about :(, However knowing the values of all registers
(and perhaps /proc/self/maps) and $pc you can easily derive what happened.
David Daney
next prev parent reply other threads:[~2007-12-13 0:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 17:44 questions on struct sigcontext Chris Friesen
2007-12-12 18:12 ` David Daney
2007-12-12 18:34 ` Chris Friesen
2007-12-12 18:44 ` David Daney
2007-12-12 18:57 ` Ralf Baechle
2007-12-12 19:00 ` Daniel Jacobowitz
2007-12-12 19:04 ` Ralf Baechle
2007-12-12 23:47 ` Chris Friesen
2007-12-13 0:06 ` David Daney [this message]
2007-12-13 15:36 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47607775.4020907@avtrex.com \
--to=ddaney@avtrex.com \
--cc=cfriesen@nortel.com \
--cc=dan@debian.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox