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

i#5505 kernel trace: Add a new module kcore_copy to dump kcore

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged qidongzhao requested to merge i5505-kimage into master Oct 24, 2022
  • Overview 65
  • Commits 8
  • Pipelines 0
  • Changes 10

Adds a new module kcore_copy, and updates drpt2ir and drpt2trace.

(1) Adds a new module kcore_copy to dump kcore's code segments. This module can read '/proc/modules' and '/proc/kallsyms' to get all module's information. Then it bases on the module's information to locate all code segments in '/proc/kcore', and dump all bytes and metadata of code segments to a ELF format file.

(2) Updates drpt2trace to support two working modes: ELF Mode and SIDEBAND Mode. Adds a new option "-mode" to drpt2trace to let the user choose the working mode of drpt2trace. In the current implementation, drpt2trace supports two modes to convert:

  • ELF (-mode ELF): the user provides an ELF file that contains all the instruction bytes. So, for example, we can use this mode to convert the kernel trace and the short-term user trace, where it's likely that we'll not have an image switch.

  • SIDEBAND (-mode SIDEBAND): the user must provide sideband data and parameters. In this mode, the converter uses sideband decoders to simulate image switches during the conversion. For example, we can use this mode to convert the traces where the instruction bytes are located in multiple images.

(3) Updates the test to check if dr$sim's kernel PT output is correct.

Issue: #5505

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i5505-kimage