feat: implement synchronisation to protecting access to PTEs of SPTs during eviction

This commit is contained in:
Themis Demetriades
2024-12-05 16:51:15 +00:00
parent e779e8ac7c
commit d03e253046
6 changed files with 114 additions and 45 deletions

View File

@@ -440,8 +440,8 @@ syscall_mmap (int fd, void *addr)
off_t read_bytes = file_size - ofs < PGSIZE ? file_size - ofs : PGSIZE;
off_t zero_bytes = PGSIZE - read_bytes;
if (page_insert (file, ofs, addr + ofs, read_bytes, zero_bytes, true,
PAGE_FILE) == NULL)
if (page_insert_file (file, ofs, addr + ofs, read_bytes, zero_bytes, true,
PAGE_MMAP) == NULL)
return MMAP_FAILURE;
}
@@ -450,7 +450,6 @@ syscall_mmap (int fd, void *addr)
if (mmap == NULL)
return MMAP_FAILURE;
return mmap->mapping;
}