flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
ouadji 01 Jun 2011, 10:51
the privilege of segment that i'm going to access (greater than or equal) |
|||
![]() |
|
BOTOKILLER 01 Jun 2011, 11:35
ouadji wrote:
so, if i have gdt table GDT: RECORD1 RECORD2 RECORD3 then if i want DS to point at RECORD2 i will have to put privl level of RECORD2 into ds??? |
|||
![]() |
|
edfed 01 Jun 2011, 12:58
privilege levels is a different part of segmentation, something you don't have to manage for the moment.
lets go for every PL=0 for the moment, the rings feature is really complex, it is a lot of security, and will not help you to code the gdt and the kernel. after, when you will have a kernel, you will have to play with rings to protect the kernel from applications. |
|||
![]() |
|
ouadji 01 Jun 2011, 13:05
I was wrong, sorry. ![]() It's not "the privilege of the descriptor that i'm going to access (DPL)", but the "current privilege level" (CPL) RPL <--- CPL (intel doc 3A/5.5) |
|||
![]() |
|
BOTOKILLER 01 Jun 2011, 13:23
ouadji wrote:
but what if i make far jump to segment with another DPL, and then trying to access data through segment register which contains old CPL. what will happen? |
|||
![]() |
|
edfed 01 Jun 2011, 13:38
CPL is from 0 to 3
0 is high level (say skylab zone) 3 is low level (say green hill zone) level means the power, permissions, etc... the more the level is, the more permission you have, and for this, you need a lower CPL. this is the first ambiguity in PL (RPL, CPL, IOPL) feature. after, if a code from high level calls a code from low level, error, because the caller is what set the CPU PL. if the CPU PL is high than target PL, error, because cpu protection is not activated for high levels. and RTFM please. |
|||
![]() |
|
ouadji 01 Jun 2011, 15:15
Quote:
PRIVILEGE LEVEL CHECKING WHEN ACCESSING DATA SEGMENTS The processor loads the segment selector into the segment register if the DPL is numerically greater than or equal to both the CPL and the RPL. Otherwise, a general-protection fault is generated and the segment register is not loaded. Interrupt 13—General Protection Exception (#GP)---> BSOD ![]() You should read the intel doc, really, all is Within. @edfed "... cpu protection is not activated for high levels" (???) Je ne comprends réellement pas ce que tu veux dire par là. Que ce soit en ring0 ou en ring3, le mode protégé est activé. désolé de pointer ce petit morceau de phrase. et CPU PL, kesako ? ... le niveau de privilège du processeur ? Ooups, le raccourci me semble fort risqué. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.