-
Notifications
You must be signed in to change notification settings - Fork 28
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
ASLR support #725
base: main
Are you sure you want to change the base?
ASLR support #725
Conversation
This change was not tested on macOS ( The change looks artificially bigger than it is because of the x86_64 paging code being moved to a separate file. This is easy for me to undo.
|
80d7f57
to
28b8dcf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #725 +/- ##
==========================================
+ Coverage 70.26% 71.11% +0.85%
==========================================
Files 24 25 +1
Lines 2959 3123 +164
==========================================
+ Hits 2079 2221 +142
- Misses 880 902 +22 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent 15 minutes trying to give more context behind the macOS changes on x86_64 and aarch64 to help the review process - where I tried to change the least amount of things possible until the compiler stopped being mad at me (and as a way of double-checking the changes).
The goal is to have this changed merged directly into main
or in a feature branch, so that I can continue working on top of these foundations. Hope this helps.
(EDIT: I marked all of these comments as "resolved" to keep the PR log cleaner.)
3589fe8
to
08bfcfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes on the latest revision which does not fully work...
dc70cc4
to
258784a
Compare
Currently blocked as we need a release with hermit-os/kernel#1508 |
13a1799
to
74d0048
Compare
063fd95
to
78ada8f
Compare
Remaining tasks:
|
87e301f
to
0aeaae6
Compare
a25f971
to
e4a1090
Compare
- Kernel is loaded to a random physical address - Pagetables are created for the kernel region instead of just the first gigabyte Fixes hermit-os#719. Co-authored-by: Jonathan <github@jonathanklimt.de>
not 0
cargo fmt
-related changesWe currently rely on guest_address in MmapMemory to calculate the
offsets during the initialization of the VM and when converting
virtual addresses to physical addresses. The latter case is intended
to be temporary - we should read the value from the CR3 register at
a later point.
Although this current revision does work with relocatable binaries, it
is not making use of this functionality just yet.
Fixes #719.
Fixes #713.