mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
archctl: boundary check
This commit is contained in:
@@ -17,6 +17,11 @@ syscallret_t syscall_archctl(context_t *context, int func, void *arg) {
|
|||||||
.ret = 0
|
.ret = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!IS_USER_ADDRESS(arg)) {
|
||||||
|
ret.errno = EFAULT;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
switch (func) {
|
switch (func) {
|
||||||
case ARCH_CTL_SET_GSBASE:
|
case ARCH_CTL_SET_GSBASE:
|
||||||
// kernelgsbase because it will be switched out to user
|
// kernelgsbase because it will be switched out to user
|
||||||
|
|||||||
Reference in New Issue
Block a user