On 2025/4/21 20:05, Herbert Xu wrote:
On Mon, Apr 21, 2025 at 01:51:06PM +0800, Su Hui wrote:
@@ -433,7 +434,7 @@ static inline struct aead_request
*aead_request_alloc(struct crypto_aead *tfm,
{
struct aead_request *req;
- req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp
On 2025/4/21 16:46, Su Hui wrote:
On 2025/4/21 16:32, Christophe JAILLET wrote:
Le 21/04/2025 à 09:43, Su Hui a écrit :
On 2025/4/21 15:10, Christophe JAILLET wrote:
Le 21/04/2025 à 07:51, Su Hui a écrit :
It's safer to use size_add() to replace open-coded aithmetic in
allocator
argu
On 2025/4/21 16:32, Christophe JAILLET wrote:
Le 21/04/2025 à 09:43, Su Hui a écrit :
On 2025/4/21 15:10, Christophe JAILLET wrote:
Le 21/04/2025 à 07:51, Su Hui a écrit :
It's safer to use size_add() to replace open-coded aithmetic in
allocator
arguments, because size_add() can pr
using size_add() to hardening kmalloc() and remove some redundant include
headers.
Compile test only.
v2:
- remove redundant include headers in v1 ().
- add a patch to remove other redundant headers.
v1:
- https://lore.kernel.org/all/20250421055104.663552-1-su...@nfschina.com/
Su Hui (2
ready
included .
Remove these redundant headers to save some code space. Also remove
when already included .
Signed-off-by: Su Hui
---
include/crypto/acompress.h| 4
include/crypto/aead.h | 4
include/crypto/aes.h | 1 -
include/crypto/akcipher.h | 1 -
incl
It's safer to use size_add() to replace open-coded aithmetic in allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: Su Hui
---
include/crypto/aead.h | 2 +-
include/crypto/akcipher.h | 3 ++-
include/crypto/kpp.h | 2 +-
3 files chang
On 2025/4/21 15:10, Christophe JAILLET wrote:
Le 21/04/2025 à 07:51, Su Hui a écrit :
It's safer to use size_add() to replace open-coded aithmetic in
allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: Su Hui
---
include/crypto/aead.h
On 2025/4/21 13:51, Su Hui wrote:
It's safer to use size_add() to replace open-coded aithmetic in allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: Su Hui
---
include/crypto/aead.h | 3 ++-
include/crypto/akcipher.h | 4 +++-
include/c
It's safer to use size_add() to replace open-coded aithmetic in allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: Su Hui
---
include/crypto/aead.h | 3 ++-
include/crypto/akcipher.h | 4 +++-
include/crypto/kpp.h | 3 ++-
3 files chang