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] [day] [month] [year] [list]
Date:   Wed, 25 Dec 2019 08:53:12 -0500
From:   Qian Cai <cai@....pw>
To:     Miles Chen <miles.chen@...iatek.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-mediatek@...ts.infradead.org,
        wsd_upstream@...iatek.com
Subject: Re: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs



> On Dec 25, 2019, at 4:29 AM, Miles Chen <miles.chen@...iatek.com> wrote:
> 
> For example, we're implementing our iommu driver and there are many
> alloc_pages() in drivers/iommu.
> This approach helps us located some memory leakages in our
> implementation.

Not sure if you have code that can share but I can’t imagine there are many places that would have a single call site in the driver doing alloc_pages() over and over again. For example, there is only two alloc_pages() in intel-iommu.c with one is only in the cold path, so even if alloc_pgtable_page() one do leaking, it is still up to there air if your patch will catch it because it may not a single call site and it needs to leak significant amount of memory to be the greatest consumer where it is just not so realistic. For debugging point of view, IMO it is better to annotate this one alloc_pages() call when in doubt, so that kmemleak would catch it instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ