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]
Message-ID: <20160309185024.GN55664@google.com>
Date:	Wed, 9 Mar 2016 10:50:24 -0800
From:	Brian Norris <computersforpeace@...il.com>
To:	Jiancheng Xue <xuejiancheng@...wei.com>
Cc:	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	dwmw2@...radead.org, zajec5@...il.com,
	boris.brezillon@...e-electrons.com, jteki@...nedev.com,
	ezequiel@...guardiasur.com.ar, juhosg@...nwrt.org,
	shijie.huang@...el.com, mika.westerberg@...ux.intel.com,
	furquan@...gle.com, han.xu@...escale.com,
	fabio.estevam@...escale.com, manabian@...il.com,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mtd@...ts.infradead.org, yanhaifeng@...ilicon.com,
	yanghongwei@...ilicon.com, suwenping@...ilicon.com,
	raojun@...ilicon.com, ml.yang@...ilicon.com, gaofei@...ilicon.com,
	zhangzhenxing@...ilicon.com, xuejiancheng@...ilicon.com,
	Binquan Peng <pengbinquan@...wei.com>
Subject: Re: [RESEND PATCH v7] mtd: spi-nor: add hisilicon spi-nor flash
 controller driver

On Tue, Mar 08, 2016 at 05:25:13PM +0800, Jiancheng Xue wrote:
> On 2016/3/8 6:52, Brian Norris wrote:
> [...]
> >> +static void hisi_spi_nor_dma_transfer(struct spi_nor *nor, u32 start_off,
> >> +		u32 dma_buf, u32 len, u8 op_type)
> > 
> > Does this controller support 64-bit addresses? What if you see LPAE, or
> > an ARM64 CPU? It'd be nice if you don't truncate potentially 64-bit
> > dma_buf down to u32.
> > 
> > Brian
> > 
> No, this controller just supports 32-bit addresses. So I think I have to truncate 64-bit dma_buf. :(

Then you should handle this proactively. Either some kind of WARN_ON and
error condition, or I think dma_set_mask_and_coherent(dev,
DMA_BIT_MASK(32)) should be able to ensure you get addresses in the
appropriate range?

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ