arch_ctl fsbase

This commit is contained in:
Matheus
2022-08-19 22:53:08 -03:00
parent f04d4b5a31
commit 9e3f0b5c3f
+4 -1
View File
@@ -3,7 +3,7 @@
#include <errno.h>
#define ARCH_CTL_GSBASE 0
#define ARCH_CTL_FSBASE 1
syscallret syscall_arch_ctl(int func, void* arg){
@@ -16,6 +16,9 @@ syscallret syscall_arch_ctl(int func, void* arg){
case ARCH_CTL_GSBASE:
wrmsr(MSR_KERNELGSBASE, (uint64_t)arg);
break;
case ARCH_CTL_FSBASE:
wrmsr(MSR_FSBASE, (uint64_t)arg);
break;
default:
retv.errno = EINVAL;