tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 196d330d7fb1e7cc0d85641c89ce4602cb36f12e commit: f68f2ff91512c199ec24883001245912afc17873 [4915/7526] fortify: Detect struct member overflows in memcpy() at compile-time config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220224/202202240845.CUPobt2t-lkp@xxxxxxxxx/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=f68f2ff91512c199ec24883001245912afc17873 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 f68f2ff91512c199ec24883001245912afc17873 # 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/pci/endpoint/functions/ drivers/video/fbdev/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> 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/geode/lxfb_ops.c:602:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: got void [noderef] __iomem *gp_regs >> drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: got void [noderef] __iomem *gp_regs drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:602:9: sparse: got void [noderef] __iomem *gp_regs >> drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: got void [noderef] __iomem *dc_regs >> drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: got void [noderef] __iomem *dc_regs drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:603:9: sparse: got void [noderef] __iomem *dc_regs >> drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: got void [noderef] __iomem *vp_regs >> drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: got void [noderef] __iomem *vp_regs drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vp_regs @@ drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:604:9: sparse: got void [noderef] __iomem *vp_regs >> drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: got void [noderef] __iomem * >> drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:605:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:633:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: expected void const * drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: got void [noderef] __iomem * >> drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: expected void * drivers/video/fbdev/geode/lxfb_ops.c:760:9: sparse: got void [noderef] __iomem * -- >> drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs >> drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@ drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs >> drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs >> drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@ drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs >> drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@ drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs >> drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@ drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@ drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs >> drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem * >> drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem * drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@ drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const * drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem * vim +1852 drivers/video/fbdev/cirrusfb.c ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1809 8503df65976d0f drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1810 static void cirrusfb_imageblit(struct fb_info *info, 8503df65976d0f drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1811 const struct fb_image *image) ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1812 { ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1813 struct cirrusfb_info *cinfo = info->par; 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1814 unsigned char op = (info->var.bits_per_pixel == 24) ? 0xc : 0x4; ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1815 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1816 if (info->state != FBINFO_STATE_RUNNING) 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1817 return; df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1818 /* Alpine/SD64 does not work at 24bpp ??? */ df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1819 if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1) df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1820 cfb_imageblit(info, image); df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1821 else if ((cinfo->btype == BT_ALPINE || cinfo->btype == BT_SD64) && df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1822 op == 0xc) ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1823 cfb_imageblit(info, image); 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1824 else { 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1825 unsigned size = ((image->width + 7) >> 3) * image->height; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1826 int m = info->var.bits_per_pixel; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1827 u32 fg, bg; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1828 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1829 if (info->var.bits_per_pixel == 8) { 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1830 fg = image->fg_color; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1831 bg = image->bg_color; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1832 } else { 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1833 fg = ((u32 *)(info->pseudo_palette))[image->fg_color]; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1834 bg = ((u32 *)(info->pseudo_palette))[image->bg_color]; 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1835 } 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1836 if (info->var.bits_per_pixel == 24) { 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1837 /* clear background first */ 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1838 cirrusfb_RectFill(cinfo->regbase, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1839 info->var.bits_per_pixel, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1840 (image->dx * m) / 8, image->dy, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1841 (image->width * m) / 8, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1842 image->height, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1843 bg, bg, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1844 info->fix.line_length, 0x40); 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1845 } 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1846 cirrusfb_RectFill(cinfo->regbase, 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1847 info->var.bits_per_pixel, 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1848 (image->dx * m) / 8, image->dy, 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1849 (image->width * m) / 8, image->height, 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1850 fg, bg, 7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1851 info->fix.line_length, op); 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 @1852 memcpy(info->screen_base, image->data, size); 9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1853 } ^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1854 } ^1da177e4c3f41 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 <krzysztof.h1@xxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx