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 52177C433FE for ; Tue, 25 Jan 2022 15:35:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FCC86B008A; Tue, 25 Jan 2022 10:35:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5847E8D0001; Tue, 25 Jan 2022 10:35:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FEBB6B0092; Tue, 25 Jan 2022 10:35:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 2D16F6B008A for ; Tue, 25 Jan 2022 10:35:09 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D0BE28248D52 for ; Tue, 25 Jan 2022 15:35:08 +0000 (UTC) X-FDA: 79069207896.13.797D744 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf29.hostedemail.com (Postfix) with ESMTP id D4B69120008 for ; Tue, 25 Jan 2022 15:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643124907; x=1674660907; h=date:from:to:cc:subject:message-id:mime-version; bh=i862k2PJZ8OVz4T2d1qJz+v4GMLienytKmX7nfr6Ntg=; b=THOVmbyeDw/SZwdq9OwKZcDAyFleSZx9d0dc5mrdc4c3X2/2C7ACioeN mlGowgoJ00445CwamXBYUxjQI0knIEuQQfBVPTCrdQlmyK/NrFhPovQFC 1qRs4iwPP4MgPApVym+16OCz2qgoQv/yh93kA3AqjqhdaedqXf4pBoT2q EheRviKNiVxkgR2QbRq9816TjfNyu3vf/hGk4bF5SniKsJw8wigqfRplb L+CXXI2Nu4dbdkGDns0LaLhjM390sbX+YXlYqcHrVRp/GrZeqCsEKqLb6 tbRQteFrWb313ogxttfAxleCGw/dSW+UhOmBFsFbvKMtbwcvFHFau8Da+ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="332681964" X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="332681964" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 07:35:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="534773374" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 25 Jan 2022 07:35:04 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nCNqZ-000K5i-RG; Tue, 25 Jan 2022 15:35:03 +0000 Date: Tue, 25 Jan 2022 23:34:44 +0800 From: kernel test robot To: Kees Cook Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 1562/1734] drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202201252343.zmRvopf3-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-Server: rspam04 X-Rspamd-Queue-Id: D4B69120008 X-Rspam-User: nil Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=THOVmbye; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf29.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.43) smtp.mailfrom=lkp@intel.com X-Stat-Signature: 91kxmxjtx797rr4zic5f8rxzjxcfyo6n X-HE-Tag: 1643124907-398987 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: d25ee88530253138d0b20d43511ca5acbda4e9f7 commit: 602670289b69b2fded3a0b2240c4877e3a015ac6 [1562/1734] fortify: Detect struct member overflows in memcpy() at compile-time config: s390-randconfig-s031-20220124 (https://download.01.org/0day-ci/archive/20220125/202201252343.zmRvopf3-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # 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=602670289b69b2fded3a0b2240c4877e3a015ac6 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 602670289b69b2fded3a0b2240c4877e3a015ac6 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash drivers/mtd/nand/raw/ drivers/pci/endpoint/functions/ 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/cirrusfb.c:866:30: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:867:38: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:871:40: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:873:25: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:876:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:877:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:878:27: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:879:29: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:1245:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:1246:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/video/fbdev/cirrusfb.c:1247:17: sparse: sparse: cast removes address space '__iomem' of expression >> drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@ drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void const * drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base >> drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@ drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void const * drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got char [noderef] __iomem *screen_base @@ drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void * drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base -- >> drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *[assigned] dst_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void const * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] dst_addr drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *[assigned] src_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void const * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] src_addr >> drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *[assigned] dst_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void const * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] dst_addr drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *[assigned] src_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void const * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] src_addr drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *[assigned] dst_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] dst_addr drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *[assigned] src_addr @@ drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: expected void const * drivers/pci/endpoint/functions/pci-epf-test.c:288:17: sparse: got void [noderef] __iomem *[assigned] src_addr -- drivers/video/fbdev/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@ drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const * drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src drivers/video/fbdev/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@ drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const * drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src drivers/video/fbdev/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@ drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const * drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src >> drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@ drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void const * drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst >> drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@ drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void const * drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@ drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void * drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst vim +1852 drivers/video/fbdev/cirrusfb.c ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1809 8503df65976d0f8 drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1810 static void cirrusfb_imageblit(struct fb_info *info, 8503df65976d0f8 drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1811 const struct fb_image *image) ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1812 { ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1813 struct cirrusfb_info *cinfo = info->par; 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1814 unsigned char op = (info->var.bits_per_pixel == 24) ? 0xc : 0x4; ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1815 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1816 if (info->state != FBINFO_STATE_RUNNING) 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1817 return; df3aafd57d590d6 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1818 /* Alpine/SD64 does not work at 24bpp ??? */ df3aafd57d590d6 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1819 if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1) df3aafd57d590d6 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1820 cfb_imageblit(info, image); df3aafd57d590d6 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1821 else if ((cinfo->btype == BT_ALPINE || cinfo->btype == BT_SD64) && df3aafd57d590d6 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1822 op == 0xc) ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1823 cfb_imageblit(info, image); 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1824 else { 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1825 unsigned size = ((image->width + 7) >> 3) * image->height; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1826 int m = info->var.bits_per_pixel; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1827 u32 fg, bg; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1828 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1829 if (info->var.bits_per_pixel == 8) { 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1830 fg = image->fg_color; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1831 bg = image->bg_color; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1832 } else { 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1833 fg = ((u32 *)(info->pseudo_palette))[image->fg_color]; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1834 bg = ((u32 *)(info->pseudo_palette))[image->bg_color]; 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1835 } 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1836 if (info->var.bits_per_pixel == 24) { 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1837 /* clear background first */ 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1838 cirrusfb_RectFill(cinfo->regbase, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1839 info->var.bits_per_pixel, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1840 (image->dx * m) / 8, image->dy, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1841 (image->width * m) / 8, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1842 image->height, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1843 bg, bg, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1844 info->fix.line_length, 0x40); 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1845 } 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1846 cirrusfb_RectFill(cinfo->regbase, 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1847 info->var.bits_per_pixel, 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1848 (image->dx * m) / 8, image->dy, 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1849 (image->width * m) / 8, image->height, 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1850 fg, bg, 7cade31cabec33c drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1851 info->fix.line_length, op); 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 @1852 memcpy(info->screen_base, image->data, size); 9e8480625332071 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1853 } ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1854 } ^1da177e4c3f415 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1855 :::::: The code at line 1852 was first introduced by commit :::::: 9e848062533207130667f6eaa748549367ccbedf cirrusfb: add imageblit function :::::: TO: Krzysztof Helt :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org