Skip to content

Commit 29869b6

Browse files
committed
crypto: acomp - define max size for destination
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Giovanni Cabiddu <[email protected]> commit 5fc8041 The acomp API allows to send requests with a NULL destination buffer. In this case, the algorithm implementation needs to allocate the destination scatter list, perform the operation and return the buffer to the user. For decompression, data is likely to expand and be bigger than the allocated buffer. Define the maximum size (128KB) that acomp implementations will allocate for decompression operations as destination buffer when they receive a request with a NULL destination buffer. Suggested-by: Herbert Xu <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]> (cherry picked from commit 5fc8041) Signed-off-by: Jonathan Maple <[email protected]>
1 parent d802754 commit 29869b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/crypto/acompress.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/crypto.h>
1212

1313
#define CRYPTO_ACOMP_ALLOC_OUTPUT 0x00000001
14+
#define CRYPTO_ACOMP_DST_MAX 131072
1415

1516
/**
1617
* struct acomp_req - asynchronous (de)compression request

0 commit comments

Comments
 (0)