[PATCH] [POWERPC] Rework EXC_LEVEL_EXCEPTION_PROLOG code

Kumar Gala galak at kernel.crashing.org
Fri May 2 02:33:34 EST 2008


On May 1, 2008, at 11:14 AM, Scott Wood wrote:

> On Thu, May 01, 2008 at 08:17:07AM -0500, Kumar Gala wrote:
>> On May 1, 2008, at 3:24 AM, Paul Mackerras wrote:
>>> The most common cases are (a) something that ultimately generates
>>> input on a tty (e.g. a character arriving on a serial port) and that
>>> input turns out to be a ^C or similar, or (b) something that signals
>>> I/O completion and the program doing the I/O has requested
>>> notification by a SIGIO.  But in general any driver code can send a
>>> signal to userspace if it wants.
>
> And, of course, SIGALRM and similar timer mechanisms.
>
>> ok.  Was just wondering how the async exception know that the signal
>> it wanted to send belonged to the particular process that is running.
>> But I guess there are cases that the signal is really intended for  
>> who
>> ever is currently running?
>
> No, it knows based on its own data structures who it's intended for --
> and sometimes that happens to be the currently running process.

Let me ask the question differently.  Are there cases that some event  
occurs in the system and a signal is delivered to the current process  
regardless of what that process is.  I'm guessing so, based on the tty  
example.

So for the specific case I'm looking at (kprobes & debug exceptions  
from kernel space), I think its reasonable to BUG_ON() if thread_info- 
 >flags changes such that TIF_SIGPENDING or TIF_NEED_RESCHED get set  
we aren't from user-space.

- k



More information about the Linuxppc-dev mailing list