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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150522093714.GS21577@sirena.org.uk>
Date:	Fri, 22 May 2015 10:37:14 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Brian Norris <computersforpeace@...il.com>
Cc:	Michal Suchanek <hramrach@...il.com>,
	linux-sunxi <linux-sunxi@...glegroups.com>,
	Marek Vasut <marex@...x.de>,
	Rafał Miłecki <zajec5@...il.com>,
	Alison Chaiken <alison_chaiken@...tor.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Bean Huo 霍斌斌 (beanhuo) 
	<beanhuo@...ron.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-mtd@...ts.infradead.org,
	linux-spi <linux-spi@...r.kernel.org>
Subject: Re: [PATCH 2/3] MTD: spi-nor: check for short writes in
 spi_nor_write.

On Fri, May 22, 2015 at 12:25:05AM -0700, Brian Norris wrote:
> On Fri, May 22, 2015 at 12:17:27AM -0700, Brian Norris wrote:

> > Admittedly, as he's using an out-of-tree driver, I'm not
> > sure I know exactly what failure modes he is hitting yet.

> Sorry, I realized I misread here. He's using spi-sunxi. Given that...

> ... is this code even valid?

> static int sun6i_spi_transfer_one(struct spi_master *master,
>                                   struct spi_device *spi,
>                                   struct spi_transfer *tfr)
> {
> ...
> 	/* We don't support transfer larger than the FIFO */
> 	if (tfr->len > SUN6I_FIFO_DEPTH)
> 		return -EINVAL;

> Seems like it should be looping over the transfer in multiple chunks
> instead.

Well, it's not ideal.  Like I say I think that logic probably belongs in
the core rather than individual drivers then we minimise the problems,
if I remember correctly there was the suggestion that the DMA code was
going to follow soon and be used for larger transfers when the original
driver was merged.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ