Page 1 of 1
ring 0 to ring 3 without iret
Posted: Fri Dec 25, 2020 10:21 pm
by clementttttttttt
is there even a way?
Re: ring 0 to ring 3 without iret
Posted: Sat Dec 26, 2020 12:32 am
by iansjack
sysret.
Re: ring 0 to ring 3 without iret
Posted: Sat Dec 26, 2020 7:58 am
by nullplan
Why even try? IRET has worked satisfactorily for decades and is unlikely to be phased out anytime soon. SYSRET might be faster, though.
Re: ring 0 to ring 3 without iret
Posted: Sat Dec 26, 2020 9:46 am
by rdos
You can do it with hardware task switching, but then you must first load the register area of the TSS with the desired registers for ring 3. However, it has side effects since a new context is loaded, including a new TR and potentially CR3. When you return to kernel you will need to fixup the context by copying back the registers from ring 3 to the original TSS and then jmp back to it. I don't think this is a method that is practical for changing rings.