21 ms·
Depending on his interpretation of the rules about trapped instructions, one could just build a loop in the x86 page tables. Those are usually a tree linked by
by thyristan 1mo ago
Depending on his interpretation of the rules about trapped instructions, one could just build a loop in the x86 page tables. Those are usually a tree linked by pointers, and any page table lookup can create another page fault that creates another lookup that...
Leads to x86 page table MMU magic being turing complete: https://github.com/jbangert/trapcc https://github.com/jbangert/trapcc
And the simplest thing you can do on such a system is just to loop indefinitely, thus creating a simple instruction with a memory access (mov or anything, doesn't really matter, even the instruction fetch for a nop would work) to take infinite time.
- inigyou 1mo agoPage tables are physically addressed, so can't recurse. I assume this thing actually works by causing a page fault on the first instruction of the page fault handler, which is a new instruction.
- thyristan 1mo ago> Page tables are physically addressed Nope. Not on x86. You can use either physical or virtual addresses at your choosing. Consumer OSes use virtual ones, so you can swap out page tables (yes, really!). See https://wiki.osdev.org/X86_Paging https://wiki.osdev.org/X86_Paging "Page directory".
- inigyou 1mo agoNothing in this section mentions them containing virtual addresses. In fact the word "physical" is written in bold. Are you a hallucinating LLM?
- thyristan 1mo agoYou are right. Not an LLM problem, just an undecaffeinated meat brain and some faulty memories. I've misread 'When PS=0, the page table address field represents the physical address of the page table that manages the four megabytes at that point.' to mean that when PS=1, the address isn't physical. But PS is page size... And I somehow remembered that you could induce pagefaults when walking the page tables... Sorry.
- amluto 1mo agox86’s page tables’ accessed and dirty bits do something that one might be forgiven for calling “recursion”.