fix: add MAP_SHARED to map_mut_anywhere flags

validate_kfmap_flags in kernel proc scheme requires exactly one of
MAP_SHARED or MAP_PRIVATE. Without it, shared == private == false,
and the check fails with EINVAL. This was the root cause of the
fexec_impl crash at step 62 (first PT_LOAD segment mapping).
This commit is contained in:
Red Bear OS
2026-07-12 11:31:34 +03:00
parent f643e1b58b
commit 5ee906eee3
+1 -1
View File
@@ -740,7 +740,7 @@ impl<'a> MmapGuard<'a> {
size,
offset,
address: 0,
flags: PROT_READ | PROT_WRITE,
flags: PROT_READ | PROT_WRITE | MapFlags::MAP_SHARED,
},
)?;
let slice = unsafe { &mut *this.as_mut_ptr_slice() };