On Sat Mar 2 03:49:53 2024 +0000, Jinoh Kang wrote:
- Ensure `session_mapping->size == session.shared.size` at all times,
since we rely on it in the `map_shared_session_section` loop.
- Note that we don't have to ensure `backing_file[st_size] ==
session_mapping->size`. It's normal for a section to only have a portion of the backing file. 2. Consistently use `mapping->size` as we've done in `create_session_mapping`.
if ((tmp = mmap( NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, unix_fd, 0 )) == MAP_FAILED) return -1; munmap( (void *)session.shared, session_mapping->size ); session.shared = tmp; session_mapping->size = size;
Done.