diff --git a/litebox_shim_linux/src/syscalls/mm.rs b/litebox_shim_linux/src/syscalls/mm.rs index 03a12e502..02bb21f90 100644 --- a/litebox_shim_linux/src/syscalls/mm.rs +++ b/litebox_shim_linux/src/syscalls/mm.rs @@ -114,8 +114,7 @@ pub(crate) fn sys_mmap( return Err(Errno::EINVAL); } if flags.intersects( - MapFlags::MAP_SHARED - | MapFlags::MAP_32BIT + MapFlags::MAP_32BIT | MapFlags::MAP_GROWSDOWN | MapFlags::MAP_LOCKED | MapFlags::MAP_NONBLOCK @@ -128,6 +127,15 @@ pub(crate) fn sys_mmap( todo!("Unsupported flags {:?}", flags); } + if flags.contains(MapFlags::MAP_SHARED) { + #[cfg(debug_assertions)] + litebox::log_println!( + litebox_platform_multiplex::platform(), + "Warning: MAP_SHARED is not fully supported yet, changes are not reflected to the underlying file.", + ); + } + let flags = flags - MapFlags::MAP_SHARED; + let aligned_len = align_up(len, PAGE_SIZE); if aligned_len == 0 { return Err(Errno::ENOMEM);