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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 1 Jan 2021 07:06:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Johannes Berg <johannes.berg@...el.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: net/wireless/pmsr.c:164:12: warning: stack frame size of 2432 bytes
 in function 'pmsr_parse_peer'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f6e1ea19649216156576aeafa784e3b4cee45549
commit: 44f3625bc61653ea3bde9960298faf2f5518fda5 netlink: export policy in extended ACK
date:   3 months ago
config: powerpc-randconfig-r036-20210101 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6b316febb4388764789677f81f03aff373ec35b2)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=44f3625bc61653ea3bde9960298faf2f5518fda5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 44f3625bc61653ea3bde9960298faf2f5518fda5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:219:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/wireless/pmsr.c:7:
   In file included from include/net/cfg80211.h:13:
   In file included from include/linux/netdevice.h:37:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:221:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/wireless/pmsr.c:7:
   In file included from include/net/cfg80211.h:13:
   In file included from include/linux/netdevice.h:37:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:223:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/wireless/pmsr.c:7:
   In file included from include/net/cfg80211.h:13:
   In file included from include/linux/netdevice.h:37:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:225:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from net/wireless/pmsr.c:7:
   In file included from include/net/cfg80211.h:13:
   In file included from include/linux/netdevice.h:37:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:227:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> net/wireless/pmsr.c:164:12: warning: stack frame size of 2432 bytes in function 'pmsr_parse_peer' [-Wframe-larger-than=]
   static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
              ^
   13 warnings generated.


vim +/pmsr_parse_peer +164 net/wireless/pmsr.c

9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  163  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10 @164  static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  165  			   struct nlattr *peer,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  166  			   struct cfg80211_pmsr_request_peer *out,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  167  			   struct genl_info *info)
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  168  {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  169  	struct nlattr *tb[NL80211_PMSR_PEER_ATTR_MAX + 1];
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  170  	struct nlattr *req[NL80211_PMSR_REQ_ATTR_MAX + 1];
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  171  	struct nlattr *treq;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  172  	int err, rem;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  173  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  174  	/* no validation needed - was already done via nested policy */
8cb081746c031fb Johannes Berg 2019-04-26  175  	nla_parse_nested_deprecated(tb, NL80211_PMSR_PEER_ATTR_MAX, peer,
8cb081746c031fb Johannes Berg 2019-04-26  176  				    NULL, NULL);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  177  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  178  	if (!tb[NL80211_PMSR_PEER_ATTR_ADDR] ||
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  179  	    !tb[NL80211_PMSR_PEER_ATTR_CHAN] ||
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  180  	    !tb[NL80211_PMSR_PEER_ATTR_REQ]) {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  181  		NL_SET_ERR_MSG_ATTR(info->extack, peer,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  182  				    "insufficient peer data");
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  183  		return -EINVAL;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  184  	}
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  185  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  186  	memcpy(out->addr, nla_data(tb[NL80211_PMSR_PEER_ATTR_ADDR]), ETH_ALEN);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  187  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  188  	/* reuse info->attrs */
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  189  	memset(info->attrs, 0, sizeof(*info->attrs) * (NL80211_ATTR_MAX + 1));
8cb081746c031fb Johannes Berg 2019-04-26  190  	err = nla_parse_nested_deprecated(info->attrs, NL80211_ATTR_MAX,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  191  					  tb[NL80211_PMSR_PEER_ATTR_CHAN],
d15da2a2e813679 Johannes Berg 2020-04-30  192  					  NULL, info->extack);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  193  	if (err)
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  194  		return err;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  195  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  196  	err = nl80211_parse_chandef(rdev, info, &out->chandef);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  197  	if (err)
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  198  		return err;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  199  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  200  	/* no validation needed - was already done via nested policy */
8cb081746c031fb Johannes Berg 2019-04-26  201  	nla_parse_nested_deprecated(req, NL80211_PMSR_REQ_ATTR_MAX,
8cb081746c031fb Johannes Berg 2019-04-26  202  				    tb[NL80211_PMSR_PEER_ATTR_REQ], NULL,
8cb081746c031fb Johannes Berg 2019-04-26  203  				    NULL);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  204  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  205  	if (!req[NL80211_PMSR_REQ_ATTR_DATA]) {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  206  		NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  207  				    tb[NL80211_PMSR_PEER_ATTR_REQ],
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  208  				    "missing request type/data");
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  209  		return -EINVAL;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  210  	}
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  211  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  212  	if (req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF])
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  213  		out->report_ap_tsf = true;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  214  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  215  	if (out->report_ap_tsf && !rdev->wiphy.pmsr_capa->report_ap_tsf) {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  216  		NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  217  				    req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF],
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  218  				    "reporting AP TSF is not supported");
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  219  		return -EINVAL;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  220  	}
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  221  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  222  	nla_for_each_nested(treq, req[NL80211_PMSR_REQ_ATTR_DATA], rem) {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  223  		switch (nla_type(treq)) {
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  224  		case NL80211_PMSR_TYPE_FTM:
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  225  			err = pmsr_parse_ftm(rdev, treq, out, info);
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  226  			break;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  227  		default:
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  228  			NL_SET_ERR_MSG_ATTR(info->extack, treq,
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  229  					    "unsupported measurement type");
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  230  			err = -EINVAL;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  231  		}
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  232  	}
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  233  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  234  	if (err)
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  235  		return err;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  236  
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  237  	return 0;
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  238  }
9bb7e0f24e7e7d0 Johannes Berg 2018-09-10  239  

:::::: The code at line 164 was first introduced by commit
:::::: 9bb7e0f24e7e7d00daa1219b14539e2e602649b2 cfg80211: add peer measurement with FTM initiator API

:::::: TO: Johannes Berg <johannes.berg@...el.com>
:::::: CC: Johannes Berg <johannes.berg@...el.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (25309 bytes)

Powered by blists - more mailing lists