Skip to main content

Crate kprobe

Crate kprobe 

Source
Expand description

A Rust library for dynamic kernel probing (kprobes and kretprobes). ! This library provides a safe and ergonomic interface for registering and managing kprobes and kretprobes in a kernel environment. ! It supports multiple architectures, including x86_64, riscv64, and loongarch64. ! # Features

  • Register and unregister kprobes and kretprobes.
  • Support for pre-handler and post-handler functions.
  • Safe management of probe points and handlers.
  • Architecture-specific implementations for handling breakpoints and single-stepping.

Modules§

retprobe
The retprobe implementation for the current architecture.

Structs§

Probe
The x86_64 implementation of Probe.
ProbeBasic
The basic information of a probe.
ProbeBuilder
The builder for creating a kprobe.
ProbeManager
A manager for kprobes.
PtRegs
The CPU register state for x86_64 architecture.
X86ProbePoint
The probe point for x86_64 architecture.

Enums§

UniProbe
An enum representing either a kprobe or a kretprobe.

Traits§

CallBackFunc
The callback function type for events.
KprobeAuxiliaryOps
The auxiliary operations required for kprobes.
ProbeData
The user data associated with a probe point.

Functions§

kprobe_handler_from_break
Run kprobe which has been registered on the address
kprobe_handler_from_debug
Run kprobe which has been registered on the address
register_kprobe
Register a kprobe.
register_kretprobe
Register a kretprobe.
register_uprobe
Register a uprobe.
unregister_kprobe
Unregister a kprobe.
unregister_kretprobe
Unregister a kretprobe.
unregister_uprobe
Unregister a uprobe.
uprobe_handler_from_break
Run uprobe which has been registered on the address
uprobe_handler_from_debug
Run uprobe which has been registered on the address

Type Aliases§

Kprobe
The kprobe structure for the current architecture.
Kretprobe
The kretprobe structure for the current architecture.
KretprobeBuilder
The kretprobe builder for the current architecture.
ProbeHandlerFunc
The type of the probe handler function.
ProbePoint
The probe point structure for the current architecture.
ProbePointList
A list of kprobe points.
Uprobe
The uprobe structure for the current architecture.
Uretprobe
The uretprobe structure for the current architecture.