linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] flexible-array transformations for 6.5-rc1
@ 2023-06-28 16:00 Gustavo A. R. Silva
  2023-06-30  0:07 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2023-06-28 16:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Kees Cook, linux-hardening, linux-kernel, Gustavo A. R. Silva

The following changes since commit f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6:

  Linux 6.4-rc2 (2023-05-14 12:51:40 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git tags/flex-array-transformations-6.5-rc1

for you to fetch changes up to 1fa89cccd288cea4370ce08042b749b72ea8b059:

  media: venus: hfi_cmds: Replace fake flex-arrays with flexible-array members (2023-06-11 09:51:08 -0600)

----------------------------------------------------------------
flexible-array transformations for 6.5-rc1

Hi Linus,

Please, pull the following patches that transform zero-length and
one-element arrays into C99 flexible-array members. These patches
have been baking in linux-next for a while.

Thanks
--
Gustavo

----------------------------------------------------------------
Gustavo A. R. Silva (2):
      uapi: wireless: Replace zero-length array with flexible-array member
      media: venus: hfi_cmds: Replace fake flex-arrays with flexible-array members

 drivers/media/platform/qcom/venus/hfi_cmds.h | 8 ++++----
 include/uapi/linux/wireless.h                | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GIT PULL] flexible-array transformations for 6.5-rc1
  2023-06-28 16:00 [GIT PULL] flexible-array transformations for 6.5-rc1 Gustavo A. R. Silva
@ 2023-06-30  0:07 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2023-06-30  0:07 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Kees Cook, linux-hardening, linux-kernel

On Wed, 28 Jun 2023 at 08:59, Gustavo A. R. Silva <gustavoars@kernel.org> wrote:
>
> Please, pull the following patches that transform zero-length and
> one-element arrays into C99 flexible-array members. These patches
> have been baking in linux-next for a while.

This must stop.

Honestly, this is just making things *WORSE*.

That drivers/media/platform/qcom/venus/hfi_cmds.h needs to be
converted all-or-nothing, not this crazy piece-meal conversion effort.

You literally seem to be converting structure definitions that ARE NOT
USED, and then leaving the ones that actually *are* used alone,
because they have uses like

    struct hfi_sys_set_resource_pkt {
    ..
        u32 resource_data[1];
    };

                pkt->hdr.size += sizeof(*res) - sizeof(u32);

where 'res' is a pointer to that packet type.

I'm not at all interested in patches that convert structures that have
zero use. You might as well just *remove* them in that case, rather
than make some syntactic change that doesn't matter.

And yes, that header file already has a mix of '[]' arrays and '[1]'
arrays. I'm not interested in continuing that kind of pointless
conversion.

Either this gets converted properly, or it gets left alone. No more of
this kind of crazy "let's convert the types that are never used".

            Linus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-30  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 16:00 [GIT PULL] flexible-array transformations for 6.5-rc1 Gustavo A. R. Silva
2023-06-30  0:07 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).