linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] flexible-array transformations for 6.5-rc1
Date: Thu, 29 Jun 2023 17:07:46 -0700	[thread overview]
Message-ID: <CAHk-=wg6oH=LanEa6Dz5LTjHqO+UUOor=rpKCfS90aiAWAUJ1A@mail.gmail.com> (raw)
In-Reply-To: <ZJxZJDUDs1ry84Rc@work>

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

      reply	other threads:[~2023-06-30  0:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wg6oH=LanEa6Dz5LTjHqO+UUOor=rpKCfS90aiAWAUJ1A@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).