Hey guys! I think the TSS might be causing this, but I figured id ask here.
So in a program of mine I tried to call INT 80 in Ring3, no problem that works fine. However I push 3 values before the call, and then I notice after the interrupt begins running EIP, CS, Flags, User SS, and User SP are pushed onto the stack which is correct, however the stack like jumps up and the overwrites my values? Is this because on interrupts the CPU changes the stack if you are in Ring3?
Thanks
[Solved] Ring3 interrupts playing with stack
[Solved] Ring3 interrupts playing with stack
Last edited by PearOs on Sun Mar 09, 2014 4:48 am, edited 1 time in total.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Ring3 interrupts playing with stack
Ring 3 can not force the location of the kernel stack, hence SS:ESP is always taken from the TSS on privilege increases.
Re: Ring3 interrupts playing with stack
Yeah, its a much bigger problem. I'm on IRC working on it now.Combuster wrote:Ring 3 can not force the location of the kernel stack, hence SS:ESP is always taken from the TSS on privilege increases.
Thanks