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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Apr 2017 08:00:55 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Wu Hao <hao.wu@...el.com>
Cc:     kbuild-all@...org, atull@...nel.org, moritz.fischer@...us.com,
        linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
        luwei.kang@...el.com, yi.z.zhang@...el.com, hao.wu@...el.com,
        Tim Whisonant <tim.whisonant@...el.com>,
        Enno Luebbers <enno.luebbers@...el.com>,
        Shiva Rao <shiva.rao@...el.com>,
        Christopher Rauer <christopher.rauer@...el.com>,
        Xiao Guangrong <guangrong.xiao@...ux.intel.com>
Subject: Re: [PATCH 16/16] fpga: intel: afu: add FPGA_PORT_DMA_MAP/UNMAP
 ioctls support

Hi Wu,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.11-rc4 next-20170331]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Wu-Hao/Intel-FPGA-Device-Drivers/20170401-052017
config: frv-allmodconfig (attached as .config)
compiler: frv-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=frv 

All warnings (new ones prefixed by >>):

   In file included from include/linux/uaccess.h:5:0,
                    from drivers/fpga/intel/afu-dma-region.c:17:
   drivers/fpga/intel/afu-dma-region.c: In function 'afu_dma_map_region':
   arch/frv/include/asm/uaccess.h:63:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define access_ok(type,addr,size) (__range_ok((void __user *)(addr), (size)) == 0)
                                                  ^
   arch/frv/include/asm/uaccess.h:61:60: note: in definition of macro '__range_ok'
    #define __range_ok(addr,size) ___range_ok((unsigned long) (addr), (unsigned long) (size))
                                                               ^~~~
>> drivers/fpga/intel/afu-dma-region.c:291:7: note: in expansion of macro 'access_ok'
     if (!access_ok(VERIFY_WRITE, user_addr, length))
          ^~~~~~~~~

vim +/access_ok +291 drivers/fpga/intel/afu-dma-region.c

   275			       u64 user_addr, u64 length, u64 *iova)
   276	{
   277		struct fpga_afu_dma_region *region;
   278		int ret;
   279	
   280		/*
   281		 * Check Inputs, only accept page-aligned user memory region with
   282		 * valid length.
   283		 */
   284		if (!PAGE_ALIGNED(user_addr) || !PAGE_ALIGNED(length) || !length)
   285			return -EINVAL;
   286	
   287		/* Check overflow */
   288		if (user_addr + length < user_addr)
   289			return -EINVAL;
   290	
 > 291		if (!access_ok(VERIFY_WRITE, user_addr, length))
   292			return -EINVAL;
   293	
   294		region = kzalloc(sizeof(*region), GFP_KERNEL);
   295		if (!region)
   296			return -ENOMEM;
   297	
   298		region->user_addr = user_addr;
   299		region->length = length;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ