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:   Wed, 23 Aug 2017 17:33:00 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Boqun Feng <boqun.feng@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Michel Lespinasse <walken@...gle.com>,
        Byungchul Park <byungchul.park@....com>,
        Andrew Morton <akpm@...ux-foundation.org>, willy@...radead.org,
        Nicholas Piggin <npiggin@...il.com>, kernel-team@....com
Subject: Re: [PATCH 0/2] completion: Reduce stack usage caused by COMPLETION_INITIALIZER_ONSTACK()

On Wed, Aug 23, 2017 at 5:25 PM, Boqun Feng <boqun.feng@...il.com> wrote:
> With LOCKDEP_CROSSRELEASE and LOCKDEP_COMPLETIONS introduced, the growth
> in kernel stack usage of several functions were reported:
>
>         https://marc.info/?l=linux-kernel&m=150270063231284&w=2
>
> The root cause of this is in COMPLETION_INITIALIZER_ONSTACK(), we use
>
>         ({init_completion(&work); work})
>
> , which will create a temporary object when returned. However this
> temporary object is unnecessary. And this patch fixes it by making the
> statement expression in COMPLETION_INITIALIZER_ONSTACK() return a
> pointer rather than a whole structure. This will reduce the stack usage
> even if !LOCKDEP.
>
> However, such a change does make one COMPLETION_INITIALIZER_ONSTACK()
> callsite invalid, so we fix this first via converting to
> init_completion().

Both patches

Acked-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ