What’s I know is below
Kmemleak tool can be used for detecting kernel memory leaks.
In rel_32, related configs are already enabled.
#zgrep CONFIG_DEBUG_KMEMLEAK /proc/config.gz
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=8000
# CONFIG_DEBUG_KMEMLEAK_TEST is not set
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
CONFIG_DEBUG_KMEMLEAK_SCAN_ON=y
Only below change only need to be done for enabling the feature in defconfig “arch/arm64/configs/tegra_defconfig”
-CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
+# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
Doc with details on how to use kmemleak is Kernel Memory Leak Detector — The Linux Kernel documentation