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>] [day] [month] [year] [list]
Message-ID: <202103231951.TssHv5En-lkp@intel.com>
Date:   Tue, 23 Mar 2021 19:28:54 +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 1208 bytes
 in function 'pmsr_parse_peer'

Hi Johannes,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   84196390620ac0e5070ae36af84c137c6216a7dc
commit: 44f3625bc61653ea3bde9960298faf2f5518fda5 netlink: export policy in extended ACK
date:   5 months ago
config: mips-randconfig-r023-20210322 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 14696baaf4c43fe53f738bc292bbe169eed93d5d)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-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=mips 

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 >>):

>> net/wireless/pmsr.c:164:12: warning: stack frame size of 1208 bytes in function 'pmsr_parse_peer' [-Wframe-larger-than=]
   static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
              ^
   1 warning generated.


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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ