Tracepoints expose stable kernel hooks with moderate overhead, raw tracepoints reduce abstraction for lower latency, and kprobes instrument kernel functions more flexibly but usually with more cost. For security monitoring, the right choice depends on whether a team needs broad coverage, lower overhead, or deeper function context. The performance trade-off should be made deliberately, not by default.
How the three tracing styles differ in practice
Tracepoints, raw tracepoints, and kprobes all let eBPF programs observe kernel activity, but they sit at different layers of the kernel interface. Tracepoints expose a stable, purpose-built event contract; raw tracepoints keep more of the kernel’s native structure and reduce wrapper overhead; kprobes attach to kernel functions and are more flexible when you need to instrument a specific code path rather than a predeclared event.
The practical difference is not just syntax. It affects how much context you receive, how stable the attachment point is across kernel versions, and how much performance cost you accept for the visibility you gain. That is why a monitoring design should start with the observation goal, not with the hook type.
NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here because kernel monitoring belongs under logging, auditability, and system integrity controls, even when the implementation is an eBPF program rather than a traditional agent.
What each hook type trades off for security monitoring
Tracepoints are usually the safest default when a team wants predictable semantics and low maintenance. Their stable event definitions make them easier to keep working across kernel updates, which matters for long-lived detection logic. The trade-off is that you are limited to the fields and events the kernel already exposes, so you may not get the exact internal state you would see by instrumenting a function directly.
Raw tracepoints reduce abstraction and can be a better fit when latency matters or when the overhead of formatting and translating data would be too expensive. They are useful for high-volume telemetry, but the lower-level interface means the program author must understand more of the kernel’s native calling structure and handle that detail carefully.
Kprobes are the most flexible option when a security team needs to inspect a specific function, especially if no tracepoint exists for the behavior of interest. That flexibility comes with more fragility and usually more overhead, because the probe is tied to implementation detail rather than a stable event contract. For deeper kernel-path analysis, MITRE ATT&CK Enterprise Matrix is a useful companion for mapping what you observe to adversary behavior and technique patterns.
How to choose the right one for a monitoring objective
For broad security monitoring, start with tracepoints if they cover the event you need. They are usually the best balance of stability, clarity, and operational cost. Move to raw tracepoints when the same event family is too expensive at scale or when you need a thinner path into the kernel data stream. Use kprobes when the security question is too specific for an existing tracepoint and you need function-level visibility to answer it.
The choice should also reflect how durable the detection must be. If the program will run across many kernel versions or hosts, tracepoints are easier to govern and less likely to break. If the use case is investigative and short-lived, kprobes may be acceptable because the extra fragility is less of a lifecycle burden. For organisations that want to anchor this choice in broader control language, NIST Cybersecurity Framework 2.0 provides the governance context for deciding how telemetry supports detect and respond outcomes.
Risk and Threat Considerations
Kernel observability can become its own risk if the monitoring path is too expensive, too brittle, or too narrowly scoped. A probe type that creates measurable overhead may distort the system you are trying to observe, while an attachment point that changes with kernel internals can silently reduce coverage after upgrades.
Failure mechanism: Overly intrusive probes increase latency, amplify noise, or fail after kernel changes, leaving defenders with incomplete or misleading telemetry.
Impact: Detection gaps can hide malicious activity, slow incident response, and create false confidence that the kernel path is still covered when it is not.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AU-2 — Audit Events | Kernel monitoring depends on selecting observable events worth collecting. |
| AU-6 — Audit Record Review, Analysis, and Reporting | eBPF telemetry is only useful when reviewed and analyzed for security signals. | |
| Recommendation — Define and collect the kernel events that support your detection objectives. Review kernel telemetry for suspicious patterns and escalation signals. | ||
| NIST CSF 2.0 | DE.CM-01 — Networks and network services are monitored to find potentially adverse events | eBPF monitoring is a continuous detection mechanism for system behavior. |
| DE.CM-08 — Vulnerabilities are monitored and addressed | Probe choice affects whether monitoring remains effective across kernel changes. | |
| Recommendation — Use kernel telemetry to monitor systems continuously for adverse events. Ensure monitoring remains effective as kernel and platform conditions change. | ||
| MITRE ATT&CK | T1014 — Rootkit | Kernel instrumentation and hidden activity are directly relevant to detecting stealthy kernel abuse. |
| Recommendation — Map suspicious kernel activity to ATT&CK techniques and hunt for stealth indicators. | ||
Practitioner Guidance
What to verify: Confirm the hook exposes the fields you actually need for detection before you optimise for latency. If the event lacks essential context, a faster hook is still the wrong choice.
Decision rule: Prefer tracepoints for durable production monitoring, raw tracepoints for high-volume low-latency collection, and kprobes only when the event you need is unavailable elsewhere or function context is the point of the exercise.
Common mistake: Teams often choose kprobes first because they feel the most powerful, then discover they have built a detector that is harder to maintain and more expensive to operate than the signal justifies.
Practitioner takeaway: The right hook is the one that gives enough fidelity for the security question without turning observability into a source of instability or hidden operational cost.
Related resources from NHI Mgmt Group
- What is the difference between kernel drivers and eBPF-based sensors for security monitoring?
- What is the difference between event monitoring and raw log review for cloud application security?
- What is the difference between access certification and continuous monitoring in ERP security?
- What is the difference between SaaS security and traditional IAM monitoring?