Skip to content

Urgent Fix for DwarfDump Pathing and Action Version Upgrades#1623

Merged
lacraig2 merged 3 commits into
devfrom
dwarf-dump-hot-fix
Jun 9, 2026
Merged

Urgent Fix for DwarfDump Pathing and Action Version Upgrades#1623
lacraig2 merged 3 commits into
devfrom
dwarf-dump-hot-fix

Conversation

@AndrewQuijano

@AndrewQuijano AndrewQuijano commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct in this PR.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Currently, dwarfdump doesn't correctly generate the path if make changes the directory e.g., uses make -C src, it will create duplicate entries of subdirectories as shown here

        {
                    "name": "phs",
                    "cu_offset": 29106,
                    "scope": {
                        "lowpc": 202080,
                        "highpc": 202220
                    },
                    "decl_lno": 1885,
                    "decl_fn": "/mnt/c/Users/andre/OneDrive/Desktop/lava/target_injections/file/file-5.30/src/src/apprentice.c",
                    "loc_op": [
                        "DW_OP_fbreg",
                        -4768
                    ],
                    "type": 80935
                },

A quick fix is to add a function to check the assignment of fn and decl_fn, where the user provides the known root, e.g. /mnt/c/Users/andre/OneDrive/Desktop/lava/target_injections/file/file-5.30 and uses regex to cut any duplicates downstream for final assembly.

It performs sanity checks on the hard disk to confirm that the file exists before inserting it into the JSON. See the screenshot showing the corrected files:

image

GitHub Actions Updates

Also, I put some important CI/CD and bumped the actions because of this warning

https://github.com/panda-re/panda/actions/runs/26796731914

image

As for how I updated the labeler, I used Prowler and LAVA to confirm the labels were updated correctly

https://github.com/prowler-cloud/prowler/blob/master/.github/workflows/labeler.yml

https://github.com/prowler-cloud/prowler/blob/master/.github/labeler.yml

See the updated labeler work on LAVA

panda-re/lava#98

panda-re/lava#99
...

AARCH64 had a missing entry in kernel.conf

I used the following commands within a recording to fill out the entry

print("[-->] Injecting kernelinfo.ko into guest...")
panda.copy_to_guest("/mnt/c/Users/andre/OneDrive/Desktop/kernelinfo.ko", absolute_paths=True)

# 3. Execute the kernel module inside the guest
# Note: The double '/kernelinfo.ko/kernelinfo.ko' path is a quirk of how 
# copy_to_guest handled the transfer on this specific snapshot.
print("[-->] Executing kernel module (Operation Not Permitted error is expected!)...")
panda.run_serial_cmd("sudo insmod /mnt/c/Users/andre/OneDrive/Desktop/kernelinfo.ko/kernelinfo.ko", timeout=60)

# 4. Harvest the dynamic offsets from the kernel ring buffer
print("[-->] Harvesting kernel info profile from dmesg:")
dynamic_offsets = panda.run_serial_cmd("sudo dmesg | tail -n 70", timeout=60)
print(dynamic_offsets)

# =======================================================================
# PHASE 2: STATIC SYMBOLS (via kallsyms)
# =======================================================================
print("\n[+] PHASE 2: Hunting Static Kernel Symbols...")

# 5. Grab finish_task_switch (Required for task.switch_task_hook_addr)
# We use the '$' regex anchor to ensure we don't accidentally grab wrapper functions
print("[-->] Getting finish_task_switch...")
switch_hook = panda.run_serial_cmd("cat /proc/kallsyms | grep ' finish_task_switch$'", timeout=15)
print(switch_hook)

# 6. Grab init_task (Required for task.init_addr & task.current_task_addr)
print("\n[-->] Getting init_task...")
init_addr = panda.run_serial_cmd("cat /proc/kallsyms | grep ' init_task$'", timeout=15)
print(init_addr)

print("\n[+] PROFILE EXTRACTION COMPLETE!")
print("[!] Reminder: Convert the static hex addresses to decimal before pasting into kernel.conf.")

Test plan

I'm manually checking my JSON files from DwarfDump to confirm they return the expected file paths.

...

Closing issues
N/A

...

@github-actions github-actions Bot added the pypanda Pull requests that change PyPanda label Jun 1, 2026
@AndrewQuijano AndrewQuijano changed the title Urgent Fix for DwarfDump - Pathing Urgent Fix for DwarfDump Pathing Jun 1, 2026
@AndrewQuijano AndrewQuijano force-pushed the dwarf-dump-hot-fix branch 3 times, most recently from c5acc3e to 482bbfc Compare June 2, 2026 03:35
@github-actions github-actions Bot added the Github-files Pull requests that changes GitHub CI/CD label Jun 2, 2026
@AndrewQuijano AndrewQuijano changed the title Urgent Fix for DwarfDump Pathing Urgent Fix for DwarfDump Pathing and Action Version Upgrades Jun 2, 2026
@AndrewQuijano AndrewQuijano marked this pull request as ready for review June 2, 2026 03:44
@AndrewQuijano AndrewQuijano requested review from Copilot and lacraig2 June 2, 2026 03:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to (1) correct incorrect/duplicated source file paths emitted into DwarfDump-derived JSON by adding a root-aware path “de-stuttering” resolver, and (2) update CI/CD workflows (manual version bump input + action version upgrades, plus safer docs publishing).

Changes:

  • Add resolve_real_path() and plumb optional project_root through parse_dwarfdump() and CLI/env handling to repair duplicated path segments.
  • Upgrade multiple GitHub Actions used for Docker builds/tests and add a workflow_dispatch input to choose version bump type.
  • Avoid attempting to commit/push docs when there are no documentation changes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
panda/python/core/pandare/extras/dwarfdump.py Adds project-root-based path repair and integrates it into DWARF parsing / CLI usage.
.github/workflows/publish_docker.yml Adds manual dispatch input for bump type, upgrades actions, and skips doc push when no changes.
.github/workflows/parallel_tests.yml Upgrades Docker-related actions used in CI container builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread panda/python/core/pandare/extras/dwarfdump.py Outdated
Comment thread panda/python/core/pandare/extras/dwarfdump.py Outdated
Comment thread panda/python/core/pandare/extras/dwarfdump.py Outdated
Comment thread panda/python/core/pandare/extras/dwarfdump.py
Comment thread panda/python/core/pandare/extras/dwarfdump.py

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lintly has detected code quality issues in this pull request.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lintly has detected code quality issues in this pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread panda/python/core/pandare/extras/dwarfdump.py
Comment thread panda/python/core/pandare/extras/dwarfdump.py Outdated
Comment thread panda/python/core/pandare/extras/dwarfdump.py Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lintly has detected code quality issues in this pull request.

@AndrewQuijano AndrewQuijano dismissed github-actions[bot]’s stale review June 2, 2026 05:05

Alraedy passed linting issues flagged

@github-actions github-actions Bot added the osi_linux Pull requests that change the OSI Linux plugin label Jun 8, 2026
@AndrewQuijano AndrewQuijano force-pushed the dwarf-dump-hot-fix branch 3 times, most recently from 6ee2f04 to 0dfd2ed Compare June 9, 2026 00:04
@github-actions github-actions Bot removed the osi_linux Pull requests that change the OSI Linux plugin label Jun 9, 2026
@lacraig2 lacraig2 merged commit 3650211 into dev Jun 9, 2026
6 checks passed
@lacraig2 lacraig2 deleted the dwarf-dump-hot-fix branch June 9, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Github-files Pull requests that changes GitHub CI/CD pypanda Pull requests that change PyPanda

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants