All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/accel/ivpu/ivpu_debugfs.c:467 priority_bands_fops_write() warn: potential spectre issue 'vdev->hw->hws.grace_period' [w] (local cap)
Date: Thu, 8 May 2025 09:44:54 +0800	[thread overview]
Message-ID: <202505080949.XCql2vnB-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Karol Wachowski <karol.wachowski@intel.com>
CC: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d76bb1ebb5587f66b0f8b8099bfbb44722bc08b3
commit: 320323d2e5456df9d6236ac1ce9c030b1a74aa5b accel/ivpu: Add debugfs interface for setting HWS priority bands
date:   3 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-161-20250430 (https://download.01.org/0day-ci/archive/20250508/202505080949.XCql2vnB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505080949.XCql2vnB-lkp@intel.com/

smatch warnings:
drivers/accel/ivpu/ivpu_debugfs.c:467 priority_bands_fops_write() warn: potential spectre issue 'vdev->hw->hws.grace_period' [w] (local cap)
drivers/accel/ivpu/ivpu_debugfs.c:468 priority_bands_fops_write() warn: potential spectre issue 'vdev->hw->hws.process_grace_period' [w] (local cap)
drivers/accel/ivpu/ivpu_debugfs.c:469 priority_bands_fops_write() warn: potential spectre issue 'vdev->hw->hws.process_quantum' [w] (local cap)

vim +467 drivers/accel/ivpu/ivpu_debugfs.c

320323d2e5456df Karol Wachowski 2025-02-04  438  
320323d2e5456df Karol Wachowski 2025-02-04  439  static ssize_t
320323d2e5456df Karol Wachowski 2025-02-04  440  priority_bands_fops_write(struct file *file, const char __user *user_buf, size_t size, loff_t *pos)
320323d2e5456df Karol Wachowski 2025-02-04  441  {
320323d2e5456df Karol Wachowski 2025-02-04  442  	struct seq_file *s = file->private_data;
320323d2e5456df Karol Wachowski 2025-02-04  443  	struct ivpu_device *vdev = s->private;
320323d2e5456df Karol Wachowski 2025-02-04  444  	char buf[64];
320323d2e5456df Karol Wachowski 2025-02-04  445  	u32 grace_period;
320323d2e5456df Karol Wachowski 2025-02-04  446  	u32 process_grace_period;
320323d2e5456df Karol Wachowski 2025-02-04  447  	u32 process_quantum;
320323d2e5456df Karol Wachowski 2025-02-04  448  	u32 band;
320323d2e5456df Karol Wachowski 2025-02-04  449  	int ret;
320323d2e5456df Karol Wachowski 2025-02-04  450  
320323d2e5456df Karol Wachowski 2025-02-04  451  	if (size >= sizeof(buf))
320323d2e5456df Karol Wachowski 2025-02-04  452  		return -EINVAL;
320323d2e5456df Karol Wachowski 2025-02-04  453  
320323d2e5456df Karol Wachowski 2025-02-04  454  	ret = simple_write_to_buffer(buf, sizeof(buf) - 1, pos, user_buf, size);
320323d2e5456df Karol Wachowski 2025-02-04  455  	if (ret < 0)
320323d2e5456df Karol Wachowski 2025-02-04  456  		return ret;
320323d2e5456df Karol Wachowski 2025-02-04  457  
320323d2e5456df Karol Wachowski 2025-02-04  458  	buf[size] = '\0';
320323d2e5456df Karol Wachowski 2025-02-04  459  	ret = sscanf(buf, "%u %u %u %u", &band, &grace_period, &process_grace_period,
320323d2e5456df Karol Wachowski 2025-02-04  460  		     &process_quantum);
320323d2e5456df Karol Wachowski 2025-02-04  461  	if (ret != 4)
320323d2e5456df Karol Wachowski 2025-02-04  462  		return -EINVAL;
320323d2e5456df Karol Wachowski 2025-02-04  463  
320323d2e5456df Karol Wachowski 2025-02-04  464  	if (band >= VPU_JOB_SCHEDULING_PRIORITY_BAND_COUNT)
320323d2e5456df Karol Wachowski 2025-02-04  465  		return -EINVAL;
320323d2e5456df Karol Wachowski 2025-02-04  466  
320323d2e5456df Karol Wachowski 2025-02-04 @467  	vdev->hw->hws.grace_period[band] = grace_period;
320323d2e5456df Karol Wachowski 2025-02-04 @468  	vdev->hw->hws.process_grace_period[band] = process_grace_period;
320323d2e5456df Karol Wachowski 2025-02-04 @469  	vdev->hw->hws.process_quantum[band] = process_quantum;
320323d2e5456df Karol Wachowski 2025-02-04  470  
320323d2e5456df Karol Wachowski 2025-02-04  471  	return size;
320323d2e5456df Karol Wachowski 2025-02-04  472  }
320323d2e5456df Karol Wachowski 2025-02-04  473  

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

             reply	other threads:[~2025-05-08  1:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08  1:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-12-18 11:56 drivers/accel/ivpu/ivpu_debugfs.c:467 priority_bands_fops_write() warn: potential spectre issue 'vdev->hw->hws.grace_period' [w] (local cap) kernel test robot
2025-05-07  7:58 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202505080949.XCql2vnB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.