mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: services: don't remap memory on intra-process lends
This brings intra-process lending in-line with intra-process sending, where memory is not remapped the pointer is simply reused. We may change this at a later point in order to further enforce the concept of lent-memory-is-inaccessible, so do not rely in this behavior. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
d83b7de12d
commit
21a8ddd458
1 changed files with 4 additions and 0 deletions
|
|
@ -1147,6 +1147,10 @@ impl SystemServices {
|
|||
}
|
||||
|
||||
let current_pid = self.current_pid();
|
||||
// If it's within the same process, ignore the operation.
|
||||
if current_pid == dest_pid {
|
||||
return Ok(src_virt);
|
||||
}
|
||||
let src_mapping = self.get_process(current_pid)?.mapping;
|
||||
let dest_mapping = self.get_process(dest_pid)?.mapping;
|
||||
use crate::mem::MemoryManager;
|
||||
|
|
|
|||
Loading…
Reference in a new issue