All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-stable-rc:linux-5.18.y 467/2461] huge_count_read_write.c:23:9: warning: 'write' reading 4294967295 bytes from a region of size 1
@ 2022-08-03  7:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-03  7:46 UTC (permalink / raw)
  To: Yuanchu Xie
  Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman, SeongJae Park,
	Shuah Khan, Sasha Levin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.18.y
head:   7e8a7b1c98057a3014222a505c28c6bd43ed5666
commit: e1ea40d9d6fc3d408390cb42d8f3c9d1466a62f3 [467/2461] selftests/damon: add damon to selftests root Makefile
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e1ea40d9d6fc3d408390cb42d8f3c9d1466a62f3
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.18.y
        git checkout e1ea40d9d6fc3d408390cb42d8f3c9d1466a62f3
        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@intel.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-03  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03  7:46 [linux-stable-rc:linux-5.18.y 467/2461] huge_count_read_write.c:23:9: warning: 'write' reading 4294967295 bytes from a region of size 1 kernel test robot

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.