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  linux-cve-announce  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]
Message-Id: <176097835143.28490.789079417051480319.b4-ty@kernel.dk>
Date: Mon, 20 Oct 2025 10:39:11 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@...il.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
 skhan@...uxfoundation.org, david.hunter.linux@...il.com, khalid@...nel.org, 
 linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] blk-mq: use struct_size() in kmalloc()


On Sat, 18 Oct 2025 22:38:13 +0100, Mehdi Ben Hadj Khelifa wrote:
> Change struct size calculation to use struct_size()
> to align with new recommended practices[1] which quotes:
> "Another common case to avoid is calculating the size of a structure with
> a trailing array of others structures, as in:
> 
> header = kzalloc(sizeof(*header) + count * sizeof(*header->item),
>                  GFP_KERNEL);
> 
> [...]

Applied, thanks!

[1/1] blk-mq: use struct_size() in kmalloc()
      commit: e5a82249d88c7063c4ac998704b0ae5784013976

Best regards,
-- 
Jens Axboe




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ