kprobe vs kretprobe — Code Deep Dive

The Linux kernel provides several dynamic tracing mechanisms, among which kprobe and kretprobe are the most fundamental and widely used. Both allow injecting callbacks into kernel functions at runtime, but they serve different purposes and trigger at different points in execution.

kprobe: Can insert breakpoints at any probeable kernel address, providing two callback points — pre_handler (before instruction execution) and post_handler (after instruction execution).

kretprobe: Designed specifically for function-level tracing, providing entry_handler (function entry) and handler (function return) callbacks, with a built-in per-instance private data channel.

Read More

OpenClaw Agent Technical Deep Dive

This document outlines the architecture and implementation of a production-ready OpenClaw agent system deployed on edge hardware. Over a four-day sprint, a complete system was engineered, moving from concept to a stable, running instance. The project involved significant hardware and software integration, including a dual-model LLM strategy for cost and latency optimization, multimodal input via OpenAI Whisper, and asynchronous communication channels. This post-mortem serves as a technical deep-dive for engineers and architects working on similar agent-based systems.

Read More