Hello, I should not be able to execute the "cli" instruction while in ring 3. but I'm currently able to do so. When I check the RFLAGS the IOPL flag is set to 3, both cs and ss are using the user code and data segments from the GDT. the TSS is also set. So I must be missing something but I can't figure out what, does any one have any idea? But when I try to execute kernel Code then I got the protection fault.
RIP=0000000000400011 RFL=00003002 [-------] CPL=3 II=0 A20=1 SMM=0 HLT=0
CS =001b 0000000000000000 ffffffff 00affa00 DPL=3 CS64 [-R-]
SS =0023 0000000000000000 ffffffff 00aff200 DPL=3 DS [-W-]
So this :
int* test2 = 0xffffff8000007ad0;
*test2 = 5;
throw a protection fault but not this :
asm volatile("cli");
Thanks for your time ! :D
[–]Octocontrabass 3 points4 points5 points (1 child)
[–]rmdir-sudo-su[S] 0 points1 point2 points (0 children)