From 43f2a52a6a00904f90a19fb178935cd16a7ced23 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 3 Mar 2024 22:53:00 +0100 Subject: 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. --- i386/i386/trap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'i386') 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. -- cgit v1.2.3