Skip to content

ebpf: dispatch only to interrupt-context runtimes - #766

Merged
lneto merged 1 commit into
masterfrom
claude_ebpf_irqonly
Sep 3, 2026
Merged

lneto merged 1 commit into
masterfrom
claude_ebpf_irqonly

Conversation

@lneto

@lneto lneto commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Split out of #762, on top of #765.

The kfunc looked the key up and ran whatever it found, so a process-context runtime registered under an eBPF program's key had its mutex taken from softirq on every packet; contended, by a stop closing the state while traffic flows, that schedules while atomic. The lookup now refuses the runtime, with a ratelimited log, and leaves the verdict to the program. With the percpu object (#762) the refusal keeps the kfunc off process-context instances; the object's release path, which the refusal's own put can trigger from softirq, drops the instances without taking their locks.

Test: a tests/xdp case runs a process-context runtime under the program's key and checks the kfunc refuses it; validated by disabling the check and watching the runtime get dispatched.

Tested on 6.8.0-136 (aarch64): xdp 7/7, clean dmesg.

🤖 Generated with Claude Code

@lneto
lneto force-pushed the claude_ebpf_irqonly branch from b63b7ca to 7bdb355 Compare September 3, 2026 12:46
@lneto
lneto force-pushed the claude_closeprivate branch 2 times, most recently from d12e0d2 to 86dbd16 Compare September 3, 2026 14:23
@lneto
lneto force-pushed the claude_ebpf_irqonly branch from 7bdb355 to 6baf3d9 Compare September 3, 2026 14:23
@lneto
lneto force-pushed the claude_closeprivate branch from 86dbd16 to e2c98e2 Compare September 3, 2026 18:49
@lneto
lneto force-pushed the claude_ebpf_irqonly branch 2 times, most recently from 117fe8c to 837de41 Compare September 3, 2026 22:52
@lneto
lneto force-pushed the claude_closeprivate branch from e2c98e2 to 067e9ae Compare September 3, 2026 22:52
@lneto
lneto force-pushed the claude_ebpf_irqonly branch from 837de41 to f8089b8 Compare September 3, 2026 23:01
@lneto
lneto force-pushed the claude_closeprivate branch from 067e9ae to eb4a49a Compare September 3, 2026 23:01
@lneto
lneto force-pushed the claude_ebpf_irqonly branch from f8089b8 to 0e37660 Compare September 3, 2026 23:08
@lneto
lneto changed the base branch from claude_closeprivate to master September 3, 2026 23:08
The kfunc looked the key up and ran whatever it found, so a
process-context runtime registered under an eBPF program's key had its
mutex taken from softirq on every packet; contended, by a stop closing
the state while traffic flows, that schedules while atomic. Refuse the
runtime in the lookup, with a ratelimited log, and leave the verdict to
the program.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lneto
lneto force-pushed the claude_ebpf_irqonly branch from ae4c1a3 to 38a25c3 Compare September 3, 2026 23:19
@lneto
lneto merged commit c3d8468 into master Sep 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant