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
  • !2838

i#1309 win8+ threads: use NtCreateThreadEx for internal nudges

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i1309-win8-nudge into master Feb 19, 2018
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 5

Since NtCreateThread returns STATUS_ACCESS_DENIED on win8+, we implement a solution for internal nudges using NtCreateThreadEx. We already have support for varying who frees the stack in NUDGE_NUDGER_FREE_STACK, which we leverage here. The other complication is who frees the arg_buf for a remote process (since we can't easily put it on the stack): again, we already have NUDGE_FREE_ARG which we use here.

We also fix a bug in cleanup_and_terminate that results in a double-free of a nudge dstack: a simple 1-byte-bool error where our asm checks all 4 bytes. A similar asm bug found by inspection with sig_should_swap_stack() is also fixed.

This fixes internal nudges. Client threads and external nudges will be fixed separately.

Issue: #1309 (closed), #1432 (closed), #2835

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i1309-win8-nudge