[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006041322.35912ABB@keescook>
Date: Thu, 4 Jun 2020 13:25:26 -0700
From: Kees Cook <keescook@...omium.org>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: Re: [PATCH] docs: deprecated.rst: Add note to the use of
struct_size() helper
On Thu, Jun 04, 2020 at 01:21:23PM -0500, Gustavo A. R. Silva wrote:
> Yeah. My reasoning for is that it will take a while --at least one
> development cycle more-- to completely get rid of all the 0/1-arrays.
Right -- but we need a place to point people when we tell them "please
don't use 0-byte and 1-byte arrays", and the deprecated.rst is the place
for that.
Having it in deprecated.rst once they're all gone only serves to explain
why various compiler flags are enabled, etc. But while they're being
removed, it serves as a single place to document the issue (as in, much
of the flex-array patch commit log "boilerplate" can actually be
repeated in deprecated.rst.
> But I think we can add this note while I continue working on the flexible-array
> conversions. Once that work is complete, I can go back and update the
> documentation. :)
>
> What do you think?
I think we need to document it at the beginning of the work (and I
should have asked for this earlier). So let's just add a new section on
dynamic array usage, etc. It can include a note about struct_size() as
an example for why 1-byte arrays are so weird. :)
--
Kees Cook
Powered by blists - more mailing lists