Skip to content

Mutable references in page table implementation? #416

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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