3d6e30119b
refactor: rename lru_lock to ftable_lock for greater clarity, and update comments to reflect this
Themis Demetriades2024-12-06 15:31:27 +00:00
4104d2c852
fix: always add to frame owners when installing existing shared page.
cyclane2024-12-06 15:23:41 +00:00
6da855fe47
Implement validation of pointers and strings in syscalls with pinning and unpinning to protect against eviction
vm/frame-pinning
sBubshait2024-12-05 21:12:31 +00:00
4dd6b6e928
fix: do not leak when inserting the same page twice, just update
cyclane2024-12-05 19:38:27 +00:00
19d5b02341
fix: remove use of USERPROG compiler flag specific code when the flag is disabled
Themis Demetriades2024-12-04 23:48:51 +00:00
0288e13206
fix: don't discriminate between user and kernel page fault contexts for stack growth, lazy loading, and swapping
Themis Demetriades2024-12-04 23:46:31 +00:00
60faf995ea
fix: lazy load executable files of user processes even when accessed in a kernel context
Themis Demetriades2024-12-04 22:21:31 +00:00
ecbb4e74a5
Implement the unmap system call, writing back to the file if a page is dirty before removing from SPT
sBubshait2024-12-04 19:07:28 +00:00
02b79d1934
Update mmap to add temporarily page_set_swap until swap is implemented
sBubshait2024-12-04 18:13:07 +00:00
857cae3578
Update mmap to add a get helper function to find a mmap entry from its mapping
sBubshait2024-12-04 18:08:05 +00:00
941e1e067a
Update SPT page entry to change type from EXECUTABLE to PAGE_FILE to capture mmaps in addition to executables
sBubshait2024-12-04 17:51:30 +00:00
ad6e4b4059
Implement syscall_mmap to validate and then map all file data into a user address in memory
sBubshait2024-12-04 17:42:53 +00:00
72fa0c1bbb
Fix Bug: Initialise the mmap table for the newly created thread rather than the current thread
sBubshait2024-12-04 17:41:14 +00:00
4bf6914cfa
feat: incorporate lazy-loading data & helpers into supplemental page table
Themis Demetriades2024-12-04 16:45:31 +00:00
fb73d694bf
fix: frame allocation now invalidates the victim process page directory, not the caller's
Themis Demetriades2024-12-04 16:41:13 +00:00
67f16cb2a6
Update syscall.c to allow mmap and unmap system calls through helper handler functions for each
sBubshait2024-12-04 15:31:53 +00:00
6b0f708d8f
Update mmap to add an insert helper function to allocate and add new mmap entries to the hash table
sBubshait2024-12-04 15:26:00 +00:00
6e838aa06a
Fix Bug in thread.c: Only initialise and destroy mmap files table if VM is defined
sBubshait2024-12-04 15:24:11 +00:00
a2f46f3b72
Add a mmap destroy function to cleanup all mmap hash table entries upon thread exit
sBubshait2024-12-04 15:14:02 +00:00
1ce09a49a1
Add helper functions to initialise the memory-mapped files table and counter
sBubshait2024-12-04 15:08:43 +00:00
1b73e415d7
fix: invalidate PTEs of evicted pages before eviction occurs to prevent modificationof pages mid-eviction
vm/page-swap
Themis Demetriades2024-12-04 15:02:49 +00:00
b3042b5aa6
Update thread structure to add mmap files table and a counter for mappings of the thread
sBubshait2024-12-04 14:56:52 +00:00
85aabd86cd
Update gitlab ci file to include mmap tests in the automated testing pipeline
sBubshait2024-12-04 14:55:28 +00:00
acc768e177
Add mmap module in vm defining mmap_entry structure and some helper functions
sBubshait2024-12-04 13:00:16 +00:00
c0ff53beff
feat: proper cleanup for shared pages
cyclane2024-12-04 12:27:39 +00:00
f2aba977b4
fix: extract supplemental and shared_files initialisation
cyclane2024-12-04 11:17:46 +00:00
10bfffc4b0
fix: clear shared pages to avoid freeing them
cyclane2024-12-04 11:03:35 +00:00
47a7dfae04
refactor: add comments describing each type of page fault dealt by the page fault handler
Themis Demetriades2024-12-03 21:47:59 +00:00
9a3c8a1c38
fix: grow stack upon page fault in kernel context to support syscall stack growth
EDiasAlberto2024-12-03 20:56:10 +00:00