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:   Mon, 4 Jan 2021 12:40:44 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     YANG LI <abaci-bugfix@...ux.alibaba.com>
Cc:     davem@...emloft.net, tariqt@...dia.com, ast@...nel.org,
        daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.com,
        andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
        kpsingh@...nel.org, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH] mlx4: style: replace zero-length array with
 flexible-array member.

On Wed, 30 Dec 2020 14:28:51 +0800 YANG LI wrote:
> 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].
> 
> [1] https://en.wikipedia.org/wiki/Flexible_array_member
> [2] https://www.kernel.org/doc/html/v5.9/process/
>     deprecated.html#zero-length-and-one-element-arrays
> 
> Signed-off-by: YANG LI <abaci-bugfix@...ux.alibaba.com>
> Reported-by: Abaci <abaci@...ux.alibaba.com>

This breaks the build with allmodconfig, could you double check?
Are there dependencies?

In file included from drivers/net/ethernet/mellanox/mlx4/en_netdev.c:50:
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h:316:27: error: flexible array member in a struct with no named members
  316 |  struct mlx4_wqe_data_seg data[];
      |                           ^~~~

Powered by blists - more mailing lists