feat: added remote munmap

This commit is contained in:
əlemi 2023-03-28 22:29:56 +02:00
parent cbd959f487
commit 1a4cd5ab3b
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -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,