[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <170831751501.1712410.1795028010127344315.b4-ty@chromium.org>
Date: Sun, 18 Feb 2024 20:38:37 -0800
From: Kees Cook <keescook@...omium.org>
To: Julia Lawall <Julia.Lawall@...6.fr>,
Jacob Keller <jacob.e.keller@...el.com>
Cc: Kees Cook <keescook@...omium.org>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>,
cocci@...teme.lip6.fr,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coccinelle: semantic patch to check for potential struct_size calls
On Mon, 27 Feb 2023 12:24:28 -0800, Jacob Keller wrote:
> include/linux/overflow.h includes helper macros intended for calculating
> sizes of allocations. These macros prevent accidental overflow by
> saturating at SIZE_MAX.
>
> In general when calculating such sizes use of the macros is preferred. Add
> a semantic patch which can detect code patterns which can be replaced by
> struct_size.
>
> [...]
If this needs tweaking, we can go from this one.
Applied to for-next/hardening, thanks!
[1/1] coccinelle: semantic patch to check for potential struct_size calls
https://git.kernel.org/kees/c/39fc2f86ae6a
Take care,
--
Kees Cook
Powered by blists - more mailing lists