public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify'
@ 2023-06-05 10:59 kernel test robot
  2023-06-05 12:11 ` Vlad Buslov
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-06-05 10:59 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: llvm, oe-kbuild-all, Greg Kroah-Hartman, Jiri Pirko, Sasha Levin

Hi Vlad,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
head:   cf0b1e5482eaeb4db15c9e703267483dba88b575
commit: 5f2e54391893c67b709a64b280417ca0318adb73 [3300/8640] net/sched: flower: fix parsing of ethertype following VLAN header
config: mips-randconfig-r013-20230605 (https://download.01.org/0day-ci/archive/20230605/202306051816.mO3hqt7d-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mipsel-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5f2e54391893c67b709a64b280417ca0318adb73
        git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
        git fetch --no-tags stable linux-5.4.y
        git checkout 5f2e54391893c67b709a64b280417ca0318adb73
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/sched/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306051816.mO3hqt7d-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' [-Wframe-larger-than]
   static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
              ^
   1 warning generated.


vim +/fl_classify +296 net/sched/cls_flower.c

e0ace68af2acfe Paul Blakey            2019-07-09  295  
77b9900ef53ae0 Jiri Pirko             2015-05-12 @296  static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
77b9900ef53ae0 Jiri Pirko             2015-05-12  297  		       struct tcf_result *res)
77b9900ef53ae0 Jiri Pirko             2015-05-12  298  {
77b9900ef53ae0 Jiri Pirko             2015-05-12  299  	struct cls_fl_head *head = rcu_dereference_bh(tp->root);
77b9900ef53ae0 Jiri Pirko             2015-05-12  300  	struct fl_flow_key skb_mkey;
e0ace68af2acfe Paul Blakey            2019-07-09  301  	struct fl_flow_key skb_key;
e0ace68af2acfe Paul Blakey            2019-07-09  302  	struct fl_flow_mask *mask;
e0ace68af2acfe Paul Blakey            2019-07-09  303  	struct cls_fl_filter *f;
77b9900ef53ae0 Jiri Pirko             2015-05-12  304  
05cd271fd61a0b Paul Blakey            2018-04-30  305  	list_for_each_entry_rcu(mask, &head->masks, list) {
50acd32ea7f682 Jason Baron            2020-02-17  306  		flow_dissector_init_keys(&skb_key.control, &skb_key.basic);
05cd271fd61a0b Paul Blakey            2018-04-30  307  		fl_clear_masked_range(&skb_key, mask);
bc3103f1ed405d Amir Vadai             2016-09-08  308  
8212ed777f40c7 Jiri Pirko             2019-06-19  309  		skb_flow_dissect_meta(skb, &mask->dissector, &skb_key);
05cd271fd61a0b Paul Blakey            2018-04-30  310  		/* skb_flow_dissect() does not set n_proto in case an unknown
05cd271fd61a0b Paul Blakey            2018-04-30  311  		 * protocol, so do it rather here.
77b9900ef53ae0 Jiri Pirko             2015-05-12  312  		 */
9b7fd81cf9b6ca Toke Høiland-Jørgensen 2020-07-03  313  		skb_key.basic.n_proto = skb_protocol(skb, false);
05cd271fd61a0b Paul Blakey            2018-04-30  314  		skb_flow_dissect_tunnel_info(skb, &mask->dissector, &skb_key);
e0ace68af2acfe Paul Blakey            2019-07-09  315  		skb_flow_dissect_ct(skb, &mask->dissector, &skb_key,
e0ace68af2acfe Paul Blakey            2019-07-09  316  				    fl_ct_info_to_flower_map,
e0ace68af2acfe Paul Blakey            2019-07-09  317  				    ARRAY_SIZE(fl_ct_info_to_flower_map));
05cd271fd61a0b Paul Blakey            2018-04-30  318  		skb_flow_dissect(skb, &mask->dissector, &skb_key, 0);
77b9900ef53ae0 Jiri Pirko             2015-05-12  319  
05cd271fd61a0b Paul Blakey            2018-04-30  320  		fl_set_masked_key(&skb_mkey, &skb_key, mask);
77b9900ef53ae0 Jiri Pirko             2015-05-12  321  
5c72299fba9df4 Amritha Nambiar        2018-11-12  322  		f = fl_lookup(mask, &skb_mkey, &skb_key);
e8eb36cd8ca93f Amir Vadai             2016-06-13  323  		if (f && !tc_skip_sw(f->flags)) {
77b9900ef53ae0 Jiri Pirko             2015-05-12  324  			*res = f->res;
77b9900ef53ae0 Jiri Pirko             2015-05-12  325  			return tcf_exts_exec(skb, &f->exts, res);
77b9900ef53ae0 Jiri Pirko             2015-05-12  326  		}
05cd271fd61a0b Paul Blakey            2018-04-30  327  	}
77b9900ef53ae0 Jiri Pirko             2015-05-12  328  	return -1;
77b9900ef53ae0 Jiri Pirko             2015-05-12  329  }
77b9900ef53ae0 Jiri Pirko             2015-05-12  330  

:::::: The code at line 296 was first introduced by commit
:::::: 77b9900ef53ae047e36a37d13a2aa33bb2d60641 tc: introduce Flower classifier

:::::: TO: Jiri Pirko <jiri@resnulli.us>
:::::: CC: David S. Miller <davem@davemloft.net>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify'
  2023-06-05 10:59 [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' kernel test robot
@ 2023-06-05 12:11 ` Vlad Buslov
  2023-06-05 15:32   ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Vlad Buslov @ 2023-06-05 12:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Pirko, Sasha Levin; +Cc: llvm, oe-kbuild-all

On Mon 05 Jun 2023 at 18:59, kernel test robot <lkp@intel.com> wrote:
> Hi Vlad,
>
> First bad commit (maybe != root cause):
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
> head:   cf0b1e5482eaeb4db15c9e703267483dba88b575
> commit: 5f2e54391893c67b709a64b280417ca0318adb73 [3300/8640] net/sched: flower: fix parsing of ethertype following VLAN header
> config: mips-randconfig-r013-20230605 (https://download.01.org/0day-ci/archive/20230605/202306051816.mO3hqt7d-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
> reproduce (this is a W=1 build):
>         mkdir -p ~/bin
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install mips cross compiling tool for clang build
>         # apt-get install binutils-mipsel-linux-gnu
>         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5f2e54391893c67b709a64b280417ca0318adb73
>         git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
>         git fetch --no-tags stable linux-5.4.y
>         git checkout 5f2e54391893c67b709a64b280417ca0318adb73
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/sched/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202306051816.mO3hqt7d-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' [-Wframe-larger-than]
>    static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
>               ^
>    1 warning generated.
>
>
> vim +/fl_classify +296 net/sched/cls_flower.c
>
> e0ace68af2acfe Paul Blakey            2019-07-09  295  
> 77b9900ef53ae0 Jiri Pirko             2015-05-12 @296  static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  297  		       struct tcf_result *res)
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  298  {
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  299  	struct cls_fl_head *head = rcu_dereference_bh(tp->root);
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  300  	struct fl_flow_key skb_mkey;

The stack usage of fl_classify() has already been addressed in later
kernels by commit 0af413bd3e2d ("flow_dissector: work around stack frame
size warning") which moved mkey into fl_mask_lookup(). Not sure what
else can be done since my commit just adds a new flow dissector fields
that are needed to correctly parse packets with multiple VLAN headers.

> e0ace68af2acfe Paul Blakey            2019-07-09  301  	struct fl_flow_key skb_key;
> e0ace68af2acfe Paul Blakey            2019-07-09  302  	struct fl_flow_mask *mask;
> e0ace68af2acfe Paul Blakey            2019-07-09  303  	struct cls_fl_filter *f;
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  304  
> 05cd271fd61a0b Paul Blakey            2018-04-30  305  	list_for_each_entry_rcu(mask, &head->masks, list) {
> 50acd32ea7f682 Jason Baron            2020-02-17  306  		flow_dissector_init_keys(&skb_key.control, &skb_key.basic);
> 05cd271fd61a0b Paul Blakey            2018-04-30  307  		fl_clear_masked_range(&skb_key, mask);
> bc3103f1ed405d Amir Vadai             2016-09-08  308  
> 8212ed777f40c7 Jiri Pirko             2019-06-19  309  		skb_flow_dissect_meta(skb, &mask->dissector, &skb_key);
> 05cd271fd61a0b Paul Blakey            2018-04-30  310  		/* skb_flow_dissect() does not set n_proto in case an unknown
> 05cd271fd61a0b Paul Blakey            2018-04-30  311  		 * protocol, so do it rather here.
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  312  		 */
> 9b7fd81cf9b6ca Toke Høiland-Jørgensen 2020-07-03  313  		skb_key.basic.n_proto = skb_protocol(skb, false);
> 05cd271fd61a0b Paul Blakey            2018-04-30  314  		skb_flow_dissect_tunnel_info(skb, &mask->dissector, &skb_key);
> e0ace68af2acfe Paul Blakey            2019-07-09  315  		skb_flow_dissect_ct(skb, &mask->dissector, &skb_key,
> e0ace68af2acfe Paul Blakey            2019-07-09  316  				    fl_ct_info_to_flower_map,
> e0ace68af2acfe Paul Blakey            2019-07-09  317  				    ARRAY_SIZE(fl_ct_info_to_flower_map));
> 05cd271fd61a0b Paul Blakey            2018-04-30  318  		skb_flow_dissect(skb, &mask->dissector, &skb_key, 0);
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  319  
> 05cd271fd61a0b Paul Blakey            2018-04-30  320  		fl_set_masked_key(&skb_mkey, &skb_key, mask);
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  321  
> 5c72299fba9df4 Amritha Nambiar        2018-11-12  322  		f = fl_lookup(mask, &skb_mkey, &skb_key);
> e8eb36cd8ca93f Amir Vadai             2016-06-13  323  		if (f && !tc_skip_sw(f->flags)) {
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  324  			*res = f->res;
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  325  			return tcf_exts_exec(skb, &f->exts, res);
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  326  		}
> 05cd271fd61a0b Paul Blakey            2018-04-30  327  	}
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  328  	return -1;
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  329  }
> 77b9900ef53ae0 Jiri Pirko             2015-05-12  330  
>
> :::::: The code at line 296 was first introduced by commit
> :::::: 77b9900ef53ae047e36a37d13a2aa33bb2d60641 tc: introduce Flower classifier
>
> :::::: TO: Jiri Pirko <jiri@resnulli.us>
> :::::: CC: David S. Miller <davem@davemloft.net>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify'
  2023-06-05 12:11 ` Vlad Buslov
@ 2023-06-05 15:32   ` Nathan Chancellor
  2023-06-05 15:38     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2023-06-05 15:32 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: Greg Kroah-Hartman, Jiri Pirko, Sasha Levin, llvm, oe-kbuild-all

On Mon, Jun 05, 2023 at 03:11:24PM +0300, Vlad Buslov wrote:
> On Mon 05 Jun 2023 at 18:59, kernel test robot <lkp@intel.com> wrote:
> > Hi Vlad,
> >
> > First bad commit (maybe != root cause):
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
> > head:   cf0b1e5482eaeb4db15c9e703267483dba88b575
> > commit: 5f2e54391893c67b709a64b280417ca0318adb73 [3300/8640] net/sched: flower: fix parsing of ethertype following VLAN header
> > config: mips-randconfig-r013-20230605 (https://download.01.org/0day-ci/archive/20230605/202306051816.mO3hqt7d-lkp@intel.com/config)
> > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
> > reproduce (this is a W=1 build):
> >         mkdir -p ~/bin
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # install mips cross compiling tool for clang build
> >         # apt-get install binutils-mipsel-linux-gnu
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5f2e54391893c67b709a64b280417ca0318adb73
> >         git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> >         git fetch --no-tags stable linux-5.4.y
> >         git checkout 5f2e54391893c67b709a64b280417ca0318adb73
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/sched/
> >
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202306051816.mO3hqt7d-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> >>> net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' [-Wframe-larger-than]
> >    static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> >               ^
> >    1 warning generated.
> >
> >
> > vim +/fl_classify +296 net/sched/cls_flower.c
> >
> > e0ace68af2acfe Paul Blakey            2019-07-09  295  
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12 @296  static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  297  		       struct tcf_result *res)
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  298  {
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  299  	struct cls_fl_head *head = rcu_dereference_bh(tp->root);
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  300  	struct fl_flow_key skb_mkey;
> 
> The stack usage of fl_classify() has already been addressed in later
> kernels by commit 0af413bd3e2d ("flow_dissector: work around stack frame
> size warning") which moved mkey into fl_mask_lookup(). Not sure what
> else can be done since my commit just adds a new flow dissector fields
> that are needed to correctly parse packets with multiple VLAN headers.

0af413bd3e2d seems like a reasonable cherry-pick for linux-5.4.y to me
if the warning is showing up there, which seems like the only thing that
needs to be done for this report.

> > e0ace68af2acfe Paul Blakey            2019-07-09  301  	struct fl_flow_key skb_key;
> > e0ace68af2acfe Paul Blakey            2019-07-09  302  	struct fl_flow_mask *mask;
> > e0ace68af2acfe Paul Blakey            2019-07-09  303  	struct cls_fl_filter *f;
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  304  
> > 05cd271fd61a0b Paul Blakey            2018-04-30  305  	list_for_each_entry_rcu(mask, &head->masks, list) {
> > 50acd32ea7f682 Jason Baron            2020-02-17  306  		flow_dissector_init_keys(&skb_key.control, &skb_key.basic);
> > 05cd271fd61a0b Paul Blakey            2018-04-30  307  		fl_clear_masked_range(&skb_key, mask);
> > bc3103f1ed405d Amir Vadai             2016-09-08  308  
> > 8212ed777f40c7 Jiri Pirko             2019-06-19  309  		skb_flow_dissect_meta(skb, &mask->dissector, &skb_key);
> > 05cd271fd61a0b Paul Blakey            2018-04-30  310  		/* skb_flow_dissect() does not set n_proto in case an unknown
> > 05cd271fd61a0b Paul Blakey            2018-04-30  311  		 * protocol, so do it rather here.
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  312  		 */
> > 9b7fd81cf9b6ca Toke Høiland-Jørgensen 2020-07-03  313  		skb_key.basic.n_proto = skb_protocol(skb, false);
> > 05cd271fd61a0b Paul Blakey            2018-04-30  314  		skb_flow_dissect_tunnel_info(skb, &mask->dissector, &skb_key);
> > e0ace68af2acfe Paul Blakey            2019-07-09  315  		skb_flow_dissect_ct(skb, &mask->dissector, &skb_key,
> > e0ace68af2acfe Paul Blakey            2019-07-09  316  				    fl_ct_info_to_flower_map,
> > e0ace68af2acfe Paul Blakey            2019-07-09  317  				    ARRAY_SIZE(fl_ct_info_to_flower_map));
> > 05cd271fd61a0b Paul Blakey            2018-04-30  318  		skb_flow_dissect(skb, &mask->dissector, &skb_key, 0);
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  319  
> > 05cd271fd61a0b Paul Blakey            2018-04-30  320  		fl_set_masked_key(&skb_mkey, &skb_key, mask);
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  321  
> > 5c72299fba9df4 Amritha Nambiar        2018-11-12  322  		f = fl_lookup(mask, &skb_mkey, &skb_key);
> > e8eb36cd8ca93f Amir Vadai             2016-06-13  323  		if (f && !tc_skip_sw(f->flags)) {
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  324  			*res = f->res;
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  325  			return tcf_exts_exec(skb, &f->exts, res);
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  326  		}
> > 05cd271fd61a0b Paul Blakey            2018-04-30  327  	}
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  328  	return -1;
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  329  }
> > 77b9900ef53ae0 Jiri Pirko             2015-05-12  330  
> >
> > :::::: The code at line 296 was first introduced by commit
> > :::::: 77b9900ef53ae047e36a37d13a2aa33bb2d60641 tc: introduce Flower classifier
> >
> > :::::: TO: Jiri Pirko <jiri@resnulli.us>
> > :::::: CC: David S. Miller <davem@davemloft.net>
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify'
  2023-06-05 15:32   ` Nathan Chancellor
@ 2023-06-05 15:38     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-06-05 15:38 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Vlad Buslov, Jiri Pirko, Sasha Levin, llvm, oe-kbuild-all

On Mon, Jun 05, 2023 at 08:32:09AM -0700, Nathan Chancellor wrote:
> On Mon, Jun 05, 2023 at 03:11:24PM +0300, Vlad Buslov wrote:
> > On Mon 05 Jun 2023 at 18:59, kernel test robot <lkp@intel.com> wrote:
> > > Hi Vlad,
> > >
> > > First bad commit (maybe != root cause):
> > >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
> > > head:   cf0b1e5482eaeb4db15c9e703267483dba88b575
> > > commit: 5f2e54391893c67b709a64b280417ca0318adb73 [3300/8640] net/sched: flower: fix parsing of ethertype following VLAN header
> > > config: mips-randconfig-r013-20230605 (https://download.01.org/0day-ci/archive/20230605/202306051816.mO3hqt7d-lkp@intel.com/config)
> > > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
> > > reproduce (this is a W=1 build):
> > >         mkdir -p ~/bin
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # install mips cross compiling tool for clang build
> > >         # apt-get install binutils-mipsel-linux-gnu
> > >         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5f2e54391893c67b709a64b280417ca0318adb73
> > >         git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> > >         git fetch --no-tags stable linux-5.4.y
> > >         git checkout 5f2e54391893c67b709a64b280417ca0318adb73
> > >         # save the config file
> > >         mkdir build_dir && cp config build_dir/.config
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/sched/
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202306051816.mO3hqt7d-lkp@intel.com/
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > >>> net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' [-Wframe-larger-than]
> > >    static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> > >               ^
> > >    1 warning generated.
> > >
> > >
> > > vim +/fl_classify +296 net/sched/cls_flower.c
> > >
> > > e0ace68af2acfe Paul Blakey            2019-07-09  295  
> > > 77b9900ef53ae0 Jiri Pirko             2015-05-12 @296  static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> > > 77b9900ef53ae0 Jiri Pirko             2015-05-12  297  		       struct tcf_result *res)
> > > 77b9900ef53ae0 Jiri Pirko             2015-05-12  298  {
> > > 77b9900ef53ae0 Jiri Pirko             2015-05-12  299  	struct cls_fl_head *head = rcu_dereference_bh(tp->root);
> > > 77b9900ef53ae0 Jiri Pirko             2015-05-12  300  	struct fl_flow_key skb_mkey;
> > 
> > The stack usage of fl_classify() has already been addressed in later
> > kernels by commit 0af413bd3e2d ("flow_dissector: work around stack frame
> > size warning") which moved mkey into fl_mask_lookup(). Not sure what
> > else can be done since my commit just adds a new flow dissector fields
> > that are needed to correctly parse packets with multiple VLAN headers.
> 
> 0af413bd3e2d seems like a reasonable cherry-pick for linux-5.4.y to me
> if the warning is showing up there, which seems like the only thing that
> needs to be done for this report.

That sounds good to me, now picked!

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-05 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05 10:59 [stable:linux-5.4.y 3300/8640] net/sched/cls_flower.c:296:12: warning: stack frame size (1040) exceeds limit (1024) in 'fl_classify' kernel test robot
2023-06-05 12:11 ` Vlad Buslov
2023-06-05 15:32   ` Nathan Chancellor
2023-06-05 15:38     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox