Skip to content

fix iouring CO-RE relocation - #741

Merged
YakirOren merged 1 commit into
mainfrom
fix/iouring-core-relocation
Apr 23, 2026
Merged

YakirOren merged 1 commit into
mainfrom
fix/iouring-core-relocation

Conversation

@YakirOren

@YakirOren YakirOren commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Refactor
    • Improved IO uring event data field reading mechanism for enhanced reliability.

@coderabbitai

coderabbitai Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d2043ae-e6c3-4715-9d7d-ef3f8c1c7698

📥 Commits

Reviewing files that changed from the base of the PR and between 55c207f and e5edac0.

📒 Files selected for processing (1)
  • pkg/ebpf/gadgets/iouring_new/program.bpf.c

📝 Walkthrough

Walkthrough

Updates an eBPF program's field-reading approach by replacing direct pointer dereferences with BPF_CORE_READ() macro calls when accessing opcode and flags from context during io_uring event handling.

Changes

Cohort / File(s) Summary
eBPF Core Read Refactoring
pkg/ebpf/gadgets/iouring_new/program.bpf.c
Added bpf_core_read.h header and replaced direct ctx field reads with BPF_CORE_READ() macro for opcode and flags fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 With whiskers twitching, I've made a small dance,
Replaced direct reads with a macro enhance!
BPF_CORE_READ now safely peeks through,
Where iouring fields await their debut. 🎩✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix iouring CO-RE relocation' directly addresses the main change: replacing direct field reads with BPF_CORE_READ() calls to fix CO-RE relocation handling in the iouring gadget.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/iouring-core-relocation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Yakir Oren <yakiroren@gmail.com>
@YakirOren
YakirOren force-pushed the fix/iouring-core-relocation branch from 4e9191c to e5edac0 Compare March 5, 2026 13:25
@matthyx

matthyx commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

ping @YakirOren

@matthyx matthyx added the release Create release label Apr 15, 2026
@YakirOren
YakirOren merged commit c4e492f into main Apr 23, 2026
47 of 48 checks passed
@matthyx
matthyx deleted the fix/iouring-core-relocation branch April 23, 2026 11:00
@matthyx matthyx moved this from WIP to To Archive in KS PRs tracking Apr 23, 2026
entlein pushed a commit to k8sstormcenter/node-agent that referenced this pull request Apr 26, 2026
Brings in 9 upstream commits: rule-manager hot-path perf (kubescape#794),
CEL constant folding + set membership optimizers (kubescape#789),
iouring CO-RE relocation fix for kernel 6.8+ (kubescape#741),
go-ntlmssp v0.1.1 bump (kubescape#790), and matthyx fork validation (kubescape#786).

Conflict resolution:
- go.mod replaces: kept our k8sstormcenter/{inspektor-gadget,storage}
  pin (the three-forks alignment from #28); dropped upstream's
  experimental matthyx/inspektor-gadget and matthyx/ebpf replaces
  (those are temporary upstream test forks for NAUT-1252 memory work,
  not relevant to our fork stack).
- go.sum: regenerated via go mod tidy.

Build clean. Unit suite: 92 packages pass; only TestRandomxFields
fails (stale tracers.tar — explicitly ignored per prior decision).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Create release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants