Page 1 of 1
Is there a way to check if the PML4 is valid?
Posted: Fri Mar 04, 2022 9:56 am
by 22OsC
Just out of curiosity, you can check if a Page Map Level 4 is valid and will not cause a triple fault if we write it to cr3? I know that I can check if it's NULL but it's not helping in some cases.
Re: Is there a way to check if the PML4 is valid?
Posted: Fri Mar 04, 2022 10:27 am
by iansjack
Just make sure it points to a valid page table.
Re: Is there a way to check if the PML4 is valid?
Posted: Fri Mar 04, 2022 12:03 pm
by 22OsC
iansjack wrote:Just make sure it points to a valid page table.
How can I do that?
Re: Is there a way to check if the PML4 is valid?
Posted: Fri Mar 04, 2022 1:03 pm
by iansjack
You know the structure of a page table. So just read it and check the validity of each entry.
If you are using qemu then the monitor can do this for you with the "info mem" command.
Re: Is there a way to check if the PML4 is valid?
Posted: Fri Mar 04, 2022 3:27 pm
by 22OsC
iansjack wrote:You know the structure of a page table. So just read it and check the validity of each entry.
If you are using qemu then the monitor can do this for you with the "info mem" command.
Oh, okay, I'll check that out.