[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU27TG_rpd=WTRPRcY22A4j4aN-6d_8OmK2aNpX06G3ig@mail.gmail.com>
Date: Tue, 28 Jun 2022 09:27:21 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Kees Cook <keescook@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>, dm-devel@...hat.com,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
KVM list <kvm@...r.kernel.org>,
Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
DRI Development <dri-devel@...ts.freedesktop.org>,
netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
linux-can@...r.kernel.org,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
linux1394-devel@...ts.sourceforge.net, io-uring@...r.kernel.org,
lvs-devel@...r.kernel.org,
MTD Maling List <linux-mtd@...ts.infradead.org>,
kasan-dev <kasan-dev@...glegroups.com>,
Linux MMC List <linux-mmc@...r.kernel.org>,
nvdimm@...ts.linux.dev,
NetFilter <netfilter-devel@...r.kernel.org>,
coreteam@...filter.org, linux-perf-users@...r.kernel.org,
linux-raid@...r.kernel.org, linux-sctp@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
scsi <linux-scsi@...r.kernel.org>,
target-devel <target-devel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
V9FS Developers <v9fs-developer@...ts.sourceforge.net>,
linux-rdma <linux-rdma@...r.kernel.org>,
ALSA Development Mailing List <alsa-devel@...a-project.org>,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] treewide: uapi: Replace zero-length arrays with
flexible-array members
Hi Gustavo,
Thanks for your patch!
On Mon, Jun 27, 2022 at 8:04 PM Gustavo A. R. Silva
<gustavoars@...nel.org> 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].
These rules apply to the kernel, but uapi is not considered part of the
kernel, so different rules apply. Uapi header files should work with
whatever compiler that can be used for compiling userspace.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists