We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RecursivePageTable::new
1 parent 3de642b commit ce296f3Copy full SHA for ce296f3
src/structures/paging/mapper/recursive_page_table.rs
@@ -47,6 +47,11 @@ impl<'a> RecursivePageTable<'a> {
47
/// - The page table must be active, i.e. the CR3 register must contain its physical address.
48
///
49
/// Otherwise `Err(())` is returned.
50
+ ///
51
+ /// ## Safety
52
53
+ /// Creating a recursive page table with recursive index 511 is unsound
54
+ /// because calculating the end ptr of the structure causes an overflow.
55
#[inline]
56
pub fn new(table: &'a mut PageTable) -> Result<Self, InvalidPageTable> {
57
let page = Page::containing_address(VirtAddr::new(table as *const _ as u64));
0 commit comments