[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCpGy8UkUA8UdFZWYdJVEGG=kM_ws6Sy37dyUYFgk9uz5g@mail.gmail.com>
Date: Fri, 23 Jun 2023 14:42:57 -0700
From: John Stultz <jstultz@...gle.com>
To: Julia Lawall <Julia.Lawall@...ia.fr>
Cc: Sumit Semwal <sumit.semwal@...aro.org>, keescook@...omium.org,
kernel-janitors@...r.kernel.org,
Benjamin Gaignard <benjamin.gaignard@...labora.com>,
Liam Mark <lmark@...eaurora.org>,
Laura Abbott <labbott@...hat.com>,
Brian Starkey <Brian.Starkey@....com>,
Christian König <christian.koenig@....com>,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org,
"T.J. Mercier" <tjmercier@...gle.com>
Subject: Re: [PATCH 06/26] dma-buf: system_heap: use array_size
On Fri, Jun 23, 2023 at 2:15 PM Julia Lawall <Julia.Lawall@...ia.fr> 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@...ia.fr>
Thanks for sending this out!
Acked-by: John Stultz <jstultz@...gle.com>
Powered by blists - more mailing lists