From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [axboe-block:rw_iter 79/415] kernel/time/test_udelay.c:112 udelay_test_write() warn: potential spectre issue 'lbuf' [w]
Date: Fri, 12 Apr 2024 19:19:34 +0800 [thread overview]
Message-ID: <202404121955.fDJYmETD-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-block.git rw_iter
head: 8e79f6c3d0a118031e843758491803e38794f6e8
commit: 99faf2122db10e555ebd87072639ca6ac8e2fb92 [79/415] kernel/time: convert to read/write iterators
:::::: branch date: 16 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20240411 (https://download.01.org/0day-ci/archive/20240412/202404121955.fDJYmETD-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
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/202404121955.fDJYmETD-lkp@intel.com/
smatch warnings:
kernel/time/test_udelay.c:112 udelay_test_write() warn: potential spectre issue 'lbuf' [w]
vim +/lbuf +112 kernel/time/test_udelay.c
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 98
99faf2122db10e kernel/time/test_udelay.c Jens Axboe 2024-04-08 99 static ssize_t udelay_test_write(struct kiocb *iocb, struct iov_iter *from)
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 100 {
99faf2122db10e kernel/time/test_udelay.c Jens Axboe 2024-04-08 101 size_t count = iov_iter_count(from);
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 102 char lbuf[32];
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 103 int ret;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 104 int usecs;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 105 int iters;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 106
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 107 if (count >= sizeof(lbuf))
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 108 return -EINVAL;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 109
99faf2122db10e kernel/time/test_udelay.c Jens Axboe 2024-04-08 110 if (!copy_from_iter_full(lbuf, count, from))
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 111 return -EFAULT;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 @112 lbuf[count] = '\0';
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 113
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 114 ret = sscanf(lbuf, "%d %d", &usecs, &iters);
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 115 if (ret < 1)
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 116 return -EINVAL;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 117 else if (ret < 2)
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 118 iters = DEFAULT_ITERATIONS;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 119
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 120 mutex_lock(&udelay_test_lock);
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 121 udelay_test_usecs = usecs;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 122 udelay_test_iterations = iters;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 123 mutex_unlock(&udelay_test_lock);
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 124
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 125 return count;
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 126 }
e704f93af5a083 kernel/time/udelay_test.c David Riley 2014-06-16 127
:::::: The code at line 112 was first introduced by commit
:::::: e704f93af5a083c07b8f722672d63a1d908daf55 kernel: time: Add udelay_test module to validate udelay
:::::: TO: David Riley <davidriley@chromium.org>
:::::: CC: John Stultz <john.stultz@linaro.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-04-12 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 11:19 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-11 18:10 [axboe-block:rw_iter 79/415] kernel/time/test_udelay.c:112 udelay_test_write() warn: potential spectre issue 'lbuf' [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=202404121955.fDJYmETD-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.