From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C94BC433EF for ; Thu, 24 Feb 2022 01:48:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 078AE8D0002; Wed, 23 Feb 2022 20:48:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 027EF8D0001; Wed, 23 Feb 2022 20:48:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E32598D0002; Wed, 23 Feb 2022 20:48:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id BF8788D0001 for ; Wed, 23 Feb 2022 20:48:01 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 41C449BE5A for ; Thu, 24 Feb 2022 01:48:01 +0000 (UTC) X-FDA: 79175987562.29.35F2032 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf02.hostedemail.com (Postfix) with ESMTP id 1304980006 for ; Thu, 24 Feb 2022 01:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645667280; x=1677203280; h=date:from:to:cc:subject:message-id:mime-version; bh=XVWmRSYlaKxQMIFOHMekWW4mTdpiD7OX59oPCk2m2L4=; b=OFToTlFPyRix9zPGrfXNFyykRDvQaOrwggEtZr4SRnM3fIKv2YVQR3Zu QObuDv0gYGqKH4kKMKH3n48zylqLcVQHZEmxh9UDhLJxqI1LrJYbORCRS BJ2Wzz5aK8OejPJajLed2nAOTWHZseaoGggG07J9nmlyzTaGlO1iww8FH YlIYQ1LAqm/2EimE715chy2/wkSGdpgByp+LhKVM/8kD/5BPT3iXy+pTT F7KcRjpo61EkgejOUoNwh5f2+sM2dva1KXKwVvzMz+v9Az8n8HwQrSP5i 0Ws3muiB9HuCDJPnd6hJ7SMpkIxBHvS/cCtZ4AdeH6Xch+Yg29Q1Rfx3k A==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="312844255" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="312844255" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 17:47:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="776892139" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by fmsmga006.fm.intel.com with ESMTP; 23 Feb 2022 17:47:56 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nN3Ea-000259-87; Thu, 24 Feb 2022 01:47:56 +0000 Date: Thu, 24 Feb 2022 09:47:50 +0800 From: kernel test robot To: Kees Cook Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 4916/7526] drivers/video/fbdev/hgafb.c:496:25: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202202240946.dxiu4YCc-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 1304980006 X-Stat-Signature: of8bxmx1c5syw7nzj11bp19qp165ephm Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=OFToTlFP; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf02.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1645667279-449387 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 196d330d7fb1e7cc0d85641c89ce4602cb36f12e commit: 938a000e3f9bead24ea753286b3e4d2423275c9e [4916/7526] fortify: Detect struct member overflows in memmove() at compile-time config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220224/202202240946.dxiu4YCc-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=938a000e3f9bead24ea753286b3e4d2423275c9e git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 938a000e3f9bead24ea753286b3e4d2423275c9e # save the config file to linux build tree mkdir build_dir make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/video/fbdev/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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 ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 482 ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 483 static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area) ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 484 { ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 485 u_int rows, y1, y2; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 486 u8 __iomem *src; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 487 u8 __iomem *dest; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 488 ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 489 if (area->dy <= area->sy) { ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 490 y1 = area->sy; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 491 y2 = area->dy; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 492 ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 493 for (rows = area->height; rows--; ) { ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 494 src = rowaddr(info, y1) + (area->sx >> 3); ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 495 dest = rowaddr(info, y2) + (area->dx >> 3); 529ed806d4540d drivers/video/hgafb.c Brent Cook 2010-12-31 @496 memmove(dest, src, (area->width >> 3)); ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 497 y1++; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 498 y2++; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 499 } ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 500 } else { ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 501 y1 = area->sy + area->height - 1; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 502 y2 = area->dy + area->height - 1; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 503 ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 504 for (rows = area->height; rows--;) { ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 505 src = rowaddr(info, y1) + (area->sx >> 3); ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 506 dest = rowaddr(info, y2) + (area->dx >> 3); 529ed806d4540d drivers/video/hgafb.c Brent Cook 2010-12-31 507 memmove(dest, src, (area->width >> 3)); ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 508 y1--; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 509 y2--; ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 510 } ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 511 } ^1da177e4c3f41 drivers/video/hgafb.c Linus Torvalds 2005-04-16 512 } ^1da177e4c3f41 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 :::::: CC: Paul Mundt --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org