All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	Nilesh Javali <njavali@marvell.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-hardening@vger.kernel.org
Subject: [PATCH 0/2][next] scsi: qla2xxx: Replace one-element array with flexible-array member
Date: Fri, 18 Nov 2022 17:46:21 -0600	[thread overview]
Message-ID: <cover.1668814746.git.gustavoars@kernel.org> (raw)

Hi!

This series aims to replace a one-element array with flexible-array
member in drivers/scsi/qla2xxx/qla_def.h through the use of the
DECLARE_FLEX_ARRAY() helper.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

Link: https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/79
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]

Gustavo A. R. Silva (2):
  scsi: qla2xxx: Replace one-element array with DECLARE_FLEX_ARRAY()
    helper
  scsi: qla2xxx: Use struct_size() in code related to struct
    ct_sns_gpnft_rsp

 drivers/scsi/qla2xxx/qla_def.h | 4 ++--
 drivers/scsi/qla2xxx/qla_gs.c  | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.34.1


             reply	other threads:[~2022-11-19  0:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 23:46 Gustavo A. R. Silva [this message]
2022-11-18 23:47 ` [PATCH 1/2][next] scsi: qla2xxx: Replace one-element array with DECLARE_FLEX_ARRAY() helper Gustavo A. R. Silva
2022-11-19  7:09   ` Kees Cook
2022-11-19  8:44   ` Christophe JAILLET
2022-11-19  8:56     ` Gustavo A. R. Silva
2022-11-19 10:23       ` Christophe JAILLET
2022-11-19 19:03         ` Gustavo A. R. Silva
2022-11-18 23:47 ` [PATCH 2/2][next] scsi: qla2xxx: Use struct_size() in code related to struct ct_sns_gpnft_rsp Gustavo A. R. Silva
2022-11-19  7:10   ` Kees Cook
2022-11-19  7:20     ` Gustavo A. R. Silva
2022-11-19  7:49       ` Gustavo A. R. Silva

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=cover.1668814746.git.gustavoars@kernel.org \
    --to=gustavoars@kernel.org \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.