Skip to content

Mutable references in page table implementation? #416

Open
@phil-opp

Description

@phil-opp

The current API of RecursivePageTable, OffsetPageTable, and MappedPageTable encourages the creation of &mut PageTable references to the active page table hierarchy. This might be problematic because the page tables are also accessed by the hardware at the same time. The hardware might even modify the page table, e.g. set the accessed or dirty flags.

To avoid any semantic issues, it would be a good idea to also provide methods based on raw *mut PageTable pointers. We should also update the implementations to never create &mut references internally either. We might even want to use volatile operations...

See also phil-opp/blog_os#1202

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions