netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Julia Lawall <Julia.Lawall@inria.fr>
Cc: Jeroen de Borst <jeroendb@google.com>,
	keescook@chromium.org, kernel-janitors@vger.kernel.org,
	Praveen Kaligineedi <pkaligineedi@google.com>,
	Shailend Chand <shailend@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/26] gve: use array_size
Date: Sat, 24 Jun 2023 17:47:15 +0200	[thread overview]
Message-ID: <ZJcQA4baHKWgo9zV@corigine.com> (raw)
In-Reply-To: <20230623211457.102544-5-Julia.Lawall@inria.fr>

On Fri, Jun 23, 2023 at 11:14:35PM +0200, Julia Lawall wrote:
> Use array_size to protect against multiplication overflows.
> 
> The changes were done using the following Coccinelle semantic patch:
> 
> // <smpl>
> @@
>     size_t e1,e2;
>     expression COUNT;
>     identifier alloc = {vmalloc,vzalloc,kvmalloc,kvzalloc};
> @@
> 
> (
>       alloc(
> -           (e1) * (e2)
> +           array_size(e1, e2)
>       ,...)
> |
>       alloc(
> -           (e1) * (COUNT)
> +           array_size(COUNT, e1)
>       ,...)
> )
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


  reply	other threads:[~2023-06-24 15:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 21:14 [PATCH 00/26] use array_size Julia Lawall
2023-06-23 21:14 ` [PATCH 02/26] octeon_ep: " Julia Lawall
2023-06-24 15:46   ` Simon Horman
2023-06-24 22:28   ` Jakub Kicinski
2023-06-25 20:14     ` Christophe JAILLET
2023-06-25 20:25       ` Julia Lawall
2023-06-25 20:32         ` Christophe JAILLET
2023-06-25 20:57           ` Julia Lawall
2023-06-23 21:14 ` [PATCH 04/26] gve: " Julia Lawall
2023-06-24 15:47   ` Simon Horman [this message]
2023-06-23 21:14 ` [PATCH 09/26] pds_core: " Julia Lawall
2023-06-24 15:47   ` Simon Horman
2023-06-26 16:02   ` Shannon Nelson
2023-06-23 21:14 ` [PATCH 11/26] ionic: " Julia Lawall
2023-06-24 15:47   ` Simon Horman
2023-06-26 16:03   ` Shannon Nelson
2023-06-23 21:14 ` [PATCH 18/26] net: enetc: " Julia Lawall
2023-06-24 15:48   ` Simon Horman
2023-06-23 21:14 ` [PATCH 22/26] net: mana: " Julia Lawall
2023-06-24 15:48   ` Simon Horman

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=ZJcQA4baHKWgo9zV@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jeroendb@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkaligineedi@google.com \
    --cc=shailend@google.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).