From: kernel test robot <lkp@intel.com>
To: "Jason A. Donenfeld" <zx2c4@kernel.org>
Cc: kbuild-all@lists.01.org, Ammar Faizi <ammarfaizi2@gnuweeb.org>,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
linux-kernel@vger.kernel.org
Subject: [ammarfaizi2-block:crng/random/jd/getrandom-batch 9/9] arch/x86/include/asm/string_32.h:195:29: warning: '__builtin_memset' pointer overflow between offset [0, 255] and size [2147483648, 4294967295]
Date: Wed, 3 Aug 2022 02:48:26 +0800 [thread overview]
Message-ID: <202208030247.gT8Fic5N-lkp@intel.com> (raw)
tree: https://github.com/ammarfaizi2/linux-block crng/random/jd/getrandom-batch
head: 99a314f603c9cd173e6db2e3776eb76477283e1a
commit: 99a314f603c9cd173e6db2e3776eb76477283e1a [9/9] random: batch getrandom() output per-task
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220803/202208030247.gT8Fic5N-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/99a314f603c9cd173e6db2e3776eb76477283e1a
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block crng/random/jd/getrandom-batch
git checkout 99a314f603c9cd173e6db2e3776eb76477283e1a
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/string.h:3,
from include/linux/string.h:20,
from arch/x86/include/asm/page_32.h:22,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/utsname.h:6,
from drivers/char/random.c:28:
drivers/char/random.c: In function 'get_random_bytes_user.part.0':
>> arch/x86/include/asm/string_32.h:195:29: warning: '__builtin_memset' pointer overflow between offset [0, 255] and size [2147483648, 4294967295] [-Warray-bounds]
195 | #define memset(s, c, count) __builtin_memset(s, c, count)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/random.c:425:17: note: in expansion of macro 'memset'
425 | memset(current->rng_batch.buf + current->rng_batch.position, 0, batch_len);
| ^~~~~~
vim +/__builtin_memset +195 arch/x86/include/asm/string_32.h
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 186
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 187 #define __memset(s, c, count) \
78d64fc21d2aa4 include/asm-x86/string_32.h Joe Perches 2008-05-12 188 (__builtin_constant_p(count) \
78d64fc21d2aa4 include/asm-x86/string_32.h Joe Perches 2008-05-12 189 ? __constant_count_memset((s), (c), (count)) \
78d64fc21d2aa4 include/asm-x86/string_32.h Joe Perches 2008-05-12 190 : __memset_generic((s), (c), (count)))
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 191
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 192 #define __HAVE_ARCH_MEMSET
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay 2017-07-12 193 extern void *memset(void *, int, size_t);
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay 2017-07-12 194 #ifndef CONFIG_FORTIFY_SOURCE
ff60fab71bb3b4 arch/x86/include/asm/string_32.h Arjan van de Ven 2009-09-28 @195 #define memset(s, c, count) __builtin_memset(s, c, count)
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay 2017-07-12 196 #endif /* !CONFIG_FORTIFY_SOURCE */
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 197
:::::: The code at line 195 was first introduced by commit
:::::: ff60fab71bb3b4fdbf8caf57ff3739ffd0887396 x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy
:::::: TO: Arjan van de Ven <arjan@infradead.org>
:::::: CC: H. Peter Anvin <hpa@zytor.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-08-02 18:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202208030247.gT8Fic5N-lkp@intel.com \
--to=lkp@intel.com \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zx2c4@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®