Welcome to the Linux Foundation Forum!

CONFIG_DEBUG_KMEMLEAK does not create /sys/kernel/debug/kmemleak

Posts: 1
edited February 2017 in Kernel Development

  1. As seen below, a newly compiled 4.4.48 kernel, with CONFIG_DEBUG_KMEMLEAK enabled, is not creating the kmemleak file in /sys/kernel/debug. (Note that kmemleak is not being explicitly disabled via the kernel command line options either; I've also tried adding 'kmemleak=on' to the kernel command-line just in case, but this didn't help...)

    [root@myVMslot12 ~]# uname -a
    Linux myVMslot12 4.4.48 #2 SMP Fri Feb 10 11:24:11 EST 2017 x86_64 x86_64 x86_64 GNU/Linux

    [root@myVMslot12 ~]# ls /sys/kernel/debug/kmemleak
    ls: cannot access /sys/kernel/debug/kmemleak: No such file or directory

    [root@myVMslot12 ~]# ls /sys/kernel/debug/
    acpi cleancache extfrag ixgbe pm_qos sched_features suspend_stats virtio-ports
    bdi dma_buf fault_around_bytes kprobes ras sleep_time tracing wakeup_sources
    boot_params dynamic_debug hid mce regmap sunrpc usb x86

    [root@myVMslot12 ~]# cat /proc/config.gz | gzip -d -c | grep KMEMLEAK
    CONFIG_HAVE_DEBUG_KMEMLEAK=y
    CONFIG_DEBUG_KMEMLEAK=y
    CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=400
    # CONFIG_DEBUG_KMEMLEAK_TEST is not set
    # CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set

    [root@myVMslot12 ~]# cat /proc/cmdline
    BOOT_IMAGE=/vmlinuz-4.4.48 root=UUID=b419f9ff-80ce-459e-855c-614d86a48105 ro rd.md=0 rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto console=ttyS0,115200n8 rd.luks=0 LANG=en_US.UTF-8 audit=1 libata.force=noncq erst_disable

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training