From: Nicolin Chen <nicolinc@nvidia.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: 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: Mon, 10 Nov 2025 10:02:33 -0800 [thread overview]
Message-ID: <aRIoufDcyohFWQz1@Asurada-Nvidia> (raw)
In-Reply-To: <aRHOAwpATIE0oajj@kspp>
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
we should do:
[PATCH rc] iommufd: Fix flex-array-member-not-at-end in struct iommufd_veventq
And add:
Fixes: e36ba5ab808e ("iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC")
Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
With that,
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Thanks for the patch!
next prev parent reply other threads:[~2025-11-10 18:02 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 [this message]
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
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=aRIoufDcyohFWQz1@Asurada-Nvidia \
--to=nicolinc@nvidia.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.