Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping with USER_ACCESSIBLE #113

Closed
haraldh opened this issue Jan 8, 2020 · 1 comment · Fixed by #114
Closed

Mapping with USER_ACCESSIBLE #113

haraldh opened this issue Jan 8, 2020 · 1 comment · Fixed by #114

Comments

@haraldh
Copy link
Contributor

haraldh commented Jan 8, 2020

Using the frame allocator to map pages with USER_ACCESSIBLE will create new p3 and p2 pages without USER_ACCESSIBLE.

I had to change

entry.set_frame(
frame.frame(),
PageTableFlags::PRESENT | PageTableFlags::WRITABLE,
);

to

                entry.set_frame(
                    frame.frame(),
                    PageTableFlags::PRESENT
                        | PageTableFlags::WRITABLE
                        | PageTableFlags::USER_ACCESSIBLE,
                );

Otherwise a ring3 cannot access the page.

Not sure, if the code traversing the p2 and p3 should also check for USER_ACCESSIBLE and correct that.

@phil-opp
Copy link
Member

phil-opp commented Jan 8, 2020

Thanks for reporting! We're already working on a solution to this in #112. Maybe you can help us find a good solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants