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: <20190724145726.GP2868@twin.jikos.cz>
Date:   Wed, 24 Jul 2019 16:57:26 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>,
        Johannes Thumshirn <jthumshirn@...e.de>,
        Nikolay Borisov <nborisov@...e.com>,
        Andrea Gelmini <andrea.gelmini@...ma.net>,
        Qu Wenruo <wqu@...e.com>, Liu Bo <bo.liu@...ux.alibaba.com>,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: reduce stack usage for
 btrfsic_process_written_block

On Mon, Jul 08, 2019 at 02:40:09PM +0200, Arnd Bergmann wrote:
> btrfsic_process_written_block() cals btrfsic_process_metablock(),
> which has a fairly large stack usage due to the btrfsic_stack_frame
> variable. It also calls btrfsic_test_for_metadata(), which now
> needs several hundreds of bytes for its SHASH_DESC_ON_STACK().
> 
> In some configurations, we end up with both functions on the
> same stack, and gcc warns about the excessive stack usage that
> might cause the available stack space to run out:
> 
> fs/btrfs/check-integrity.c:1743:13: error: stack frame size of 1152 bytes in function 'btrfsic_process_written_block' [-Werror,-Wframe-larger-than=]
> 
> Marking both child functions as noinline_for_stack helps because
> this guarantees that the large variables are not on the same
> stack frame.
> 
> Fixes: d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Added to misc-next, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ