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:	Fri, 22 Feb 2008 11:02:28 -0800
From:	David Brownell <david-b@...bell.net>
To:	nforrester@...i.edu
Cc:	spi-devel-general@...ts.sourceforge.net, marc.pignat@...s.ch,
	linux-kernel@...r.kernel.org, anemo@....ocn.ne.jp
Subject: Re: [spi-devel-general] [PATCH] atmel_spi: support zero length	
 transfer

> >> David, do you think writing 0 bytes is a valid use of this API?
> >
> > Just a zero byte transfer ... no, though it depends what you mean
> > by "valid".  (I'm not sure I'd expect all controller drivers to
> > reject such requests.)  That has no effect on bits-on-the-wire,
> > and would make trouble for various DMA engines.
>
> FWIW, the pxa2xx_spi driver does not, near as I can tell, reject zero
> length transfers, it will go through the motions, the same as for any
> other transfer.

Makes sense to me ... although:

> However, if the transfer is by DMA, note that the PXA255 and PXA270
> Developer's Manuals have the following language regarding DMA lengths:
>
> 	LEN = 0 means zero bytes for descriptor-fetch transactions.
> 	LEN = 0 is an invalid setting for no-descriptor-fetch
> 	transactions. ...
>
> Because the pxa2xx_spi driver does not currently use DMA descriptors,
> zero length DMAs are invalid.

In that case the pxa2xx_spi driver should add a special case to
avoid starting such transfers in DMA mode.


> > Passing zero bytes to get an inline delay at an exact spot in the
> > overall protocol message ... I don't see why not.  Better than
> > adding delay fields for every spot it might be needed by various
> > oddball devices, for sure!!
>
> I agree with Marc: any such delay will be undefined, in the general
> case.  It might work for a specific driver implementation.

Is that what Marc said?  I couldn't tell.  In any case, I disagree;
the semantics of that delay are clearly defined.

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ