From: Kees Cook <kees@kernel.org>
To: Jesse Taube <jtaubepe@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
Nilesh Javali <njavali@marvell.com>,
GR-QLogic-Storage-Upstream@marvell.com,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
John Meneghini <jmeneghi@redhat.com>,
Chris Leech <cleech@redhat.com>,
Jesse Taube <mr.bossman075@gmail.com>
Subject: Re: [PATCH] scsi: qla2xxx: Fix flex array member not at end
Date: Wed, 15 Jul 2026 09:16:07 -0700 [thread overview]
Message-ID: <202607150914.6C4DD9DE03@keescook> (raw)
In-Reply-To: <20260714152238.541704-1-jtaubepe@redhat.com>
On Tue, Jul 14, 2026 at 11:22:38AM -0400, Jesse Taube wrote:
> In qla_edif_bsg.h: `struct fc_bsg_reply` and `struct fc_bsg_request`
> have flexible array members, thus they must be the last member of
> the parent structure. Contininging in the effort to add
> `-Wflex-array-member-not-at-end`, move the structs to the end of
> the parent structures, `struct qla_bsg_auth_els_reply` and
> `struct qla_bsg_auth_els_request `.
>
> Suggested-by: John Meneghini <jmeneghi@redhat.com>
> Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
It feels like this structure is part of the hardware spec? (and therefore
cannot be re-ordered.) I'm not sure at all, though, but it looks like
it's part of request serialization:
$ git grep 'qla_bsg_auth_els_request' | grep '>request'
drivers/scsi/qla2xxx/qla_edif.c: (struct qla_bsg_auth_els_request *)bsg_job->request;
drivers/scsi/qla2xxx/qla_edif.c: (struct qla_bsg_auth_els_request *)bsg_job->request;
drivers/scsi/qla2xxx/qla_edif.c: (struct qla_bsg_auth_els_request *)bsg_job->request;
drivers/scsi/qla2xxx/qla_isr.c: (struct qla_bsg_auth_els_request *)bsg_job->request;
-Kees
> ---
> drivers/scsi/qla2xxx/qla_edif_bsg.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_edif_bsg.h b/drivers/scsi/qla2xxx/qla_edif_bsg.h
> index 514c265ba86e..bcc35d149c1f 100644
> --- a/drivers/scsi/qla2xxx/qla_edif_bsg.h
> +++ b/drivers/scsi/qla2xxx/qla_edif_bsg.h
> @@ -36,16 +36,16 @@ struct extra_auth_els {
> } __packed;
>
> struct qla_bsg_auth_els_request {
> - struct fc_bsg_request r;
> struct extra_auth_els e;
> + struct fc_bsg_request r;
> };
>
> struct qla_bsg_auth_els_reply {
> - struct fc_bsg_reply r;
> uint32_t rx_xchg_address;
> uint8_t version;
> uint8_t pad[VND_CMD_PAD_SIZE];
> uint8_t reserved[VND_CMD_APP_RESERVED_SIZE];
> + struct fc_bsg_reply r;
> };
>
> struct app_id {
> --
> 2.54.0
>
--
Kees Cook
next prev parent reply other threads:[~2026-07-15 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 15:22 Jesse Taube
2026-07-15 16:16 ` Kees Cook [this message]
2026-07-17 15:45 ` Jesse Taube
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=202607150914.6C4DD9DE03@keescook \
--to=kees@kernel.org \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=cleech@redhat.com \
--cc=gustavoars@kernel.org \
--cc=hch@infradead.org \
--cc=jmeneghi@redhat.com \
--cc=jtaubepe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mr.bossman075@gmail.com \
--cc=njavali@marvell.com \
/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
Powered by JetHome