Closed akirilov-arm closed 8 months ago
That's a very valid use case.
I've pushed a commit that aligns the protection constants to their UNIX counterparts (this was always the intention, but they had been accidentally unaligned) & maps Protection::to_native
directly to an integer (commit: https://github.com/darfink/region-rs/commit/03fd93c3ae23e197775576a4fe170d29f4e06ffc).
Will be part of release 3.0.1
Since version 5.10 Linux defines a couple of AArch64-specific access flags -
PROT_BTI
for pages guarded by the Branch Target Identification technology andPROT_MTE
for pages to which the Memory Tagging Extension applies. Currently (as of commit 5087445) there is no way to use these attributes with theProtection
struct even via theProtection::from_bits_unchecked()
method because the implementation ignores any unknown values right before the call tomprotect()
, for example.