From: Nicolin Chen <nicolinc@nvidia.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, <linux-hardening@vger.kernel.org>
Subject: Re: [PATCH][next] iommufd/iommufd_private.h: Avoid -Wflex-array-member-not-at-end warning
Date: Tue, 11 Nov 2025 10:58:30 -0800 [thread overview]
Message-ID: <aROHVpn76XexYMPX@Asurada-Nvidia> (raw)
In-Reply-To: <3d50e0a2-77fd-4c87-bf74-8ab8b6b15ce2@embeddedor.com>
On Tue, Nov 11, 2025 at 05:49:20PM +0900, Gustavo A. R. Silva wrote:
> On 11/11/25 16:20, Gustavo A. R. Silva wrote:
> > On 11/11/25 03:02, Nicolin Chen wrote:
> > > On Mon, Nov 10, 2025 at 08:35:31PM +0900, Gustavo A. R. Silva wrote:
> > > > -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> > > > getting ready to enable it, globally.
> > > >
> > > > Move the conflicting declaration to the end of the corresponding
> > > > structure. Notice that struct iommufd_vevent is a flexible
> > > > structure, this is a structure that contains a flexible-array
> > > > member.
> > > >
> > > > Fix the following warning:
> > > >
> > > > drivers/iommu/iommufd/iommufd_private.h:621:31: warning:
> > > > structure containing a flexible array member is not at the end
> > > > of another structure [-Wflex-array- member-not-at-end]
> > >
> > > IIUIC, there might be data corruption due to this? If so, I think
>
> Okay, I didn't find evidence of data corruption. So, this patch can be applied to
> a -next tree.
Revisiting the design, the "lost_events_header" doesn't allocate
data but only uses its internal header to raise a flag. So there
should not be any data corruption.
Yea, I think we are fine with your for-next patch.
Thanks
Nicolin
next prev parent reply other threads:[~2025-11-11 18:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 11:35 [PATCH][next] iommufd/iommufd_private.h: Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
2025-11-10 18:02 ` Nicolin Chen
2025-11-11 7:20 ` Gustavo A. R. Silva
2025-11-11 8:49 ` Gustavo A. R. Silva
2025-11-11 18:58 ` Nicolin Chen [this message]
2025-11-17 7:13 ` Tian, Kevin
2025-11-21 19:41 ` Jason Gunthorpe
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=aROHVpn76XexYMPX@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@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 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.