lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 18 May 2022 15:03:37 -0700
From:   Kees Cook <keescook@...omium.org>
To:     GUO Zihua <guozihua@...wei.com>
Cc:     keyrings@...r.kernel.org, linux-crypto@...r.kernel.org,
        davem@...emloft.net, dhowells@...hat.com,
        herbert@...dor.apana.org.au, gustavoars@...nel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3] crypto: Use struct_size() helper in kmalloc()

On Wed, May 18, 2022 at 02:25:18PM +0800, GUO Zihua wrote:
> Make use of struct_size() helper for structures containing flexible array
> member instead of sizeof() which prevents potential issues, as well as
> increase readability.
> 
> Reference: https://lore.kernel.org/all/CAHk-=wiGWjxs7EVUpccZEi6esvjpHJdgHQ=vtUeJ5crL62hx9A@mail.gmail.com/
> 
> Signed-off-by: GUO Zihua <guozihua@...wei.com>

Reviewed-by: Kees Cook <keescook@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists