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]
Message-ID: <201911121507.ANXNexIL%lkp@intel.com>
Date:   Tue, 12 Nov 2019 15:28:52 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Chuanhong Guo <gch981213@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-mtd@...ts.infradead.org,
        Chuanhong Guo <gch981213@...il.com>,
        Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading

Hi Chuanhong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm-soc/for-next]
[cannot apply to v5.4-rc7 next-20191111]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Chuanhong-Guo/mtd-mtk-quadspi-add-support-for-DMA-reading/20191112-145019
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc 

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

All warnings (new ones prefixed by >>):

   drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read_dma_bounce':
>> drivers/mtd/spi-nor/mtk-quadspi.c:349:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     mem_unaligned_len = (u32)buf % MTK_NOR_DMA_ALIGN;
                         ^
   drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read':
   drivers/mtd/spi-nor/mtk-quadspi.c:369:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         (u32)buffer % MTK_NOR_DMA_ALIGN || from % MTK_NOR_DMA_ALIGN)
         ^

vim +349 drivers/mtd/spi-nor/mtk-quadspi.c

   330	
   331	static ssize_t mtk_nor_read_dma_bounce(struct mtk_nor *mtk_nor, loff_t from,
   332					       size_t length, u_char *buffer)
   333	{
   334		ssize_t nor_unaligned_len = from % MTK_NOR_DMA_ALIGN;
   335		loff_t read_from = from & ~(MTK_NOR_DMA_ALIGN - 1);
   336		ssize_t read_len;
   337		u_char *buf;
   338		u_char *bouncebuf;
   339		size_t mem_unaligned_len;
   340	
   341		if (length > MTK_NOR_MAX_BBUF_READ)
   342			length = MTK_NOR_MAX_BBUF_READ;
   343		read_len = length + nor_unaligned_len + MTK_NOR_DMA_ALIGN;
   344	
   345		buf = kmalloc(read_len + MTK_NOR_DMA_ALIGN, GFP_KERNEL);
   346		if (!buf)
   347			return -ENOMEM;
   348	
 > 349		mem_unaligned_len = (u32)buf % MTK_NOR_DMA_ALIGN;
   350		bouncebuf = (buf + MTK_NOR_DMA_ALIGN) - mem_unaligned_len;
   351	
   352		read_len = mtk_nor_read_dma(mtk_nor, read_from, read_len, bouncebuf);
   353		if (read_len > 0)
   354			memcpy(buffer, bouncebuf + nor_unaligned_len, length);
   355	
   356		kfree(buf);
   357		return length;
   358	}
   359	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ