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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 19 Dec 2022 22:33:28 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Fomichev <dmitry.fomichev@....com>
Cc:     oe-kbuild-all@...ts.linux.dev, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Stefan Hajnoczi <stefanha@...il.com>
Subject: [mst-vhost:vhost 5/52] drivers/block/virtio_blk.c:539:21: warning:
 assignment to 'void *' from 'int' makes pointer from integer without a cast

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   ebf31b1807d09448f902d02a0267dd344a194368
commit: b83e3ac7a0ec091edb31afdb1626e86672974670 [5/52] virtio-blk: add support for zoned block devices
config: mips-allyesconfig
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=b83e3ac7a0ec091edb31afdb1626e86672974670
        git remote add mst-vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
        git fetch --no-tags mst-vhost vhost
        git checkout b83e3ac7a0ec091edb31afdb1626e86672974670
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/block/

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

All warnings (new ones prefixed by >>):

   drivers/block/virtio_blk.c: In function 'virtblk_alloc_report_buffer':
   drivers/block/virtio_blk.c:539:23: error: implicit declaration of function '__vmalloc'; did you mean '__kmalloc'? [-Werror=implicit-function-declaration]
     539 |                 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
         |                       ^~~~~~~~~
         |                       __kmalloc
>> drivers/block/virtio_blk.c:539:21: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     539 |                 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
         |                     ^
   cc1: some warnings being treated as errors


vim +539 drivers/block/virtio_blk.c

   518	
   519	#ifdef CONFIG_BLK_DEV_ZONED
   520	static void *virtblk_alloc_report_buffer(struct virtio_blk *vblk,
   521						  unsigned int nr_zones,
   522						  unsigned int zone_sectors,
   523						  size_t *buflen)
   524	{
   525		struct request_queue *q = vblk->disk->queue;
   526		size_t bufsize;
   527		void *buf;
   528	
   529		nr_zones = min_t(unsigned int, nr_zones,
   530				 get_capacity(vblk->disk) >> ilog2(zone_sectors));
   531	
   532		bufsize = sizeof(struct virtio_blk_zone_report) +
   533			nr_zones * sizeof(struct virtio_blk_zone_descriptor);
   534		bufsize = min_t(size_t, bufsize,
   535				queue_max_hw_sectors(q) << SECTOR_SHIFT);
   536		bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
   537	
   538		while (bufsize >= sizeof(struct virtio_blk_zone_report)) {
 > 539			buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
   540			if (buf) {
   541				*buflen = bufsize;
   542				return buf;
   543			}
   544			bufsize >>= 1;
   545		}
   546	
   547		return NULL;
   548	}
   549	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (327628 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ