Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 313
    • Issues 313
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 33
    • Merge requests 33
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Merge requests
  • !446

Fix sandbox on AArch64, RISC-V

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Simon South requested to merge ssouth/tor:sandbox-aarch64-riscv-fixes into main Oct 01, 2021
  • Overview 10
  • Commits 7
  • Changes 3

Extend the sandbox implementation to support AArch64 (ARM64) and RISC-V machines. Allows the test_include.sh script and sandbox unit tests to complete without issue on these systems, fixing #24454 (closed) and another part of #40465 (closed).

Note these commits depend on and include jigsaw52's fix from merge request !433 (merged), which should be applied first.

These changes extend the sandbox to support architectures on which Linux provides its newer, more standardized, "generic" syscall interface, which omits a number of legacy calls and is generally less affected by issues related to backwards compatibility with 32-bit machines. These architectures also share a common implementation within glibc, making it easy for the sandbox to target all of them simultaneously.

For these architectures, which presently include AArch64 and 64-bit RISC-V, the changes

  • Allow negative syscall parameter values to be passed without modification (where 64-bit long integers are used), as syscall parameters on these systems are uniform in length;

  • Replace legacy syscalls with their standardized equivalents to match glibc; and

  • Update the code specific to accommodating fragile hardening to match differences in AddressSanitizer's implementation on these systems.

I expect these commits will need to be squashed down before merging but have left them separate for easier review.

I've tested this with make check on x86-64 (real), AArch64 (real) and RISC-V (virtual) machines and everything appears to work fine.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: sandbox-aarch64-riscv-fixes