Skip to content

Commit

Permalink
feat: set max_protection for Open- & NetBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
darfink committed Mar 6, 2024
1 parent 499eaea commit bb10e23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/os/netbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions src/os/openbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bb10e23

Please sign in to comment.