1
0
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:
Adrien Bourmault 2021-03-04 10:06:39 +01:00
parent 904492298f
commit fe6299097f
Signed by: neox
GPG Key ID: 6EB408FE0ACEC664
2 changed files with 4 additions and 6 deletions

View File

@ -367,11 +367,9 @@ error_t CmdRing3Test(int argc, char **argv, char *cmdline)
KernLog("Entrypoint : %p, stack address : %p\n", entryPoint, stackAddr+size);
uchar *code = (uchar*)entryPoint;
extern void UserTest();
*code = 0x90; // nop
*(code+1) = 0xEB; // jmp
*(code+2) = 0xFD; // short 0x0
memmove(entryPoint, UserTest, KPAGESIZE);
KeJumpToUserspace(0, entryPoint, stackAddr+size);

View File

@ -29,7 +29,7 @@ global EndOfUser
UserTest:
mov rdi, 13
int 0x80
;int 0x80
.clone:
nop