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:
@@ -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() };
|
||||
|
||||
Reference in New Issue
Block a user