flat assembler
Message board for the users of flat assembler.

Index > Main > A question about privilege levels

Author
Thread Post new topic Reply to topic
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 19 Nov 2008, 22:43
If you set up a GDT with its mandatory null entry followed by a 64-bit code descriptor, and then do for example a

jmp 8:longmode_code

am I right in thinking the selector 8 above defines PL=0 i.e. Ring 0, but if you did

jmp 0Bh:longmode_code

the same code would be executed but this time with PL=3 i.e. in Ring 3 ???

Is that how privilege level control is done ???

_________________
FAMOS - the first memory operating system
Post 19 Nov 2008, 22:43
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 20 Nov 2008, 18:16
neville,

Read CPU manuals (CPL, RPL, DPL & conforming code segments). It's not that simple.
Post 20 Nov 2008, 18:16
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.