(
&self,
addr: u64,
length: u64,
protection: libc::c_int,
)
| 472 | } |
| 473 | |
| 474 | fn mprotect( |
| 475 | &self, |
| 476 | addr: u64, |
| 477 | length: u64, |
| 478 | protection: libc::c_int, |
| 479 | ) -> result::Result<(), Error> { |
| 480 | // SAFETY: [`base`, `base` + `len`) is guest memory |
| 481 | self.operate_on_memory_range(addr, length, |base, len| unsafe { |
| 482 | libc::mprotect(base, len, protection) |
| 483 | }) |
| 484 | } |
| 485 | |
| 486 | fn set_vma_anon_name(&self, addr: u64, length: u64, name: u64) -> result::Result<(), Error> { |
| 487 | let name = (name != 0).then(|| CString::new(format!("pvmemcontrol-{name}")).unwrap()); |
no test coverage detected