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]
Date:   Tue, 27 Nov 2018 23:21:51 -0500
From:   Qian Cai <cai@....us>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kasan-dev@...glegroups.com,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Will Deacon <will.deacon@....com>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: kmemleak: Early log buffer exceeded (525980) during boot



On 11/10/18 11:59 AM, Catalin Marinas wrote:
> On Sat, Nov 10, 2018 at 10:08:10AM -0500, Qian Cai wrote:
>> On Nov 8, 2018, at 4:23 PM, Qian Cai <cai@....us> wrote:
>>> The maximum value for DEBUG_KMEMLEAK_EARLY_LOG_SIZE is only 40000, so it
>>> disables kmemleak every time on this aarch64 server running the latest mainline
>>> (b00d209).
>>>
>>> # echo scan > /sys/kernel/debug/kmemleak 
>>> -bash: echo: write error: Device or resource busy
>>>
>>> Any idea on how to enable kmemleak there?
>>
>> I have managed to hard-code DEBUG_KMEMLEAK_EARLY_LOG_SIZE to 600000,
> 
> That's quite a high number, I wouldn't have thought it is needed.
> Basically the early log buffer is only used until the slub allocator
> gets initialised and kmemleak_init() is called from start_kernel(). I
> don't know what allocates that much memory so early.
> 

It turned out that kmemleak does not play well with KASAN on those aarch64 (HPE
Apollo 70 and Huawei TaiShan 2280) servers.

After calling start_kernel()->setup_arch()->kasan_init(), kmemleak early log
buffer went from something like from 280 to 260000. The multitude of
kmemleak_alloc() calls is,

for_each_memblock(memory, reg) x \
while (pgdp++, addr = next, addr != end) x \
while (ptep++, addr = next, addr != end && \ pte_none(READ_ONCE(*ptep)))

Is this expected?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ