linux-mips
[Top] [All Lists]

Re: questions on struct sigcontext

To: Daniel Jacobowitz <dan@debian.org>
Subject: Re: questions on struct sigcontext
From: "Chris Friesen" <cfriesen@nortel.com>
Date: Wed, 12 Dec 2007 17:47:51 -0600
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20071212190032.GA30506@caradoc.them.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <47601DEE.4090200@nortel.com> <20071212190032.GA30506@caradoc.them.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)
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?

If the cause/badvaddr entries in struct sigcontext were filled in by the exception handler in the kernel, 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.

Chris

<Prev in Thread] Current Thread [Next in Thread>