mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
User code cannot trigger syscall!
This commit is contained in:
parent
904492298f
commit
fe6299097f
@ -366,12 +366,10 @@ error_t CmdRing3Test(int argc, char **argv, char *cmdline)
|
||||
}
|
||||
|
||||
KernLog("Entrypoint : %p, stack address : %p\n", entryPoint, stackAddr+size);
|
||||
|
||||
extern void UserTest();
|
||||
|
||||
uchar *code = (uchar*)entryPoint;
|
||||
|
||||
*code = 0x90; // nop
|
||||
*(code+1) = 0xEB; // jmp
|
||||
*(code+2) = 0xFD; // short 0x0
|
||||
memmove(entryPoint, UserTest, KPAGESIZE);
|
||||
|
||||
KeJumpToUserspace(0, entryPoint, stackAddr+size);
|
||||
|
||||
|
@ -29,7 +29,7 @@ global EndOfUser
|
||||
|
||||
UserTest:
|
||||
mov rdi, 13
|
||||
int 0x80
|
||||
;int 0x80
|
||||
|
||||
.clone:
|
||||
nop
|
||||
|
Loading…
Reference in New Issue
Block a user