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: <CALvZod7HXbR1hQ-cZ1=n8as7wBkNMC6T0TbRhpgXNTKviJxgCg@mail.gmail.com>
Date:   Thu, 19 Jul 2018 17:06:55 -0700
From:   Shakeel Butt <shakeelb@...gle.com>
To:     adobriyan@...il.com
Cc:     dhowells@...hat.com, Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] proc: fixup PDE allocation bloat

On Sun, Jun 17, 2018 at 2:57 PM Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> commit 24074a35c5c975c94cd9691ae962855333aac47f
> ("proc: Make inline name size calculation automatic")
> started to put PDE allocations into kmalloc-256 which is unnecessary as
> ~40 character names are very rare.
>
> Put allocation back into kmalloc-192 cache for 64-bit non-debug builds.
>
> Put BUILD_BUG_ON to know when PDE size is gotten out of control.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
>
>  fs/proc/inode.c    |    6 ++++--
>  fs/proc/internal.h |   17 +++++++----------
>  2 files changed, 11 insertions(+), 12 deletions(-)
>
> --- a/fs/proc/inode.c
> +++ b/fs/proc/inode.c
> @@ -105,8 +105,10 @@ void __init proc_init_kmemcache(void)
>                 kmem_cache_create("pde_opener", sizeof(struct pde_opener), 0,
>                                   SLAB_ACCOUNT|SLAB_PANIC, NULL);
>         proc_dir_entry_cache = kmem_cache_create_usercopy(
> -               "proc_dir_entry", SIZEOF_PDE_SLOT, 0, SLAB_PANIC,
> -               OFFSETOF_PDE_NAME, SIZEOF_PDE_INLINE_NAME, NULL);
> +               "proc_dir_entry", SIZEOF_PDE, 0, SLAB_PANIC,

Hi Alexey, can you comment if proc_dir_entry_cache should or shouldn't
have SLAB_ACCOUNT flag?

Shakeel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ