[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209200328.JMMJiy4h-lkp@intel.com>
Date: Tue, 20 Sep 2022 03:26:17 +0800
From: kernel test robot <lkp@...el.com>
To: Yuanchu Xie <yuanchu@...gle.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Shuah Khan <skhan@...uxfoundation.org>,
SeongJae Park <sj@...nel.org>
Subject: huge_count_read_write.c:23:9: warning: 'write' reading 4294967295
bytes from a region of size 1
Hi Yuanchu,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 521a547ced6477c54b4b0cc206000406c221b4d6
commit: 678f0cdc572c5fda940cb038d70eebb8d818adc8 selftests/damon: add damon to selftests root Makefile
date: 5 months ago
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=678f0cdc572c5fda940cb038d70eebb8d818adc8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 678f0cdc572c5fda940cb038d70eebb8d818adc8
make O=/tmp/kselftest headers
make O=/tmp/kselftest -C tools/testing/selftests
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
huge_count_read_write.c: In function 'write_read_with_huge_count':
>> huge_count_read_write.c:23:9: warning: 'write' reading 4294967295 bytes from a region of size 1 [-Wstringop-overread]
23 | write(filedesc, "", 0xfffffffful);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from huge_count_read_write.c:8:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
>> huge_count_read_write.c:25:15: warning: 'read' writing 4294967295 bytes into a region of size 25 overflows the destination [-Wstringop-overflow=]
25 | ret = read(filedesc, buf, 0xfffffffful);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
huge_count_read_write.c:14:14: note: destination object 'buf' of size 25
14 | char buf[25];
| ^~~
In file included from huge_count_read_write.c:8:
/usr/include/unistd.h:360:16: note: in a call to function 'read' declared with attribute 'access (write_only, 2, 3)'
360 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
| ^~~~
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (125955 bytes)
Powered by blists - more mailing lists