Now that we have the signal trampolines in the gateway page and the
gateway page is considered kernel space, we can panic when we should only SIGSEGV. Hence, add the additional constraint that for page faults we also require running with kernel privileges. The gateway page is the only kernel code running with user privileges, iso this is a correct way to exclude the gateway page from kernel land. We do not currently exclude the gateway page for other faults as it is not always the right way to do it. Further tuning will happen on a case by case bases.
This commit is contained in:
parent
89e50d0e9a
commit
5e7019bf32
@ -696,7 +696,13 @@ trap(int vector, struct trapframe *framep)
|
||||
goto out;
|
||||
|
||||
no_fault_in:
|
||||
if (!user) {
|
||||
/*
|
||||
* Additionally check the privilege level. We don't want to
|
||||
* panic when we're in the gateway page, running at user
|
||||
* level.
|
||||
*/
|
||||
if (!user && (framep->tf_special.psr & IA64_PSR_CPL)
|
||||
== IA64_PSR_CPL_KERN) {
|
||||
/* Check for copyin/copyout fault. */
|
||||
if (td != NULL && td->td_pcb->pcb_onfault != 0) {
|
||||
framep->tf_special.iip =
|
||||
|
Loading…
Reference in New Issue
Block a user