All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
	Jacob Keller <jacob.e.keller@intel.com>
Cc: Kees Cook <keescook@chromium.org>,
	"Gustavo A . R . Silva" <gustavoars@kernel.org>,
	cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coccinelle: semantic patch to check for potential struct_size calls
Date: Sun, 18 Feb 2024 20:38:37 -0800	[thread overview]
Message-ID: <170831751501.1712410.1795028010127344315.b4-ty@chromium.org> (raw)
In-Reply-To: <20230227202428.3657443-1-jacob.e.keller@intel.com>

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


      parent reply	other threads:[~2024-02-19  4:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 20:24 [PATCH] coccinelle: semantic patch to check for potential struct_size calls Jacob Keller
2023-08-27  1:19 ` Kees Cook
2023-08-29 19:25   ` Jacob Keller
2024-01-16  7:03 ` Dan Carpenter
2024-01-17 21:54   ` Keller, Jacob E
2024-01-18  5:18     ` Dan Carpenter
2024-02-19  4:38 ` Kees Cook [this message]

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=170831751501.1712410.1795028010127344315.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=gustavoars@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.