mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] randstruct: fix container_of() false positives after __mptr removal
@ 2026-09-03 23:24 Kees Cook
  2026-09-03 23:24 ` [PATCH 1/2] " Kees Cook
  2026-09-03 23:24 ` [PATCH 2/2] randstruct: report bad casts as warnings rather than notes Kees Cook
  0 siblings, 2 replies; 6+ messages in thread
From: Kees Cook @ 2026-09-03 23:24 UTC (permalink / raw)
  To: Bill Wendling
  Cc: Kees Cook, Vincent Mailhol, Nathan Chancellor, Nick Desaulniers,
	Justin Stitt, Greg Kroah-Hartman, linux-kernel, linux-hardening

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-05  0:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 23:24 [PATCH 0/2] randstruct: fix container_of() false positives after __mptr removal Kees Cook
2026-09-03 23:24 ` [PATCH 1/2] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®