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] [day] [month] [year] [list]
Message-ID: <CAK8P3a3TE2hu=gjyf5gVj3HufVacFSoc4WjOVpgP3bz0LBbGKQ@mail.gmail.com>
Date:   Fri, 21 Jun 2019 11:05:11 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>
Cc:     Vinod Koul <vkoul@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Joao Pinto <Joao.Pinto@...opsys.com>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dmaengine: dw-edma: fix unnecessary stack usage

On Fri, Jun 21, 2019 at 10:21 AM Gustavo Pimentel
<Gustavo.Pimentel@...opsys.com> wrote:

> On Mon, Jun 17, 2019 at 14:16:45, Arnd Bergmann <arnd@...db.de> wrote:
>
> > Putting large constant data on the stack causes unnecessary overhead
> > and stack usage:
> >
> > drivers/dma/dw-edma/dw-edma-v0-debugfs.c:285:6: error: stack frame size of 1376 bytes in function 'dw_edma_v0_debugfs_on' [-Werror,-Wframe-larger-than=]
>
> I had that warning at the beginning of the development, that's why I
> divided the debugfs entries into several subfunctions. Perhaps my
> configuration has configured a bigger stack frame size than your
> configuration.

I suspect the problem is CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE,
which is a farily new configuration option that has the unintended side-effect
of sometimes preventing the compiler combining local variables from functions
inlined into the caller. Adding 'noinline_for_stack' to the sub-functions would
have also prevented this, but I think just not having the strings on the
stack is better anyway.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ