Transition ring0->ring3->ring0
Posted: Sun Feb 21, 2010 12:02 pm
Ok, after 3 days of searching why my code didn´t worked for a transition ring0->ring3, I now have the problem with the transition ring3->ring0.
I have a segment for data which is cpu specific (like ID, scheduler code ptr, actual thread, and so on) and this segment can only be accessed from ring0 code, but if I come from ring3 code there isn´t anymore a selector in gs and I checked it, my code doesn´t change the selector in gs and as long as I stay in ring0 the selector isn´t changed.
So could it be that when you go into ring3 that every selector which points to a segment which is <ring3 gets the null selector? But when this is so, how can I solve this w/o letting ring3 code access this segment?
I have a segment for data which is cpu specific (like ID, scheduler code ptr, actual thread, and so on) and this segment can only be accessed from ring0 code, but if I come from ring3 code there isn´t anymore a selector in gs and I checked it, my code doesn´t change the selector in gs and as long as I stay in ring0 the selector isn´t changed.
So could it be that when you go into ring3 that every selector which points to a segment which is <ring3 gets the null selector? But when this is so, how can I solve this w/o letting ring3 code access this segment?