From a6e9a1c3ca513928686d05e8eaf89ba15071fb0f Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Wed, 1 Apr 2026 17:13:05 +0100 Subject: [PATCH 1/2] Fix value of El23Attributes::XN. --- CHANGELOG.md | 6 ++++++ src/descriptor.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da6f5d2..2258b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Bugfixes + +- Fixed value of `El23Attributes::XN`. + ## 0.12.0 ### Breaking changes diff --git a/src/descriptor.rs b/src/descriptor.rs index 6a7506b..7947102 100644 --- a/src/descriptor.rs +++ b/src/descriptor.rs @@ -231,7 +231,7 @@ bitflags! { const GP = 1 << 50; const DBM = 1 << 51; /// Execute-never. - const XN = 1 << 53; + const XN = 1 << 54; // Software flags in block and page descriptor entries. const SWFLAG_0 = 1 << 55; From 15489e482a875b33150aa0db668c9d3f3a929a46 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Wed, 1 Apr 2026 17:14:56 +0100 Subject: [PATCH 2/2] Add more attribute bits. --- CHANGELOG.md | 5 +++++ src/descriptor.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2258b9c..4267e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ - Fixed value of `El23Attributes::XN`. +### Improvements + +- Added `NT` and `CONTIGUOUS_OR_PROTECTED` bits to `El1Attributes` and `El23Attributes`. +- Added `El23Attributes::USER_RES1`. + ## 0.12.0 ### Breaking changes diff --git a/src/descriptor.rs b/src/descriptor.rs index 7947102..8dc3954 100644 --- a/src/descriptor.rs +++ b/src/descriptor.rs @@ -152,9 +152,11 @@ bitflags! { const READ_ONLY = 1 << 7; const ACCESSED = 1 << 10; const NON_GLOBAL = 1 << 11; + const NT = 1 << 16; /// Guarded Page - indirect forward edge jumps expect an appropriate BTI landing pad. const GP = 1 << 50; const DBM = 1 << 51; + const CONTIGUOUS_OR_PROTECTED = 1 << 52; /// Privileged Execute-never. const PXN = 1 << 53; /// Unprivileged Execute-never. @@ -224,12 +226,15 @@ bitflags! { const INNER_SHAREABLE = 3 << 8; const NS = 1 << 5; + const USER_RES1 = 1 << 6; const READ_ONLY = 1 << 7; const ACCESSED = 1 << 10; const NON_GLOBAL = 1 << 11; + const NT = 1 << 16; /// Guarded Page - indirect forward edge jumps expect an appropriate BTI landing pad. const GP = 1 << 50; const DBM = 1 << 51; + const CONTIGUOUS_OR_PROTECTED = 1 << 52; /// Execute-never. const XN = 1 << 54;