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] [day] [month] [year] [list]
Date:   Thu, 14 Nov 2019 16:19:18 +0800
From:   Chuanhong Guo <gch981213@...il.com>
To:     kbuild test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-mtd@...ts.infradead.org,
        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,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading

Hi all!

On Tue, Nov 12, 2019 at 3:29 PM kbuild test robot <lkp@...el.com> wrote:
> [...]
> 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)
>          ^
>

DMA mode on this controller requires that source address, destination
address and reading
length should all be 16-byte aligned. And because of this, I didn't
use the bounce buffer
provided by spi-nor framework and allocate its own one.
Should I just cast all these pointers to ulong or are there better
ways to check for address
alignments and/or obtain an aligned buffer?

Regards,
Chuanhong Guo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ