lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTi=wg=RgyEWzL9_fwUymhFDaccQCfw@mail.gmail.com>
Date:	Thu, 12 May 2011 14:16:32 +0300
From:	Daniel Baluta <daniel.baluta@...il.com>
To:	chenxi <chenxi05@...du.com>
Cc:	Maxin B John <maxin.john@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: 答复: problem with kmemleak

On Thu, May 12, 2011 at 12:59 PM, chenxi <chenxi05@...du.com> wrote:
> Thx, Maxin :)
> ok
> I did steps below:
> 1 make oldconfig
> 2 vim .config
>  ...
>  CONFIG_DEBUG_FS = y
>  CONFIG_DEBUG_KMEMLEAK = y
>  CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE = 1200
>  ...
> 3 make ; make modules ; and replace the kernel; reboot
> 4 mount -t debugfs debugfs /sys/kernel/debug
> 4 I wrote a module like this
>  #include <linux/init.h>
>  #include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/vmalloc.h>
>
> void myfunc(void)
> {
>        char *ptr;
>        ptr = vmalloc(512);
>        ptr = vmalloc(512);
>        ptr = vmalloc(512);
> }
>
> int hello_init(void)
> {
>        printk(KERN_ALERT "Hello World");
>        myfunc();
>        return 0;
> }
>
> static void hello_exit(void)
> {
>        printk(KERN_ALERT "Goodbye World");
> }
>
> module_init(hello_init);
> module_exit(hello_exit);
>
> MODULE_LICENSE("GPL v2");
>
> 5 clear the kmemleak
>  Echo clear > /sys/kernel/debug/kmemleak
> 6 insmod the module
>  Insmod xxx.ko

Can you please remove your module?
I think the memory is leaked at unload time.

thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ