All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@nvidia.com>
To: "daniel@ffwll.ch" <daniel@ffwll.ch>,
	"kherbst@redhat.com" <kherbst@redhat.com>,
	"lyude@redhat.com" <lyude@redhat.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"dakr@redhat.com" <dakr@redhat.com>,
	 "gustavoars@kernel.org" <gustavoars@kernel.org>
Cc: "nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by
Date: Thu, 16 Nov 2023 19:08:47 +0000	[thread overview]
Message-ID: <f69f9fa30c95f1dcfd0513cd90527a92029a42c7.camel@nvidia.com> (raw)
In-Reply-To: <ZVZbX7C5suLMiBf+@work>

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On Thu, 2023-11-16 at 12:11 -0600, Gustavo A. R. Silva wrote:
 typedef struct PACKED_REGISTRY_TABLE
 {
-    NvU32                   size;
-    NvU32                   numEntries;
-    PACKED_REGISTRY_ENTRY   entries[0];
+       NvU32                   size;
+       NvU32                   numEntries;
+       PACKED_REGISTRY_ENTRY   entries[] __counted_by(numEntries);
 } PACKED_REGISTRY_TABLE;

Well, it's better than mine: https://lore.kernel.org/all/20231107234726.854248-1-ttabi@nvidia.com/T/

[-- Attachment #2: Type: text/html, Size: 1542 bytes --]

  parent reply	other threads:[~2023-11-16 19:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 18:11 [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by Gustavo A. R. Silva
2023-11-16 18:11 ` Gustavo A. R. Silva
2023-11-16 18:11 ` [Nouveau] " Gustavo A. R. Silva
2023-11-16 18:28 ` Kees Cook
2023-11-16 18:28   ` Kees Cook
2023-11-16 18:28   ` [Nouveau] " Kees Cook
2023-11-16 19:08 ` Timur Tabi [this message]
2023-11-16 19:45 ` Danilo Krummrich
2023-11-16 19:45   ` Danilo Krummrich
2023-11-16 19:45   ` [Nouveau] " Danilo Krummrich
2023-11-16 19:55   ` Timur Tabi
2023-11-16 19:55     ` Timur Tabi
2023-11-16 19:55     ` Timur Tabi
2023-11-29  1:01     ` Danilo Krummrich
2023-11-29  1:01       ` Danilo Krummrich
2023-11-29  1:01       ` Danilo Krummrich
2023-11-29  1:06       ` Gustavo A. R. Silva
2023-11-29  1:06         ` Gustavo A. R. Silva
2023-11-29  1:06         ` Gustavo A. R. Silva
2023-11-29  2:15         ` Danilo Krummrich
2023-11-29  2:15           ` Danilo Krummrich
2023-11-29  2:15           ` Danilo Krummrich

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=f69f9fa30c95f1dcfd0513cd90527a92029a42c7.camel@nvidia.com \
    --to=ttabi@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=dakr@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavoars@kernel.org \
    --cc=kherbst@redhat.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.