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

ASLR: Lay down the foundations #725

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

ASLR: Lay down the foundations #725

wants to merge 12 commits into from

Commits on Nov 20, 2024

  1. Configuration menu
    Copy the full SHA
    cb5d05d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    279aa7e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44756d8 View commit details
    Browse the repository at this point in the history
  4. ASLR: Lay down the foundations

    - Move x86_64-related paging code to src/arch/x86_64/paging
    - Tests: x86_64-related paging tests should use a guest_address that is
      not 0
    - Tests: Move them in separate files, use appropriate 'use' directives
    - Tests: Use init_guest_mem wrapper in test_virt_to_phys
    - Fix kernel memory loading
    - Add guest_address getter in UhyveVm
    - Change names of constants to clarify their purpose
    - Use u64 for arch::RAM_START instead of GuestVirtAddr
    - Remove pagetable_l0 from virt_to_phys function
    - Various `cargo fmt`-related changes
    - aarch64: Blindly replace constant names and similar RAM_START change
    
    We 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, but this is too complex for the time being because of
    the different architectures.
    
    Although this current revision does work with relocatable binaries, it
    is not making use of this functionality _just_ yet.
    
    Fixes hermit-os#719.
    
    Co-authored-by: Jonathan <[email protected]>
    n0toose and jounathaen committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    fdb9f20 View commit details
    Browse the repository at this point in the history
  5. ASLR: Use OnceLock for storing guest_address

    This will be used by other functions for now, instead of
    relying on mem.guest_address.
    
    guest_address should only be a GuestPhysAddr internally for now,
    as other functions in places like src/linux/x86_64/kvm_cpu.rs
    use it.
    n0toose authored and jounathaen committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    14c75fd View commit details
    Browse the repository at this point in the history
  6. WIP ASLR work

    n0toose authored and jounathaen committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    c53a675 View commit details
    Browse the repository at this point in the history
  7. ASLR: Remove superfluous start_address entry

    Removes the start_address entry and uses the existing offset entry
    instead. Plus some `cargo fmt` changes
    n0toose authored and jounathaen committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    02ef3e7 View commit details
    Browse the repository at this point in the history
  8. ASLR: Mark some variables as unused

    n0toose authored and jounathaen committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    f05ea9a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c4cad7d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e9d410c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c9ab783 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d4eb1e1 View commit details
    Browse the repository at this point in the history