public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yuanchu Xie <yuanchu@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>,
	SeongJae Park <sj@kernel.org>
Subject: huge_count_read_write.c:23:9: warning: 'write' reading 4294967295 bytes from a region of size 1
Date: Wed, 8 Jun 2022 21:27:38 +0800	[thread overview]
Message-ID: <202206082155.7ppW1i62-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9886142c7a2226439c1e3f7d9b69f9c7094c3ef6
commit: 678f0cdc572c5fda940cb038d70eebb8d818adc8 selftests/damon: add damon to selftests root Makefile
date:   6 weeks ago
reproduce: 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

             reply	other threads:[~2022-06-08 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 13:27 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-09-19 19:26 huge_count_read_write.c:23:9: warning: 'write' reading 4294967295 bytes from a region of size 1 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=202206082155.7ppW1i62-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=yuanchu@google.com \
    /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