[parisc-linux] 2.5 randomly kills applications with page faults
Fri, 20 Dec 2002 23:03:33 -0600
> I'm worried about sr7 getting modified without the user stack pointer
> getting saved to the proper place. It might not be a problem at all. I
> just don't know all the uses of user/kernel stacks in the interrupt
> code paths. I'm wondering if the entire code sequence I quoted needs
> to block interrupts while setting up the syscall.
I don't think that's a problem.
An interruption can occur anywhere, and thus it saves all registers. The only
problem is that on parisc there aren't separate irq stacks, so the
interruption expects to be able to use the current kernel stack (whatever it
is). As long as the kernel stack is always correctly set up when %sr7 points
to kernel space, we should be fine. If we take an interruption before zeroing
sr7, we go through the procedure to obtain a kernel stack for an executing
user process (however, in this case, the interruption will stash the registers
in the task structure, so we can't modify the task structure until we've
changed sr7 to kernel space). Also note, we can't use the kernel stack until
sr7 is in kernel space.