Skip to contentSkip to conversation

Asynchronous usage of PCOMPRESS

DISCUSSION Tom Lendacky 2 participants 2 messages Nov 10, 2014 – Nov 11, 2014 Crypto API

lore
Share & tools
lore
#0 lore raw

Hi Herbert,

Is the PCOMPRESS algorithm supposed to support asynchronous implementations? In other words, are callers expected to handle the -EINPROGRESS or -EAGAIN return codes that can be returned by an asynchronous implementation?

Or is it assumed that if the CRYPTO_ALG_ASYNC flag is not set then the code path must be synchronous? If that's the case, should the pcompress support be updated to look for synchronous implementations if the CRYPTO_ALG_ASYNC flag isn't set or should asynchronous implementations provide a synchronous fallback?

Thanks,
Tom

maintainer
#1 lore raw
Quoted 7 lines · Tom Lendacky

Hi Herbert,

Is the PCOMPRESS algorithm supposed to support asynchronous implementations? In other words, are callers expected to handle the -EINPROGRESS or -EAGAIN return codes that can be returned by an asynchronous implementation?

Quoted 5 lines

Or is it assumed that if the CRYPTO_ALG_ASYNC flag is not set then the code path must be synchronous? If that's the case, should the pcompress support be updated to look for synchronous implementations if the CRYPTO_ALG_ASYNC flag isn't set or should asynchronous implementations provide a synchronous fallback?

The pcomp interface is entirely synchronous so for async support you'll have to create a new interface. pcomp is simply meant to replace the existing compress interface but unfortunately that job has not been completed as yet.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt