All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Bill Wendling <morbo@google.com>
Cc: Kees Cook <kees@kernel.org>, Vincent Mailhol <mailhol@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: [PATCH 0/2] randstruct: fix container_of() false positives after __mptr removal
Date: Thu,  3 Sep 2026 16:24:34 -0700	[thread overview]
Message-ID: <20260903232428.i.323-kees@kernel.org> (raw)

Hi,

The GCC randstruct implementation specifically keyed on the __mptr temp
variable name. With that removed, we need to check via a struct walk or
a void * cast (which is what Clang already does).

I'm hoping to get these into v7.3 before release, but I want to put this
through -next for a bit first.

-Kees

Kees Cook (2):
  randstruct: fix container_of() false positives after __mptr removal
  randstruct: report bad casts as warnings rather than notes

 scripts/gcc-plugins/randomize_layout_plugin.c | 63 +++++++++++++++++--
 1 file changed, 59 insertions(+), 4 deletions(-)

-- 
2.34.1


             reply	other threads:[~2026-09-03 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 23:24 Kees Cook [this message]
2026-09-03 23:24 ` [PATCH 1/2] randstruct: fix container_of() false positives after __mptr removal Kees Cook
2026-09-03 23:24 ` [PATCH 2/2] randstruct: report bad casts as warnings rather than notes Kees Cook
2026-09-04 18:14   ` Bill Wendling
2026-09-04 20:24     ` Nathan Chancellor
2026-09-05  0:48     ` Kees Cook

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=20260903232428.i.323-kees@kernel.org \
    --to=kees@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=justinstitt@google.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@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 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.