linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3][next] scsi: aacraid: Replace one-element array with flexible-array member
Date: Wed, 21 Apr 2021 20:20:51 -0700	[thread overview]
Message-ID: <202104212019.4315F80C@keescook> (raw)
In-Reply-To: <yq18s5bt42e.fsf@ca-mkp.ca.oracle.com>

On Wed, Apr 21, 2021 at 11:03:19PM -0400, Martin K. Petersen wrote:
> 
> Hi Gustavo!
> 
> > Changes in v3:
> >  - Use (nseg_new-1)*sizeof(struct sge_ieee1212) to calculate
> >    size in call to memcpy() in order to avoid any confusion.
> 
> The amended memcpy() hunk appears to be missing from the v3 patch.

It's unchanged from the perspective of the original code. (i.e. there's
no need to change it since that memcpy isn't involved in anything
changed by the swapping to the flexible array.)

-- 
Kees Cook

  reply	other threads:[~2021-04-22  3:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 18:56 [PATCH v3][next] scsi: aacraid: Replace one-element array with flexible-array member Gustavo A. R. Silva
2021-04-22  3:03 ` Martin K. Petersen
2021-04-22  3:20   ` Kees Cook [this message]
2021-04-22  3:34     ` Martin K. Petersen
2021-05-04  0:19 ` Gustavo A. R. Silva
2021-05-04  2:56   ` Martin K. Petersen
2021-05-04  3:06     ` Gustavo A. R. Silva
2021-05-11  3:25 ` Martin K. Petersen
2021-05-11  3:30   ` 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=202104212019.4315F80C@keescook \
    --to=keescook@chromium.org \
    --cc=aacraid@microsemi.com \
    --cc=gustavoars@kernel.org \
    --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 \
    /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;
as well as URLs for NNTP newsgroup(s).