[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190724.154534.1347804220870523293.davem@davemloft.net>
Date: Wed, 24 Jul 2019 15:45:34 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: arnd@...db.de
Cc: pshelar@....org, xiangxia.m.yue@...il.com, johannes.berg@...el.com,
kjlu@....edu, netdev@...r.kernel.org, dev@...nvswitch.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] ovs: datapath: hide clang frame-overflow warnings
From: Arnd Bergmann <arnd@...db.de>
Date: Mon, 22 Jul 2019 17:00:01 +0200
> Some functions in the datapath code are factored out so that each
> one has a stack frame smaller than 1024 bytes with gcc. However,
> when compiling with clang, the functions are inlined more aggressively
> and combined again so we get
>
> net/openvswitch/datapath.c:1124:12: error: stack frame size of 1528 bytes in function 'ovs_flow_cmd_set' [-Werror,-Wframe-larger-than=]
>
> Marking both get_flow_actions() and ovs_nla_init_match_and_action()
> as 'noinline_for_stack' gives us the same behavior that we see with
> gcc, and no warning. Note that this does not mean we actually use
> less stack, as the functions call each other, and we still get
> three copies of the large 'struct sw_flow_key' type on the stack.
>
> The comment tells us that this was previously considered safe,
> presumably since the netlink parsing functions are called with
> a known backchain that does not also use a lot of stack space.
>
> Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Applied, thanks Arnd.
Powered by blists - more mailing lists