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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Sep 2018 15:51:17 +0000
From:   Christopher Lameter <>
To:     Dmitry Vyukov <>
cc:,,,, Dmitry Vyukov <>,,
Subject: Re: [PATCH] mm: don't warn about large allocations for slab

On Thu, 27 Sep 2018, Dmitry Vyukov wrote:

> From: Dmitry Vyukov <>
> This warning does not seem to be useful. Most of the time it fires when
> allocation size depends on syscall arguments. We could add __GFP_NOWARN
> to these allocation sites, but having a warning only to suppress it
> does not make lots of sense. Moreover, this warnings never fires for
> constant-size allocations and never for slub, because there are
> additional checks and fallback to kmalloc_large() for large allocations
> and kmalloc_large() does not warn. So the warning only fires for
> non-constant allocations and only with slab, which is odd to begin with.
> The warning leads to episodic unuseful syzbot reports. Remote it.


If its only for slab then KMALLOC_MAX_CACHE_SIZE and KMALLOC_MAX_SIZE are
the same value.

> While we are here also fix the check. We should check against
> worked because for slab the constants are the same, and slub always
> checks the size against KMALLOC_MAX_CACHE_SIZE before kmalloc_slab().
> But if we get there with size > KMALLOC_MAX_CACHE_SIZE anyhow
> bad things will happen.

Then the WARN_ON is correct just change the constant used. Ensure that
SLAB does the same checks as SLUB.

Powered by blists - more mailing lists