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

Fatal if Identity Mapped Region exceeds 1024M address #3

Open
candiedoperation opened this issue Jul 1, 2024 · 0 comments
Open

Fatal if Identity Mapped Region exceeds 1024M address #3

candiedoperation opened this issue Jul 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@candiedoperation
Copy link
Owner

Issue Description

In the current implementation, BootMem::PhysicalMemoryAllocateIDMappedBlock routine identity maps more memory if we run out of them for creating page tables. However, we never check if the next Identity Mapped Address exceeds 1024M and keep mapping more memory. This would become fatal as when were > 1024M we move to the next PDT which might not exist.

Troubleshooting

This is a known issue and was left out for a future implementation. See Line 174/175 in kernel/mem/bootmem.cpp.

Recommendations

  1. Use the BootMem::PhysicalMemoryMapToOffset(...) routine to map the memory instead as it automatically creates page tables if they do not exist.
@candiedoperation candiedoperation added the bug Something isn't working label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant