Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !2858

i#2214 signal locks: avoid memquery when copying signal frame

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i2114-signal-frame-lock into master Mar 02, 2018
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 7

Eliminates the memory query loop in copy_frame_to_stack() which checks whether each part of the app stack is writable before copying over the signal frame. This loop grabs the global all_memory_areas lock and if that lookup misses it goes to a maps lookup. This has shown to cause noticeable contention. Instead we perform an overlap check for is_executable_area_writable followed by a TRY_EXCEPT safe write.

Adds a new test linux.bad-signal-stack which tests this by setting up an unwritable alternate stack. It also tests checking for SA_ONSTACK, and we fix #2017 (closed) here to make that work, which is needed for a good test. The existing security-common.decode-bad-stack hits the is_executable_area_writable() case.

Issue: #2214 Fixes #2017 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i2114-signal-frame-lock