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, 12 Jan 2024 08:26:40 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: David Lechner <dlechner@...libre.com>, Jonathan Cameron
 <jic23@...nel.org>,  Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski
 <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
 Michael Hennerich <michael.hennerich@...log.com>,  Nuno
 Sá <nuno.sa@...log.com>, Frank Rowand
 <frowand.list@...il.com>, Thierry Reding <thierry.reding@...il.com>, Uwe
 Kleine-König <u.kleine-koenig@...gutronix.de>, Jonathan
 Corbet <corbet@....net>,  linux-spi@...r.kernel.org,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-doc@...r.kernel.org, linux-pwm@...r.kernel.org, 
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/13] spi: add core support for controllers with
 offload capabilities

On Thu, 2024-01-11 at 15:41 +0000, Mark Brown wrote:
> On Thu, Jan 11, 2024 at 03:11:32PM +0100, Nuno Sá wrote:
> > On Thu, 2024-01-11 at 13:33 +0000, Mark Brown wrote:
> 
> > > I tend to agree that we shouldn't be exposing this to SPI device drivers
> > > however we will want to keep track of if the unit is busy, and designing
> > > it to cope with multiple offloads does seem like sensible future
> > > proofing.  There's also the possibility that one engine might be able to
> 
> > Fair enough. But wouldn't a simple DT integer property (handled by the spi core)
> > to identify the offload index be easier for SPI device drivers? We could still
> > have dedicated interfaces for checking if the unit is busy or not... The point
> > is that we would not need an explicit get() from SPI drivers.
> 
> It feels like we'd need a get/release operation of some kind for mutual
> exclusion, it's not just the discovery it's also figuring out if the
> hardware is in use at a given moment.
> 

Hmm did not thought about the busy case. Still, I could see this being easily done on
the controller driver (at least until we have a clear idea if this is useful or if it
will attract more users) or even at the spi core on the prepare + unprepare
interfaces. A flag could be enough to return EBUSY if someone is already in the
process of preparing + enabling the engine. 

Bah, anyways, it's just I'm really not thrilled about that kind of interface in here
but yeah, as long as you think it's worth it...
> 

- Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ