Update SPT page entry to change type from EXECUTABLE to PAGE_FILE to capture mmaps in addition to executables
This commit is contained in:
@@ -444,7 +444,7 @@ syscall_mmap (int fd, void *addr)
|
||||
off_t zero_bytes = PGSIZE - read_bytes;
|
||||
|
||||
if (page_insert (file, ofs, addr + ofs, read_bytes, zero_bytes, true,
|
||||
PAGE_EXECUTABLE) == NULL)
|
||||
PAGE_FILE) == NULL)
|
||||
return MMAP_FAILURE;
|
||||
}
|
||||
|
||||
@@ -457,9 +457,11 @@ syscall_mmap (int fd, void *addr)
|
||||
return mmap->mapping;
|
||||
}
|
||||
|
||||
/* Handles the syscall for unmapping a memory mapped file. */
|
||||
/* Handles the syscall for unmapping a memory mapped file.
|
||||
|
||||
Pre: mapping is a valid mapping identifier returned by mmap syscall.*/
|
||||
static void
|
||||
syscall_munmap (mapid_t mapping UNUSED)
|
||||
syscall_munmap (mapid_t mapping)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user