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: <CACT4Y+bi5KkZ8igSeYVxjwtr8t0Vjz55gzWfAu_c8VMAqw0zPA@mail.gmail.com>
Date:   Tue, 23 Jul 2019 09:46:25 +0200
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Nicolas Boichat <drinkcat@...omium.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Kees Cook <keescook@...omium.org>,
        Petr Mladek <pmladek@...e.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        Sri Krishna chowdary <schowdary@...dia.com>,
        Uladzislau Rezki <urezki@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Changbin Du <changbin.du@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Catalin Marinas <catalin.marinas@....com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000

On Tue, Jul 23, 2019 at 9:26 AM Nicolas Boichat <drinkcat@...omium.org> wrote:
>
> When KASan is enabled, a lot of memory is allocated early on,
> and kmemleak complains (this is on a 4GB RAM system):
> kmemleak: Early log buffer exceeded (129846), please increase
>   DEBUG_KMEMLEAK_EARLY_LOG_SIZE
>
> Let's increase the upper limit to 1M entry. That would take up
> 160MB of RAM at init (each early_log entry is 160 bytes), but
> the memory would later be freed (early_log is __initdata).

Interesting. Is it on an arm64 system? On syzbot we use 16000 and it's
enough for a very beefy config:

https://github.com/google/syzkaller/blob/master/dashboard/config/upstream-leak.config

If it's freed later, I would increase the default as well. 400 never
worked for me and I've seen people being confused and wasn't able to
use kmemleak, e.g.:

https://groups.google.com/forum/#!searchin/syzkaller/CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE|sort:date/syzkaller/Rzf2ZRC9Qxw/tLog4DHXAgAJ

https://groups.google.com/forum/#!searchin/syzkaller/CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE|sort:date/syzkaller/5HxmTuQ7U4A/XM8s2o2CCAAJ



> Signed-off-by: Nicolas Boichat <drinkcat@...omium.org>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index f567875b87657de..1a197b8125768b9 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -595,7 +595,7 @@ config DEBUG_KMEMLEAK
>  config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
>         int "Maximum kmemleak early log entries"
>         depends on DEBUG_KMEMLEAK
> -       range 200 40000
> +       range 200 1000000
>         default 400
>         help
>           Kmemleak must track all the memory allocations to avoid
> --
> 2.22.0.657.g960e92d24f-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ