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]
Message-ID: <202201191052.0lVZjaZf-lkp@intel.com>
Date:   Wed, 19 Jan 2022 10:50:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Farzad Farshchi <farzadfr@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Emil Renner Berthing <kernel@...il.dk>
Subject: [esmil:visionfive 72/80] drivers/nvdla/nvdla_gem.c:74:3: warning:
 cast to pointer from integer of different size

tree:   https://github.com/esmil/linux visionfive
head:   e46c3a7e373e6faa03399f1a41c29cf7546c37cb
commit: 22c69dadd3685e2d35fb43f4da3bb7fe43f2548c [72/80] nvdla: add NVDLA driver
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220119/202201191052.0lVZjaZf-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/esmil/linux/commit/22c69dadd3685e2d35fb43f4da3bb7fe43f2548c
        git remote add esmil https://github.com/esmil/linux
        git fetch --no-tags esmil visionfive
        git checkout 22c69dadd3685e2d35fb43f4da3bb7fe43f2548c
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvdla/

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

All warnings (new ones prefixed by >>):

   drivers/nvdla/nvdla_gem.c: In function 'nvdla_fill_task_desc':
>> drivers/nvdla/nvdla_gem.c:74:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      74 |   (void __user *)local_task->address_list,
         |   ^


vim +74 drivers/nvdla/nvdla_gem.c

    58	
    59	static int32_t nvdla_fill_task_desc(struct nvdla_ioctl_submit_task *local_task,
    60					struct nvdla_task *task)
    61	{
    62		struct nvdla_mem_handle *handles;
    63	
    64		/* update task desc fields */
    65		task->num_addresses = local_task->num_addresses;
    66	
    67		handles = kzalloc(local_task->num_addresses *
    68					sizeof(struct nvdla_mem_handle), GFP_KERNEL);
    69		if (handles == NULL)
    70			return -EFAULT;
    71	
    72		/* get user addresses list */
    73		if (copy_from_user(handles,
  > 74			(void __user *)local_task->address_list,
    75			(task->num_addresses *
    76				sizeof(struct nvdla_mem_handle)))) {
    77			pr_err("failed to copy address list from user ptr\n");
    78			kfree(handles);
    79			return -EFAULT;
    80		}
    81	
    82		task->address_list = handles;
    83		return 0;
    84	}
    85	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ