rust-osdev / rust-osdev/x86_64
`next` branch - "entry should be mapped at this point" when calling `map_to` on offset page table
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 940
- Forks
- 157
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 3
Description
I am using the next branch because I am using the PAT_4KIB_PAGE flag. Today I encountered a panic:
[0] ERROR panicked at /home/rajas/.cargo/git/checkouts/x86_64-380b825b01a45fff/c845be9/src/structures/paging/mapper/mapped_page_table.rs:877:51:
entry should be mapped at this point
I'm not sure if there is something wrong with my code, but I don't think there is since this is a freshly zeroed L4 page table.
This happens when I call map_to. The full code is at https://github.com/ChocolateLoverRaj/rust-os-tutorial/blob/e0fb8f4e767acf8711e4ef22d56af939bd3cdfd2/kernel/src/syscall_handlers/spawn_process.rs#L142 (run cargo r -- --nographic to reproduce).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at kernel/src/syscall_handlers/spawn_process.rs around line 142 and run cargo r -- --nographic to reproduce the map_to panic with PAT_4KIB_PAGE. Then inspect the mapped page table code at the reported panic location and the surrounding paging behavior. Done means the reported scenario no longer panics, or the cause is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100