{"repo":"tzussman/kmodleak","free":true,"listed":false,"github":"https://github.com/tzussman/kmodleak","clone":"git clone https://github.com/tzussman/kmodleak.git","description":"Track memory leaks for Linux kernel modules using eBPF","language":"C","stars":50,"topics":["ebpf","kernel-modules","linux","monitoring","observability","memory-leaks"],"license":"BSD-3-Clause","category":"analytics","readme_excerpt":"kmodleak kmodleak is an eBPF tool for tracing Linux kernel module memory leaks. For full functionality, it requires loading and unloading the target module while it is running. It does NOT load or unload modules itself. Once the module is unloaded, kmodleak will automatically terminate and display a summary of any detected memory leaks. Credits The infrastructure in this repo was taken from libbpf-bootstrap. kmodleak 's design is inspired by and based on memleak from BCC. kmodleak was also inspired by KEDR and is intended to serve as a lightweight replacement for its memory leak detector. Setup Install Dependencies You will need clang (at least v12 or later), libelf and zlib to build the examples, package names may vary across distros. On Ubuntu/Debian, you need: On CentOS/Fedora, you need: If your distribution does not offer a recent enough version of clang , see the automatic installation script at apt.llvm.org. Getting the source code Download the git repository and check out submodules: Building Makefile build: Usage kmodleak monitors kernel module memory allocations and detects leaks. The typical workflow is: 1. Start kmodleak - Run kmodleak with the module name you want to monitor 2. Load the module - In another terminal, load your kernel module with insmod 3. Use the module - Exercise your module's functionality 4. Unload the module - Remove the module with rmmod 5. View results - kmodleak automatically exits and shows any detected leaks Basic Example Terminal 1 - Star","default_branch":null,"files":null,"tree":[],"storefront":"/r/tzussman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tzussman/kmodleak/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}