What happen when a kernel try to cause a segmentation error? Does this access generate an interrupt? What happen if the kernel has turned the interrupt off? Does that mean GDT is not in use when the interrupt is off?
Sorry if the answer seem too obvious or demonstrate substantial misunderstanding towards how GDT work. It would be greatly appreciated if you could give some resources on what GPT is trying to protect against and what happen when there is an invalid access to memory according to GPT.
Resources needed to GDT fault handeling
-
- Posts: 1
- Joined: Thu Aug 20, 2020 9:21 pm
- Libera.chat IRC: Andrew
Re: Resources needed to GDT fault handeling
An exception (typically, #GP, see the CPU documentation). It is a kind of hardware interrupt originating not from an external device, but from the CPU itself.andrewshi98 wrote:What happen when a kernel try to cause a segmentation error? Does this access generate an interrupt?
You still get the exception.andrewshi98 wrote:What happen if the kernel has turned the interrupt off?
The GDT is pretty much always in use because the various segment protection checks stay in place even when there are no outside interrupts.andrewshi98 wrote:Does that mean GDT is not in use when the interrupt is off?
Check out the official intel or AMD documentation on the CPU. It's been documented since the i80386 (Intel 80386 Programmer's Reference Manual 1986). You may actually want to start with that old document because it's shorter than the current one.andrewshi98 wrote:Sorry if the answer seem too obvious or demonstrate substantial misunderstanding towards how GDT work. It would be greatly appreciated if you could give some resources on what GPT is trying to protect against and what happen when there is an invalid access to memory according to GPT.