public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 3 Dec 2024 11:17:15 +0800	[thread overview]
Message-ID: <202412031102.G0OBzQ8g-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cdd30ebb1b9f36159d66f088b61aee264e649d7a
commit: 938a000e3f9bead24ea753286b3e4d2423275c9e fortify: Detect struct member overflows in memmove() at compile-time
date:   2 years, 10 months ago
config: i386-randconfig-063-20240106 (https://download.01.org/0day-ci/archive/20241203/202412031102.G0OBzQ8g-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412031102.G0OBzQ8g-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412031102.G0OBzQ8g-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
>> drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src
>> drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
>> drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src
>> drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
   drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:496:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:496:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] dest @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] dest
   drivers/video/fbdev/hgafb.c:507:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
   drivers/video/fbdev/hgafb.c:507:25: sparse:     expected void const *
   drivers/video/fbdev/hgafb.c:507:25: sparse:     got unsigned char [noderef] [usertype] __iomem *[assigned] src

vim +496 drivers/video/fbdev/hgafb.c

^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  482  
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  483  static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  484  {
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  485  	u_int rows, y1, y2;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  486  	u8 __iomem *src;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  487  	u8 __iomem *dest;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  488  
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  489  	if (area->dy <= area->sy) {
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  490  		y1 = area->sy;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  491  		y2 = area->dy;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  492  
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  493  		for (rows = area->height; rows--; ) {
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  494  			src = rowaddr(info, y1) + (area->sx >> 3);
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  495  			dest = rowaddr(info, y2) + (area->dx >> 3);
529ed806d4540d2 drivers/video/hgafb.c Brent Cook     2010-12-31 @496  			memmove(dest, src, (area->width >> 3));
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  497  			y1++;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  498  			y2++;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  499  		}
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  500  	} else {
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  501  		y1 = area->sy + area->height - 1;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  502  		y2 = area->dy + area->height - 1;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  503  
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  504  		for (rows = area->height; rows--;) {
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  505  			src = rowaddr(info, y1) + (area->sx >> 3);
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  506  			dest = rowaddr(info, y2) + (area->dx >> 3);
529ed806d4540d2 drivers/video/hgafb.c Brent Cook     2010-12-31  507  			memmove(dest, src, (area->width >> 3));
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  508  			y1--;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  509  			y2--;
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  510  		}
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  511  	}
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  512  }
^1da177e4c3f415 drivers/video/hgafb.c Linus Torvalds 2005-04-16  513  

:::::: The code at line 496 was first introduced by commit
:::::: 529ed806d4540d23ca2f68b28c3715d1566fc3ac video: Fix the HGA framebuffer driver

:::::: TO: Brent Cook <busterb@gmail.com>
:::::: CC: Paul Mundt <lethal@linux-sh.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2024-12-03  3:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03  3:17 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-26 15:09 drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) 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=202412031102.G0OBzQ8g-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox