-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
352: Add `UserMemory` type to exploit invariant of user process memory r=efenniht a=Medowhill 유저 프로세스 메모리를 관리하는 `UserMemory` 타입을 추가했습니다. `UserMemory`는 다음과 같은 invariant를 가집니다. (For brevity, `pt` := `page_table`, and we treat `pt` as a function from `va` to `pa`.) * `TRAMPOLINE` ∈ dom(`pt`) ∧ `pt(TRAMPOLINE)` = `trampoline`. * `TRAPFRAME` ∈ dom(`pt`) ∧ `pt(TRAPFRAM)E` = `trap_frame`. * If `va` ∈ dom(`pt`), `va` mod `PGSIZE` = 0 ∧ `pt(va)` mod `PGSIZE` = 0. * If `va` ∈ dom(`pt`) where `va` ∉ { `TRAMPOLINE`, `TRAPFRAME` }, then `Page::from_usize(pt(va))` succeeds without breaking the invariant of `Page`. * If `va` ∈ dom(`pt`) where `va` ∉ { 0, `TRAMPOLINE`, `TRAPFRAME` }, then `va - PGSIZE` ∈ dom(`pt`). * `pgroundup(size)` ∉ dom(`pt`). * If `size` > 0, then `pgroundup(size) - PGSIZE` ∈ dom(`pt`). * `Page::from_usize(trap_frame)` succeeds without breaking the invariant of `Page`. 이제 `PageTable`은 단순히 `VAddr`에서 `PAddr`로 가는 맵 자료 구조로 취급됩니다. Closes #338 Co-authored-by: Jaemin Hong <[email protected]>
- Loading branch information
Showing
13 changed files
with
519 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.