From bb10e23f8b74f80d52fd87bee1cd718d14129142 Mon Sep 17 00:00:00 2001 From: Elliott Linder Date: Wed, 6 Mar 2024 16:23:14 +0100 Subject: [PATCH] feat: set `max_protection` for Open- & NetBSD --- src/os/netbsd.rs | 1 + src/os/openbsd.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/os/netbsd.rs b/src/os/netbsd.rs index 3f8e9a5..cd77473 100644 --- a/src/os/netbsd.rs +++ b/src/os/netbsd.rs @@ -46,6 +46,7 @@ impl Iterator for QueryIter { Some(Ok(Region { base: entry.kve_start as *const _, protection: Protection::from_native(entry.kve_protection as i32), + max_protection: Protection::from_native(entry.kve_max_protection as i32), shared: (entry.kve_flags & KVME_FLAG_COW as u32) == 0, size: (entry.kve_end - entry.kve_start) as _, ..Default::default() diff --git a/src/os/openbsd.rs b/src/os/openbsd.rs index d07ca3b..05f05e7 100644 --- a/src/os/openbsd.rs +++ b/src/os/openbsd.rs @@ -58,6 +58,7 @@ impl Iterator for QueryIter { let region = Region { base: self.vmentry.kve_start as *const _, protection: Protection::from_native(self.vmentry.kve_protection), + max_protection: Protection::from_native(self.vmentry.kve_max_protection), shared: (self.vmentry.kve_etype & KVE_ET_COPYONWRITE) == 0, size: (self.vmentry.kve_end - self.vmentry.kve_start) as _, ..Default::default()