summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-03 22:53:00 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-03 22:53:00 +0100
commit43f2a52a6a00904f90a19fb178935cd16a7ced23 (patch)
treece6d348bee711f9ea6cfe156c7c157c85a264004 /i386
parented1ca4b8c1db9b6578eab3ff8807bb1a174aaccc (diff)
kernel traps: also catch general protection faults
If userland passes a kernel pointer, it's not a page fault that we get, but a general protection fault. We also want to go through the recovery in that case, to make e.g. copyin/out return an error.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/trap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index db4c7026..842a0e04 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -291,6 +291,9 @@ dump_ss(regs);
return;
}
+ /* Fall-through */
+ case T_GENERAL_PROTECTION:
+
/*
* If there is a failure recovery address
* for this fault, go there.