[bootlin/training-materials updates] master: debugging: labs: add rmmod and note about multiple scan (6708a42a)
Clément Léger
clement.leger at bootlin.com
Mon Nov 28 10:52:55 CET 2022
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/6708a42a82161a5e93be875a70e614e41246c2a5
>---------------------------------------------------------------
commit 6708a42a82161a5e93be875a70e614e41246c2a5
Author: Clément Léger <clement.leger at bootlin.com>
Date: Mon Nov 28 10:52:55 2022 +0100
debugging: labs: add rmmod and note about multiple scan
Due to the nature of how kmemleak works, the scan command might not catch
leaks immediatly.
Signed-off-by: Clément Léger <clement.leger at bootlin.com>
>---------------------------------------------------------------
6708a42a82161a5e93be875a70e614e41246c2a5
labs/debugging-kernel-debugging/debugging-kernel-debugging.tex | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
index 1f9e42f8..9a743cf7 100644
--- a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
+++ b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
@@ -60,11 +60,14 @@ load the \code{kmemleak_test.ko} and trigger an immediate kmemleak scan using:
\begin{bashinput}
# cd /root/kmemleak
# insmod kmemleak_test.ko
+# rmmod kmemleak_test
# echo scan > /sys/kernel/debug/kmemleak
\end{bashinput}
-Soon after that, the kernel will report that some leaks have been identified.
-Display them and analyze them using:
+{\textbf Note: You might need to run the \code{scan} command several times
+before it detect leakage due to memory still cotnaining references to the the
+leaked pointer.} Soon after that, the kernel will report that some leaks have
+been identified. Display them and analyze them using:
\begin{bashinput}
# cat /sys/kernel/debug/kmemleak
More information about the training-materials-updates
mailing list