Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Page Flag & Kernel Mapping #145

Open
MarcoCicognani opened this issue Mar 28, 2021 · 3 comments
Open

Global Page Flag & Kernel Mapping #145

MarcoCicognani opened this issue Mar 28, 2021 · 3 comments

Comments

@MarcoCicognani
Copy link

Hi,
as I written in the title it would be a good idea to enable global pages and map the kernel using this flag.
Doing this any kernel mapping would be implicitly duplicated across all the address spaces.

Keep it up!
Waiting UEFI rework's release

@bjorn3
Copy link
Contributor

bjorn3 commented Mar 28, 2021

Not every kernel may want to do this. For example it could use kernel page table isolation as mitigation for Meltdown. In addition the kernel can map itself using this flag.

@MarcoCicognani
Copy link
Author

MarcoCicognani commented Mar 28, 2021

Sure! Then it could be a configurable feature like recursive or physical mapping

@phil-opp
Copy link
Member

We typically only provide functionality in the bootloader that is impossible or difficult to implement in the kernel itself. For example, it is not possible to set up a physical memory mapping without access to the page tables in the first place. Setting the global bit, on the other hand, can be done relatively easily from the kernel itself by iterating over the non-empty page table entries and setting the global bit for each.

So adding support for this in the bootloader would be purely a convenience feature. It might be worth it if enough people want it, but I'm not sure if the approach is still common enough today (given Meltdown and similar vulnerabilities).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants