feat(kernel): implement generation-based capability revocation with proofs and tests

This commit is contained in:
2026-10-18 01:11:24 +02:00
parent 71518a93a4
commit 192631d506
7 changed files with 225 additions and 3 deletions

View File

@@ -13,4 +13,9 @@ impl Generation {
pub fn is_valid_against(&self, current: &Generation) -> bool {
self == current
}
#[cfg(kani)]
pub fn from_raw(value: u32) -> Self {
Self(value)
}
}

View File

@@ -6,4 +6,6 @@ pub mod generation;
pub mod id;
pub mod macros;
pub mod permission;
#[cfg(kani)]
pub mod proofs;
pub mod time;

View File

@@ -40,4 +40,9 @@ impl PermissionSet {
pub fn is_subset_of(&self, other: &PermissionSet) -> bool {
self.0 & other.0 == self.0
}
#[cfg(kani)]
pub fn from_bits(bits: u8) -> Self {
PermissionSet(bits)
}
}