* sound/soc/sof/ipc4-mtrace.c:359 sof_ipc4_priority_mask_dfs_write() warn: potential spectre issue 'priv->state_info.logs_priorities_mask' [w] (local cap)
@ 2023-03-23 3:49 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-23 3:49 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
CC: Mark Brown <broonie@kernel.org>
CC: Rander Wang <rander.wang@intel.com>
CC: Bard Liao <yung-chuan.liao@linux.intel.com>
CC: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
CC: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fff5a5e7f528b2ed2c335991399a766c2cf01103
commit: f4ea22f7aa7536560097d765be56445933d07e0d ASoC: SOF: ipc4: Add support for mtrace log extraction
date: 6 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 6 months ago
config: s390-randconfig-m031-20230321 (https://download.01.org/0day-ci/archive/20230323/202303231129.YxVuUvO2-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303231129.YxVuUvO2-lkp@intel.com/
smatch warnings:
sound/soc/sof/ipc4-mtrace.c:359 sof_ipc4_priority_mask_dfs_write() warn: potential spectre issue 'priv->state_info.logs_priorities_mask' [w] (local cap)
vim +359 sound/soc/sof/ipc4-mtrace.c
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 326
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 327 static ssize_t sof_ipc4_priority_mask_dfs_write(struct file *file,
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 328 const char __user *from,
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 329 size_t count, loff_t *ppos)
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 330 {
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 331 struct sof_mtrace_priv *priv = file->private_data;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 332 int id, ret;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 333 char *buf;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 334 u32 mask;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 335
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 336 /*
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 337 * To update Nth mask entry, write:
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 338 * "N,0x1234" or "N,1234" to the debugfs file
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 339 * The mask will be interpreted as hexadecimal number
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 340 */
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 341 buf = memdup_user_nul(from, count);
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 342 if (IS_ERR(buf))
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 343 return PTR_ERR(buf);
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 344
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 345 ret = sscanf(buf, "%d,0x%x", &id, &mask);
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 346 if (ret != 2) {
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 347 ret = sscanf(buf, "%d,%x", &id, &mask);
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 348 if (ret != 2) {
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 349 ret = -EINVAL;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 350 goto out;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 351 }
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 352 }
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 353
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 354 if (id >= MAX_ALLOWED_LIBRARIES) {
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 355 ret = -EINVAL;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 356 goto out;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 357 }
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 358
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 @359 priv->state_info.logs_priorities_mask[id] = mask;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 360 ret = count;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 361
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 362 out:
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 363 kfree(buf);
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 364 return ret;
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 365 }
f4ea22f7aa7536 Peter Ujfalusi 2022-09-09 366
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-23 3:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 3:49 sound/soc/sof/ipc4-mtrace.c:359 sof_ipc4_priority_mask_dfs_write() warn: potential spectre issue 'priv->state_info.logs_priorities_mask' [w] (local cap) kernel test robot
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.