x86-64: enable smep and smap

This commit is contained in:
Matheus
2026-04-23 15:29:43 -03:00
parent b0542a165c
commit 71dd6d1125
9 changed files with 100 additions and 4 deletions
+3
View File
@@ -29,7 +29,10 @@ __attribute__((noreturn)) void syscall_sigreturn(context_t *context) {
__assert(ARCH_CONTEXT_ISUSER(&sigframe->context));
// XXX TODO FIXME there is a bug here that needs this temporarily.
arch_cpu_user_access_begin();
arch_extracontext_copy(&current_thread()->extracontext, &sigframe->extracontext);
arch_cpu_user_access_end();
ARCH_CONTEXT_THREADLOAD(current_thread(), context);
arch_context_switch(&sigframe->context);