On Fri, Nov 25, 2022 at 06:07:39PM +0800, Herbert Xu wrote: > On Fri, Nov 25, 2022 at 10:04:28AM +0000, Giovanni Cabiddu wrote: > > > > Just double checking if I understood correctly. > > At the first iteration, i.e. first call to decompress, allocate a > > destination buffer of 2 * src_len rounded up to 4K. If this job fails > > allocate a destination buffer of 128K and retry. If this fails, terminate. > > Right, that's what I was suggesting. > > Oh and please add the limit to include/crypto/acompress.h so that > it's part of the API. Yes, that is what I was going to do. Is the name of the define ok with you? diff --git a/include/crypto/acompress.h b/include/crypto/acompress.h index cb3d6b1c655d..bc16e0208169 100644 --- a/include/crypto/acompress.h +++ b/include/crypto/acompress.h @@ -11,6 +11,7 @@ #include <linux/crypto.h> #define CRYPTO_ACOMP_ALLOC_OUTPUT 0x00000001 +#define CRYPTO_ACOMP_NULL_DST_LIMIT 131072 /** * struct acomp_req - asynchronous (de)compression request Thanks, -- Giovanni