[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya7+L33dFnm0q+jm@google.com>
Date: Mon, 6 Dec 2021 22:24:47 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Kees Cook <keescook@...omium.org>,
Geliang Tang <geliangtang@...il.com>,
Arnd Bergmann <arnd@...db.de>, Haren Myneni <haren@...ibm.com>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
Zhou Wang <wangzhou1@...ilicon.com>,
linux-crypto <linux-crypto@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] crypto: add zbufsize() interface
On Tue, Dec 07, 2021 at 04:20:29PM +1100, Herbert Xu wrote:
> On Fri, Dec 03, 2021 at 12:49:26PM -0800, Dmitry Torokhov wrote:
> >
> > I must be getting lost in terminology, and it feels to me that what is
> > discussed here is most likely of no interest to a lot of potential
> > users, especially ones that do compression/decompression. In majority of
> > cases they want to simply compress or decompress data, and they just
> > want to do it quickly and with minimal amount of memory consumed. They
> > do not particularly care if the task is being offloaded or executed on
> > the main CPU, either on separate thread or on the same thread, so the
> > discussion about scomp/acomp/etc is of no interest to them. From their
> > perspective they'd be totally fine with a wrapper that would do:
> >
> > int decompress(...) {
> > prepare_request()
> > send_request()
> > wait_for_request()
> > }
> >
> > and from their perspective this would be a synchronous API they are
> > happy with.
>
> You can certainly do that as a Crypto API user. And we do have
> some users who do exactly this (for example, testmgr does that
> when testing async algorithms). However, this can't be a part of
> the API itself since many of our users execute in atomic contexts.
That is what I am confused about: why can't it be a part of API? Users
that are running in atomic contexts would not be able to use it, but we
have a lot of precedents for it. See for example spi_sync() vs
spi_async(). Callers have a choice as to which one to use, based on
their needs.
Thanks.
--
Dmitry
Powered by blists - more mailing lists