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]
Date:   Fri, 19 Jul 2019 16:21:27 +0000
From:   "Bowers, AndrewX" <andrewx.bowers@...el.com>
To:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
Subject: RE: [Intel-wired-lan] [PATCH] i40e: reduce stack usage in
 i40e_set_fc

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@...osl.org] On
> Behalf Of Arnd Bergmann
> Sent: Monday, July 15, 2019 5:35 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>; David S. Miller
> <davem@...emloft.net>
> Cc: Catherine Sullivan <catherine.sullivan@...el.com>; Dziggel, Douglas A
> <douglas.a.dziggel@...el.com>; Arnd Bergmann <arnd@...db.de>;
> netdev@...r.kernel.org; Patryk Małek <patryk.malek@...el.com>; linux-
> kernel@...r.kernel.org; Azarewicz, Piotr <piotr.azarewicz@...el.com>;
> Loktionov, Aleksandr <aleksandr.loktionov@...el.com>; clang-built-
> linux@...glegroups.com; intel-wired-lan@...ts.osuosl.org; Marczak, Piotr
> <piotr.marczak@...el.com>
> Subject: [Intel-wired-lan] [PATCH] i40e: reduce stack usage in i40e_set_fc
> 
> The functions i40e_aq_get_phy_abilities_resp() and i40e_set_fc() both have
> giant structure on the stack, which makes each one use stack frames larger
> than 500 bytes.
> 
> As clang decides one function into the other, we get a warning for exceeding
> the frame size limit on 32-bit architectures:
> 
> drivers/net/ethernet/intel/i40e/i40e_common.c:1654:23: error: stack frame
> size of 1116 bytes in function 'i40e_set_fc' [-Werror,-Wframe-larger-than=]
> 
> When building with gcc, the inlining does not happen, but i40e_set_fc() calls
> i40e_aq_get_phy_abilities_resp() anyway, so they add up on the kernel
> stack just as much.
> 
> The parts that actually use large stacks don't overlap, so make sure each one
> is a separate function, and mark them as noinline_for_stack to prevent the
> compilers from combining them again.
> 
> Fixes: 0a862b43acc6 ("i40e/i40evf: Add module_types and
> update_link_info")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c | 91 +++++++++++--------
>  1 file changed, 51 insertions(+), 40 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@...el.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ