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

i#4741: Split custom modtrack data by segment

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i4731-vdso-page2 into master Feb 18, 2021
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 9

Changes the drmodtrack_add_custom_data() and drmemtrace_custom_module_data() interfaces to call each load and free callback separately for each module segment, adding a new parameter with the segment index to the load callback.

This eliminates a superfluous vdso map when the vdso is split into two segments (#3900 (closed)), and properly handles a gap between segments with custom data.

Updates the documentation to indicate the compatibility break. Since this is isolated to rarely used extension libraries and drcachesim interfaces, we do not bump DR's own release major or minor numbers. Compatibility is maintained for drcachesim offline traces, so the offline trace and custom module versions are not changed.

Tested by running opcode_mix with -verbose 1. Before we mapped 8K twice and never used the 2nd:

  --------------------------------------------------
  11,  11, 0x00007fffec594000, 0x00007fffec595000, 0x00007fffec594680, 0000000000000000, v#1,8192,^?ELF^
  12,  12, 0x00007fffec595000, 0x00007fffec596000, 0x00007fffec594680, 0000000000001000, v#1,8192,^?ELF^
  [drmemtrace]: Using module 11 [vdso] stored 8192-byte contents @0x55d569b449ef
  [drmemtrace]: Using module 12 [vdso] stored 8192-byte contents @0x55d569b46a58
  Mapped vdso1+0x10 to 55d569b449ff; range 55d569b449ef size 2000
  Mapped vdso2+0x10 to 55d569b459ff; range 55d569b449ef size 2000
  --------------------------------------------------

After, we map 4K separately and use each:

  --------------------------------------------------
  11,  11, 0x00007ffc41350000, 0x00007ffc41351000, 0x00007ffc41350680, 0000000000000000, v#2,4096,^?ELF<...>
  12,  11, 0x00007ffc41351000, 0x00007ffc41352000, 0x00007ffc41350680, 0000000000001000, v#2,4096, ^A<...>
  [drmemtrace]: Using module 11 [vdso] stored 4096-byte contents @0x557fbaec09ef
  [drmemtrace]: Using module 12 [vdso] stored 4096-byte contents @0x557fbaec1a58
  Mapped vdso1+0x10 to 557fbaec09ff; range 557fbaec09ef size 1000
  Mapped vdso2+0x10 to 557fbaec1a68; range 557fbaec1a58 size 1000
  --------------------------------------------------

Fixes #4741 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i4731-vdso-page2