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: <20170329104355.GG27994@dhcp22.suse.cz>
Date:   Wed, 29 Mar 2017 12:43:56 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Vaneet Narang <v.narang@...sung.com>
Cc:     Miroslav Benes <mbenes@...e.cz>,
        Maninder Singh <maninder1.s@...sung.com>,
        "jeyu@...hat.com" <jeyu@...hat.com>,
        "rusty@...tcorp.com.au" <rusty@...tcorp.com.au>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "chris@...is-wilson.co.uk" <chris@...is-wilson.co.uk>,
        "aryabinin@...tuozzo.com" <aryabinin@...tuozzo.com>,
        "joonas.lahtinen@...ux.intel.com" <joonas.lahtinen@...ux.intel.com>,
        "keescook@...omium.org" <keescook@...omium.org>,
        "pavel@....cz" <pavel@....cz>,
        "jinb.park7@...il.com" <jinb.park7@...il.com>,
        "anisse@...ier.eu" <anisse@...ier.eu>,
        "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
        "zijun_hu@....com" <zijun_hu@....com>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "mawilcox@...rosoft.com" <mawilcox@...rosoft.com>,
        "thgarnie@...gle.com" <thgarnie@...gle.com>,
        "joelaf@...gle.com" <joelaf@...gle.com>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        PANKAJ MISHRA <pankaj.m@...sung.com>,
        Ajeet Kumar Yadav <ajeet.y@...sung.com>,
        이학봉 <hakbong5.lee@...sung.com>,
        AMIT SAHRAWAT <a.sahrawat@...sung.com>,
        랄릿 <lalit.mohan@...sung.com>,
        CPGS <cpgs@...sung.com>
Subject: Re: [PATCH v2] module: check if memory leak by module.

On Wed 29-03-17 09:23:32, Vaneet Narang wrote:
> Hi,
> 
> >> Hmm, how can you track _all_ vmalloc allocations done on behalf of the
> >> module? It is quite some time since I've checked kernel/module.c but
> >> from my vague understading your check is basically only about statically
> >> vmalloced areas by module loader. Is that correct? If yes then is this
> >> actually useful? Were there any bugs in the loader code recently? What
> >> led you to prepare this patch? All this should be part of the changelog!
> 
> First of all there is no issue in kernel/module.c. This patch add functionality
> to detect scenario where some kernel module does some memory allocation but gets
> unloaded without doing vfree. For example
> static int kernel_init(void)
> {
>         char * ptr = vmalloc(400 * 1024);
>         return 0;
> }

How can you track that allocation back to the module? Does this patch
actually works at all? Also why would be vmalloc more important than
kmalloc allocations?
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ