BPF is not one hook but a set of attachment points, and each one sees different traffic. This diagram maps XDP, TC, socket-level BPF LSM, and sched_ext so you can pick the layer that can actually enforce your rule.
BPF programs are only as capable as the point where the kernel runs them, so the attachment point decides what a program can observe, modify, or deny. This explainer lays out four layers in the order a packet and a system call meet them: XDP at ingress before the network stack, TC filters after the stack has parsed the packet, socket and BPF LSM hooks at connection and syscall time, and sched_ext at the CPU scheduling layer. It also marks the boundaries those choices create, such as why ordinary XDP and TC filters never see VSOCK traffic and why host-side enforcement has to happen at the socket hook instead.
FAQ
What do you give up by attaching deeper in the stack?
XDP gives the fastest ingress path but a narrow view, since it runs before the stack has parsed much. Deeper hooks such as BPF LSM and sched_ext see more context but inherit verifier constraints like bounds checks, harder debugging with dropwatch and perf tracing, and policy-lifetime questions. Choose the shallowest layer that can still see and enforce the thing you care about.
AI-DLC is an AI-driven development lifecycle that runs delivery through Inception, Design, and Construction, with specs, steering files, and hooks keeping agents aligned to agreed intent.
Apple Silicon's defining choice is one shared memory pool for CPU, GPU, and Neural Engine. This diagram maps that fabric, the on-package bandwidth it buys, and the scaling limits it imposes.
Antimicrobial resistance surveillance is a layered data architecture: raw reads and demand signals flow in, get normalized into governed tables, and answer plain-language queries. The diagram maps each boundary.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.