diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-21 03:47:50 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-21 03:57:32 -0400 |
commit | 2231410363d1ff97f0b22556cc656ad5880db5cf (patch) | |
tree | b2655cac032117dce7db1bac551a008989392880 /sys | |
parent | ffe51b4d28f4de048b7be442f7fa8b3527b3e609 (diff) |
kernel/amd64: trap: Remove erroneous spl calls
The trap_handler() function is a very sensitive code path and thus
calling things like splraise(), splx(), etc is quite unsafe and also
somewhat not needed. This commit removes those calls from the
trap_handler() function.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/trap.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 37efad4..589774b 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -181,9 +181,6 @@ trap_syscall(struct trapframe *tf) void trap_handler(struct trapframe *tf) { - int ipl; - - ipl = splraise(IPL_HIGH); if (tf->trapno >= NELEM(trap_type)) { panic("got unknown trap %d\n", tf->trapno); } @@ -192,7 +189,6 @@ trap_handler(struct trapframe *tf) /* Handle traps from userland */ if (ISSET(tf->cs, 3)) { - splx(ipl); trap_user(tf); return; } |