lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 2 Feb 2021 21:19:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org
Subject: drivers/media/platform/omap/omap_vout.c:979:50: sparse: sparse: non
 size-preserving integer to pointer cast

Hi Mauro,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   88bb507a74ea7d75fa49edd421eaa710a7d80598
commit: a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a media: Kconfig: not all V4L2 platform drivers are for camera
date:   10 months ago
config: powerpc-randconfig-s031-20210202 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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.3-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/media/platform/omap/omap_vout.c:979:50: sparse: sparse: non size-preserving integer to pointer cast

vim +979 drivers/media/platform/omap/omap_vout.c

5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  961  
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  962  static int omap_vout_vb2_prepare(struct vb2_buffer *vb)
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  963  {
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  964  	struct omap_vout_device *vout = vb2_get_drv_priv(vb->vb2_queue);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  965  	struct omapvideo_info *ovid = &vout->vid_info;
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  966  	struct omap_vout_buffer *voutbuf = vb2_to_omap_vout_buffer(vb);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  967  	dma_addr_t buf_phy_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  968  
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  969  	if (vb2_plane_size(vb, 0) < vout->pix.sizeimage) {
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  970  		v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  971  			 "%s data will not fit into plane (%lu < %u)\n",
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  972  			__func__, vb2_plane_size(vb, 0), vout->pix.sizeimage);
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  973  		return -EINVAL;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  974  	}
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  975  
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  976  	vb2_set_plane_payload(vb, 0, vout->pix.sizeimage);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  977  	voutbuf->vbuf.field = V4L2_FIELD_NONE;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  978  
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30 @979  	vout->queued_buf_addr[vb->index] = (u8 *)buf_phy_addr;
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  980  	if (ovid->rotation_type == VOUT_ROT_VRFB)
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  981  		return omap_vout_prepare_vrfb(vout, vb);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil     2019-07-30  982  	return 0;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  983  }
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c    Vaibhav Hiremath 2010-04-11  984  

:::::: The code at line 979 was first introduced by commit
:::::: 256acbebdc3b2ddfad4a5b1aa99488fad34b0f0d media: omap_vout: convert to vb2

:::::: TO: Hans Verkuil <hverkuil-cisco@...all.nl>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (39568 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ