From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [axboe:rw_iter 143/471] drivers/gpu/drm/loongson/lsdc_crtc.c:647 lsdc_crtc_man_op_write() warn: potential spectre issue 'buf' [w]
Date: Mon, 09 Mar 2026 06:29:11 +0800 [thread overview]
Message-ID: <202603090633.tFwzlZSd-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jens Axboe <axboe@kernel.dk>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git rw_iter
head: 0a49759be1c3b29207758e467fdc1a90d0716d06
commit: 76dedd5c839e0bd2c29550f6a8491a5676f9b0f3 [143/471] drm/loongson: convert to read/write iterators
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: openrisc-randconfig-r071-20260307 (https://download.01.org/0day-ci/archive/20260309/202603090633.tFwzlZSd-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 15.2.0
smatch: v0.5.0-9004-gb810ac53
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/202603090633.tFwzlZSd-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/loongson/lsdc_crtc.c:647 lsdc_crtc_man_op_write() warn: potential spectre issue 'buf' [w]
vim +/buf +647 drivers/gpu/drm/loongson/lsdc_crtc.c
f39db26c54281d Sui Jingfeng 2023-06-15 632
76dedd5c839e0b Jens Axboe 2024-04-09 633 static ssize_t lsdc_crtc_man_op_write(struct kiocb *iocb, struct iov_iter *from)
f39db26c54281d Sui Jingfeng 2023-06-15 634 {
76dedd5c839e0b Jens Axboe 2024-04-09 635 struct seq_file *m = iocb->ki_filp->private_data;
f39db26c54281d Sui Jingfeng 2023-06-15 636 struct lsdc_crtc *lcrtc = m->private;
f39db26c54281d Sui Jingfeng 2023-06-15 637 const struct lsdc_crtc_hw_ops *ops = lcrtc->hw_ops;
76dedd5c839e0b Jens Axboe 2024-04-09 638 size_t len = iov_iter_count(from);
f39db26c54281d Sui Jingfeng 2023-06-15 639 char buf[16];
f39db26c54281d Sui Jingfeng 2023-06-15 640
f39db26c54281d Sui Jingfeng 2023-06-15 641 if (len > sizeof(buf) - 1)
f39db26c54281d Sui Jingfeng 2023-06-15 642 return -EINVAL;
f39db26c54281d Sui Jingfeng 2023-06-15 643
76dedd5c839e0b Jens Axboe 2024-04-09 644 if (!copy_from_iter_full(buf, len, from))
f39db26c54281d Sui Jingfeng 2023-06-15 645 return -EFAULT;
f39db26c54281d Sui Jingfeng 2023-06-15 646
f39db26c54281d Sui Jingfeng 2023-06-15 @647 buf[len] = '\0';
f39db26c54281d Sui Jingfeng 2023-06-15 648
f39db26c54281d Sui Jingfeng 2023-06-15 649 if (sysfs_streq(buf, "soft_reset"))
f39db26c54281d Sui Jingfeng 2023-06-15 650 ops->soft_reset(lcrtc);
f39db26c54281d Sui Jingfeng 2023-06-15 651 else if (sysfs_streq(buf, "enable"))
f39db26c54281d Sui Jingfeng 2023-06-15 652 ops->enable(lcrtc);
f39db26c54281d Sui Jingfeng 2023-06-15 653 else if (sysfs_streq(buf, "disable"))
f39db26c54281d Sui Jingfeng 2023-06-15 654 ops->disable(lcrtc);
f39db26c54281d Sui Jingfeng 2023-06-15 655 else if (sysfs_streq(buf, "flip"))
f39db26c54281d Sui Jingfeng 2023-06-15 656 ops->flip(lcrtc);
f39db26c54281d Sui Jingfeng 2023-06-15 657 else if (sysfs_streq(buf, "clone"))
f39db26c54281d Sui Jingfeng 2023-06-15 658 ops->clone(lcrtc);
f39db26c54281d Sui Jingfeng 2023-06-15 659
f39db26c54281d Sui Jingfeng 2023-06-15 660 return len;
f39db26c54281d Sui Jingfeng 2023-06-15 661 }
f39db26c54281d Sui Jingfeng 2023-06-15 662
:::::: The code at line 647 was first introduced by commit
:::::: f39db26c54281da6a785259498ca74b5e470476f drm: Add kms driver for loongson display controller
:::::: TO: Sui Jingfeng <suijingfeng@loongson.cn>
:::::: CC: Sui Jingfeng <suijingfeng@loongson.cn>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-03-08 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 22:29 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-12 4:48 [axboe:rw_iter 143/471] drivers/gpu/drm/loongson/lsdc_crtc.c:647 lsdc_crtc_man_op_write() warn: potential spectre issue 'buf' [w] 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=202603090633.tFwzlZSd-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.