Skip to content

Commit

Permalink
fix entry check for divide error handler
Browse files Browse the repository at this point in the history
Divide error exceptions don't have an error code, so the offset is
different.
  • Loading branch information
Freax13 committed Dec 25, 2024
1 parent 843b553 commit 1d64e3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tee/kernel/src/exception.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ extern "x86-interrupt" fn divide_error_handler(frame: InterruptStackFrame) {
naked_asm!(
"cld",
// Check whether the exception happened in userspace.
"test word ptr [rsp+16], 3",
"test word ptr [rsp+8], 3",
"je {kernel_divide_error_handler}",

// Userspace code path:
Expand Down

0 comments on commit 1d64e3f

Please sign in to comment.