when a process is running, how to get its privilege?
I want to know now running code is ring0, ring1, ring2 or ring3.
read %cs bit0, bit1 is ok?
how to get privilege (x86)?
- 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: how to get privilege (x86)?
Read the manual on conforming and non-conforming segments, then for a 32-bit kernel, try SS instead. Then when you're done, get rid of the code because there's absolutely no need to have it.
Re: how to get privilege (x86)?
On some platform there is a simple API for applications:
/troll
Code: Select all
bool IsRing3(void) {
return true;
}