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 115/471] drivers/hid/hid-picolcd_debugfs.c:50 picolcd_debug_reset_write() warn: potential spectre issue 'buf' [w] (local cap)
Date: Wed, 11 Mar 2026 14:32:13 +0800 [thread overview]
Message-ID: <202603111411.GE776lsA-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: 7dfd9f363e6d79bc842bf6e7fa86541a21142fef [115/471] drivers/hid: convert to read/write iterators
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: openrisc-randconfig-r071-20260307 (https://download.01.org/0day-ci/archive/20260311/202603111411.GE776lsA-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/202603111411.GE776lsA-lkp@intel.com/
smatch warnings:
drivers/hid/hid-picolcd_debugfs.c:50 picolcd_debug_reset_write() warn: potential spectre issue 'buf' [w] (local cap)
vim +/buf +50 drivers/hid/hid-picolcd_debugfs.c
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 37
7dfd9f363e6d79 Jens Axboe 2024-04-05 38 static ssize_t picolcd_debug_reset_write(struct kiocb *iocb,
7dfd9f363e6d79 Jens Axboe 2024-04-05 39 struct iov_iter *from)
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 40 {
7dfd9f363e6d79 Jens Axboe 2024-04-05 41 struct picolcd_data *data = ((struct seq_file *)iocb->ki_filp->private_data)->private;
7dfd9f363e6d79 Jens Axboe 2024-04-05 42 size_t count = iov_iter_count(from);
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 43 char buf[32];
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 44 size_t cnt = min(count, sizeof(buf)-1);
7dfd9f363e6d79 Jens Axboe 2024-04-05 45 if (!copy_from_iter_full(buf, cnt, from))
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 46 return -EFAULT;
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 47
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 48 while (cnt > 0 && (buf[cnt-1] == ' ' || buf[cnt-1] == '\n'))
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 49 cnt--;
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 @50 buf[cnt] = '\0';
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 51 if (strcmp(buf, "all") == 0) {
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 52 picolcd_reset(data->hdev);
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 53 picolcd_fb_reset(data, 1);
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 54 } else if (strcmp(buf, "fb") == 0) {
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 55 picolcd_fb_reset(data, 1);
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 56 } else {
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 57 return -EINVAL;
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 58 }
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 59 return count;
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 60 }
fabdbf2fd22fa1 Bruno Prémont 2012-07-30 61
:::::: The code at line 50 was first introduced by commit
:::::: fabdbf2fd22fa170b4c5340dbdda5c8cd88fb205 HID: picoLCD: split driver code
:::::: TO: Bruno Prémont <bonbons@linux-vserver.org>
:::::: CC: Jiri Kosina <jkosina@suse.cz>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-03-11 6:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 6:32 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-09 18:56 [axboe:rw_iter 115/471] drivers/hid/hid-picolcd_debugfs.c:50 picolcd_debug_reset_write() warn: potential spectre issue 'buf' [w] (local cap) kernel test robot
2026-03-08 11:03 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=202603111411.GE776lsA-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.