GDT contains a number of entries, Segment Descriptors. Usually each is 8 bytes long and marks the starting point, length, and access rights of the segment. It is stored in memory of course. The address is stored in a special 48-bit CPU register called Global Descriptor Table Register (GDTR). The lower 16 bits inform the size of the GDT while the upper 32 bits inform the location of the GDT in memory.
The GDT itself is a 64-bit long entries. These entries define whether the current segment that the processor is running is for Ring 0 or Ring 3. Ring levels are restrictions, Ring 0 is for system use while Ring 3 is for application use. Such protection exists to prevent applications from causing the kernel to crash and to tell the processor which instructions are valid.
–snipped–
No comments:
Post a Comment