The define of ALG_MAX_PAGES is relevant for user space as this macro defines the maximum number of pages to be processed in one go by vmsplice/splice. If user space does not obey that limit, the calling thread will hang until a recvmsg is called (by another thread). As user space should have the ability to prevent such blocks, it needs to know about the limit. Therefore, the define is moved to the uapi header file. Signed-off-by: Stephan Mueller <smueller@xxxxxxxxxx> --- include/crypto/if_alg.h | 2 -- include/uapi/linux/if_alg.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index 018afb2..fb00376 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h @@ -20,8 +20,6 @@ #include <linux/types.h> #include <net/sock.h> -#define ALG_MAX_PAGES 16 - struct crypto_async_request; struct alg_sock { diff --git a/include/uapi/linux/if_alg.h b/include/uapi/linux/if_alg.h index f2acd2f..96af72f 100644 --- a/include/uapi/linux/if_alg.h +++ b/include/uapi/linux/if_alg.h @@ -39,4 +39,7 @@ struct af_alg_iv { #define ALG_OP_DECRYPT 0 #define ALG_OP_ENCRYPT 1 +/* Maximum number of pages to be processed */ +#define ALG_MAX_PAGES 16 + #endif /* _LINUX_IF_ALG_H */ -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html