Skip to content

CWS: sync BTFHub constants - #54296

Closed
dd-octo-sts[bot] wants to merge 1 commit into
daniel.mercier/pprof-labelsfrom
cws/constants-sync-1785496669
Closed

CWS: sync BTFHub constants#54296
dd-octo-sts[bot] wants to merge 1 commit into
daniel.mercier/pprof-labelsfrom
cws/constants-sync-1785496669

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR syncs the BTFHub constants used by CWS
This PR was autogenerated

@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner July 31, 2026 11:17
@dd-octo-sts dd-octo-sts Bot added this to the Triage milestone Jul 31, 2026
@dd-octo-sts dd-octo-sts Bot added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation team/agent-security labels Jul 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca37528d32

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -83,6 +83,193 @@
"task_struct_pid_link_offset": 1880,
"task_struct_real_cred_offset": 2232,
"task_struct_signal_offset": 2328,
"task_struct_thread_offset": 3152,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include the ARM64 uw offset in BTFHub constants

For ARM64, AppendProbeRequestsToFetcher requests both task_struct_thread_offset and thread_struct_uw_offset, and the eBPF helper reads task + thread_offset + uw_offset to find the TLS thread pointer. This sync adds task_struct_thread_offset to every ARM64 constant set, but constants_arm64.json contains no thread_struct_uw_offset entries, so matching BTFHub kernels still get ErrorSentinel for the second half and CreateConstantEditors patches it as 0; Go label/TLSDESC reads will use the start of thread_struct instead of thread_struct.uw. Regenerate or add the ARM64 thread_struct_uw_offset values alongside these new task offsets.

AGENTS.md reference: AGENTS.md:L177-L178

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the long review PR is complex, plan time to review it label Jul 31, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Go Package Import Differences

Baseline: 4a581ee
Comparison: ca37528

binaryosarchchange
system-probelinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/security/resolvers/golabelsctx
system-probelinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/security/resolvers/golabelsctx

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 52.05% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ca37528 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Files inventory check summary

File checks results against ancestor 4a581ee5:

Results for datadog-agent_7.83.0~devel.git.413.ca37528.pipeline.128203325-1_amd64.deb:

No change detected

@danielmercier

Copy link
Copy Markdown
Contributor

Superseded — the sync commit has been cherry-picked directly onto daniel.mercier/pprof-labels (verified byte-identical to this PR's tree), so merging would only add a redundant commit. Closing rather than merging.

Note for future syncs: this run was dispatched with base_branch=daniel.mercier/pprof-labels to pick up the new task_struct_thread_offset / thread_struct_fsbase_offset requests. thread_struct_uw_offset (arm64) is still missing because the generate jobs run on x86_64 runners and probe_ebpf.go gates that request behind runtime.GOARCH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed long review PR is complex, plan time to review it qa/no-code-change No code change in Agent code requiring validation team/agent-security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant