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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Sep 2020 18:48:14 -0700 (PDT)
From:   David Miller <>
Subject: Re: [PATCH][next] qed/qed_ll2: Replace one-element array with
 flexible-array member

From: "Gustavo A. R. Silva" <>
Date: Mon, 28 Sep 2020 10:16:17 -0500

> There is a regular need in the kernel to provide a way to declare having
> a dynamically sized set of trailing elements in a structure. Kernel code
> should always use “flexible array members”[1] for these cases. The older
> style of one-element or zero-length arrays should no longer be used[2].
> Refactor the code according to the use of a flexible-array member in
> struct qed_ll2_tx_packet, instead of a one-element array and use the
> struct_size() helper to calculate the size for the allocations. Commit
> f5823fe6897c ("qed: Add ll2 option to limit the number of bds per packet")
> was used as a reference point for these changes.
> Also, it's important to notice that flexible-array members should occur
> last in any structure, and structures containing such arrays and that
> are members of other structures, must also occur last in the containing
> structure. That's why _cur_completing_packet_ is now moved to the bottom
> in struct qed_ll2_tx_queue. _descq_mem_ and _cur_send_packet_ are also
> moved for unification.
> [1]
> [2]
> Tested-by: kernel test robot <>

I find such tags enormously misleading, because the kernel test robot
didn't perform any functional testing of this change and honestly
that's the part I'm more concerned about rather than "does it build".

Anyone can check test the build.

> Link:
> Signed-off-by: Gustavo A. R. Silva <>


Powered by blists - more mailing lists