You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The doc-comment of the function states Creates a segment descriptor for a long mode ring 3 data segment.
I have not made a pull request to change this as i'm unsure if Flags::LONG_MODE is deliberately not set. My knowledge of the intricacies of x86_64 is sorely lacking.
The text was updated successfully, but these errors were encountered:
Basically, in 64-bit mode, data segments are almost completely ignored. From the manual:
Segment-limit checking is not performed on any data segments in 64-bit mode, and both the segment-limit field and granularity (G) bit are ignored. The D/B bit is unused in 64-bit mode.
The expand-down (E), writable (W), and accessed (A) type-field attributes are ignored.
A data-segment-descriptor DPL field is ignored in 64-bit mode, and segment-privilege checks are not
performed on data segments. System software can use the page-protection mechanisms to isolate and
protect data from unauthorized access.
In practice, this means that a Data Segment (for either the user or the kernel) only needs to set Flags::USER_SEGMENT and Flags::PRESENT, and not set Flags::EXECUTABLE, every other flag is ignored.
We actually set Flags::WRITABLE and Flags::DPL_RING_3 unnecessarily which probably confuses things.
The doc-comment of the function states
Creates a segment descriptor for a long mode ring 3 data segment.
I have not made a pull request to change this as i'm unsure if Flags::LONG_MODE is deliberately not set. My knowledge of the intricacies of x86_64 is sorely lacking.
The text was updated successfully, but these errors were encountered: