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

[msan] Re-exec with no ASLR if memory layout is incompatible on Linux #85142

Merged
merged 4 commits into from
Mar 15, 2024

Commits on Mar 14, 2024

  1. [msan] Re-exec with no ASLR if memory layout is incompatible on Linux

    This ports the change from TSan (llvm@0784b1e).
    
    A key difference is that TSan initializes the allocator prior to
    CheckAndProtect, while MSan initializes the allocator afterwards;
    this slightly simplifies the MSan patch. Nonetheless, we need to check
    that the allocator layout is compatible with ASLR. Since the information is
    not readily available in msan.h, we duplicate the information from
    msan_allocator.cpp, and create a new MappingDesc::ALLOCATOR type.
    
    Testing notes: run 'sudo sysctl vm.mmap_rnd_bits=32; ninja check-msan'
    before and after this patch.
    thurstond committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    0c878b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b714a62 View commit details
    Browse the repository at this point in the history
  3. Bug fix: if the memory layout is incompatible and we did not re-exec,…

    … we must
    
    still return false. (The second InitShadow call does not perform the
    same checks that the first InitShadow call did.)
    thurstond committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    9bda315 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. Configuration menu
    Copy the full SHA
    63d529f View commit details
    Browse the repository at this point in the history