On Tue, Apr 22, 2025 at 01:24:22PM +0300, Dan Carpenter wrote:
>
> This is exactly what Kees did with the mass conversion to
> struct_size(). I occasionally run across places where Kees's mass
> conversion patches did fix real integer overflow bugs.
The point is that the reqsize shouldn't even ex
On Mon, Apr 21, 2025 at 08:05:43PM +0800, 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(
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 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);
> + req = kmalloc(siz
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
arguments, b
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 prevent possi
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 prevent possible overflow problem.
Signed-off-by: Su Hui
-
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 | 3 ++-
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 | 3 ++-
include/crypto/akcipher.h | 4 +++-
include/cry
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/crypto/kp
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 changed, 7 in
11 matches
Mail list logo