feat: added remote munmap
This commit is contained in:
parent
cbd959f487
commit
1a4cd5ab3b
1 changed files with 19 additions and 0 deletions
|
@ -52,6 +52,25 @@ impl RemoteSyscall for RemoteMMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct RemoteMUnmap {
|
||||||
|
addr: usize,
|
||||||
|
len: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RemoteMUnmap {
|
||||||
|
pub fn args(addr: usize, len: usize) -> Self {
|
||||||
|
RemoteMUnmap { addr, len }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RemoteSyscall for RemoteMUnmap {
|
||||||
|
fn registers(&self, regs: &mut user_regs_struct) {
|
||||||
|
regs.rax = 11;
|
||||||
|
regs.rdi = self.addr as u64;
|
||||||
|
regs.rsi = self.len as u64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct RemoteOpen {
|
pub struct RemoteOpen {
|
||||||
filename: RemoteString,
|
filename: RemoteString,
|
||||||
flags: u64,
|
flags: u64,
|
||||||
|
|
Loading…
Reference in a new issue