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: <202408060845.RPSHdunC-lkp@intel.com>
Date: Tue, 6 Aug 2024 08:17:22 +0800
From: kernel test robot <lkp@...el.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Russell King <rmk+kernel@...linux.org.uk>,
	Ard Biesheuvel <ardb@...nel.org>,
	Abbott Liu <liuwenliang@...wei.com>,
	Florian Fainelli <f.fainelli@...il.com>
Subject: drivers/interconnect/qcom/bcm-voter.c:339:1: warning: the frame size
 of 1104 bytes is larger than 1024 bytes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b446a2dae984fa5bd56dd7c3a02a426f87e05813
commit: 421015713b306e47af95d4d61cdfbd96d462e4cb ARM: 9017/2: Enable KASan for ARM
date:   3 years, 9 months ago
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20240806/202408060845.RPSHdunC-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240806/202408060845.RPSHdunC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408060845.RPSHdunC-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/interconnect/qcom/bcm-voter.c: In function 'qcom_icc_bcm_voter_commit':
>> drivers/interconnect/qcom/bcm-voter.c:339:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     339 | }
         | ^


vim +339 drivers/interconnect/qcom/bcm-voter.c

976daac4a1c581 David Dai   2020-02-28  239  
976daac4a1c581 David Dai   2020-02-28  240  /**
976daac4a1c581 David Dai   2020-02-28  241   * qcom_icc_bcm_voter_commit - generates and commits tcs cmds based on bcms
976daac4a1c581 David Dai   2020-02-28  242   * @voter: voter that needs flushing
976daac4a1c581 David Dai   2020-02-28  243   *
976daac4a1c581 David Dai   2020-02-28  244   * This function generates a set of AMC commands and flushes to the BCM device
976daac4a1c581 David Dai   2020-02-28  245   * associated with the voter. It conditionally generate WAKE and SLEEP commands
976daac4a1c581 David Dai   2020-02-28  246   * based on deltas between WAKE/SLEEP requirements. The ws_list persists
976daac4a1c581 David Dai   2020-02-28  247   * through multiple commit requests and bcm nodes are removed only when the
976daac4a1c581 David Dai   2020-02-28  248   * requirements for WAKE matches SLEEP.
976daac4a1c581 David Dai   2020-02-28  249   *
976daac4a1c581 David Dai   2020-02-28  250   * Returns 0 on success, or an appropriate error code otherwise.
976daac4a1c581 David Dai   2020-02-28  251   */
976daac4a1c581 David Dai   2020-02-28  252  int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
976daac4a1c581 David Dai   2020-02-28  253  {
976daac4a1c581 David Dai   2020-02-28  254  	struct qcom_icc_bcm *bcm;
976daac4a1c581 David Dai   2020-02-28  255  	struct qcom_icc_bcm *bcm_tmp;
976daac4a1c581 David Dai   2020-02-28  256  	int commit_idx[MAX_VCD + 1];
976daac4a1c581 David Dai   2020-02-28  257  	struct tcs_cmd cmds[MAX_BCMS];
976daac4a1c581 David Dai   2020-02-28  258  	int ret = 0;
976daac4a1c581 David Dai   2020-02-28  259  
976daac4a1c581 David Dai   2020-02-28  260  	if (!voter)
976daac4a1c581 David Dai   2020-02-28  261  		return 0;
976daac4a1c581 David Dai   2020-02-28  262  
976daac4a1c581 David Dai   2020-02-28  263  	mutex_lock(&voter->lock);
976daac4a1c581 David Dai   2020-02-28  264  	list_for_each_entry(bcm, &voter->commit_list, list)
976daac4a1c581 David Dai   2020-02-28  265  		bcm_aggregate(bcm);
976daac4a1c581 David Dai   2020-02-28  266  
976daac4a1c581 David Dai   2020-02-28  267  	/*
976daac4a1c581 David Dai   2020-02-28  268  	 * Pre sort the BCMs based on VCD for ease of generating a command list
976daac4a1c581 David Dai   2020-02-28  269  	 * that groups the BCMs with the same VCD together. VCDs are numbered
976daac4a1c581 David Dai   2020-02-28  270  	 * with lowest being the most expensive time wise, ensuring that
976daac4a1c581 David Dai   2020-02-28  271  	 * those commands are being sent the earliest in the queue. This needs
976daac4a1c581 David Dai   2020-02-28  272  	 * to be sorted every commit since we can't guarantee the order in which
976daac4a1c581 David Dai   2020-02-28  273  	 * the BCMs are added to the list.
976daac4a1c581 David Dai   2020-02-28  274  	 */
976daac4a1c581 David Dai   2020-02-28  275  	list_sort(NULL, &voter->commit_list, cmp_vcd);
976daac4a1c581 David Dai   2020-02-28  276  
976daac4a1c581 David Dai   2020-02-28  277  	/*
976daac4a1c581 David Dai   2020-02-28  278  	 * Construct the command list based on a pre ordered list of BCMs
976daac4a1c581 David Dai   2020-02-28  279  	 * based on VCD.
976daac4a1c581 David Dai   2020-02-28  280  	 */
b92902fddf4200 Mike Tipton 2020-09-03  281  	tcs_list_gen(voter, QCOM_ICC_BUCKET_AMC, cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  282  	if (!commit_idx[0])
976daac4a1c581 David Dai   2020-02-28  283  		goto out;
976daac4a1c581 David Dai   2020-02-28  284  
73edcd38d7720b Maulik Shah 2020-06-18  285  	rpmh_invalidate(voter->dev);
976daac4a1c581 David Dai   2020-02-28  286  
976daac4a1c581 David Dai   2020-02-28  287  	ret = rpmh_write_batch(voter->dev, RPMH_ACTIVE_ONLY_STATE,
976daac4a1c581 David Dai   2020-02-28  288  			       cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  289  	if (ret) {
976daac4a1c581 David Dai   2020-02-28  290  		pr_err("Error sending AMC RPMH requests (%d)\n", ret);
976daac4a1c581 David Dai   2020-02-28  291  		goto out;
976daac4a1c581 David Dai   2020-02-28  292  	}
976daac4a1c581 David Dai   2020-02-28  293  
976daac4a1c581 David Dai   2020-02-28  294  	list_for_each_entry_safe(bcm, bcm_tmp, &voter->commit_list, list)
976daac4a1c581 David Dai   2020-02-28  295  		list_del_init(&bcm->list);
976daac4a1c581 David Dai   2020-02-28  296  
976daac4a1c581 David Dai   2020-02-28  297  	list_for_each_entry_safe(bcm, bcm_tmp, &voter->ws_list, ws_list) {
976daac4a1c581 David Dai   2020-02-28  298  		/*
976daac4a1c581 David Dai   2020-02-28  299  		 * Only generate WAKE and SLEEP commands if a resource's
976daac4a1c581 David Dai   2020-02-28  300  		 * requirements change as the execution environment transitions
976daac4a1c581 David Dai   2020-02-28  301  		 * between different power states.
976daac4a1c581 David Dai   2020-02-28  302  		 */
976daac4a1c581 David Dai   2020-02-28  303  		if (bcm->vote_x[QCOM_ICC_BUCKET_WAKE] !=
976daac4a1c581 David Dai   2020-02-28  304  		    bcm->vote_x[QCOM_ICC_BUCKET_SLEEP] ||
976daac4a1c581 David Dai   2020-02-28  305  		    bcm->vote_y[QCOM_ICC_BUCKET_WAKE] !=
976daac4a1c581 David Dai   2020-02-28  306  		    bcm->vote_y[QCOM_ICC_BUCKET_SLEEP])
976daac4a1c581 David Dai   2020-02-28  307  			list_add_tail(&bcm->list, &voter->commit_list);
976daac4a1c581 David Dai   2020-02-28  308  		else
976daac4a1c581 David Dai   2020-02-28  309  			list_del_init(&bcm->ws_list);
976daac4a1c581 David Dai   2020-02-28  310  	}
976daac4a1c581 David Dai   2020-02-28  311  
976daac4a1c581 David Dai   2020-02-28  312  	if (list_empty(&voter->commit_list))
976daac4a1c581 David Dai   2020-02-28  313  		goto out;
976daac4a1c581 David Dai   2020-02-28  314  
976daac4a1c581 David Dai   2020-02-28  315  	list_sort(NULL, &voter->commit_list, cmp_vcd);
976daac4a1c581 David Dai   2020-02-28  316  
b92902fddf4200 Mike Tipton 2020-09-03  317  	tcs_list_gen(voter, QCOM_ICC_BUCKET_WAKE, cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  318  
976daac4a1c581 David Dai   2020-02-28  319  	ret = rpmh_write_batch(voter->dev, RPMH_WAKE_ONLY_STATE, cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  320  	if (ret) {
976daac4a1c581 David Dai   2020-02-28  321  		pr_err("Error sending WAKE RPMH requests (%d)\n", ret);
976daac4a1c581 David Dai   2020-02-28  322  		goto out;
976daac4a1c581 David Dai   2020-02-28  323  	}
976daac4a1c581 David Dai   2020-02-28  324  
b92902fddf4200 Mike Tipton 2020-09-03  325  	tcs_list_gen(voter, QCOM_ICC_BUCKET_SLEEP, cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  326  
976daac4a1c581 David Dai   2020-02-28  327  	ret = rpmh_write_batch(voter->dev, RPMH_SLEEP_STATE, cmds, commit_idx);
976daac4a1c581 David Dai   2020-02-28  328  	if (ret) {
976daac4a1c581 David Dai   2020-02-28  329  		pr_err("Error sending SLEEP RPMH requests (%d)\n", ret);
976daac4a1c581 David Dai   2020-02-28  330  		goto out;
976daac4a1c581 David Dai   2020-02-28  331  	}
976daac4a1c581 David Dai   2020-02-28  332  
976daac4a1c581 David Dai   2020-02-28  333  out:
976daac4a1c581 David Dai   2020-02-28  334  	list_for_each_entry_safe(bcm, bcm_tmp, &voter->commit_list, list)
976daac4a1c581 David Dai   2020-02-28  335  		list_del_init(&bcm->list);
976daac4a1c581 David Dai   2020-02-28  336  
976daac4a1c581 David Dai   2020-02-28  337  	mutex_unlock(&voter->lock);
976daac4a1c581 David Dai   2020-02-28  338  	return ret;
976daac4a1c581 David Dai   2020-02-28 @339  }
976daac4a1c581 David Dai   2020-02-28  340  EXPORT_SYMBOL_GPL(qcom_icc_bcm_voter_commit);
976daac4a1c581 David Dai   2020-02-28  341  

:::::: The code at line 339 was first introduced by commit
:::::: 976daac4a1c581e5d5fd64047519fd6fcde39738 interconnect: qcom: Consolidate interconnect RPMh support

:::::: TO: David Dai <daidavid1@...eaurora.org>
:::::: CC: Georgi Djakov <georgi.djakov@...aro.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ