mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] stddef: Simplify TRAILING_OVERLAP() and improve docs
@ 2025-09-12 10:28 Uwe Kleine-König
  2025-09-12 10:28 ` [PATCH 1/2] stddef: Add a comment about why TRAILING_OVERLAP() exists Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2025-09-12 10:28 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Kees Cook; +Cc: linux-kernel

Hello,

as a follup to the discussion I had with Gustavo in reply to
https://lore.kernel.org/linux-pwm/aJtRPZpc-Lv-C6zD@kspp here comes my
suggestion to improve TRAILING_OVERLAP() for wider audience.

While working at it, I wonder if __packed should also better be part of the
macro to ensure that


	struct myfamstruct {
		char c;
		char payload[];
	};

	TRAILING_OVERLAP(struct myfamstruct, mfs, payload,
		unsigned int payload_as_int;
	) fs;

does the right thing. This however is orthogonal and better discussed
separately from this patch set.

Best regards
Uwe

Uwe Kleine-König (2):
  stddef: Add a comment about why TRAILING_OVERLAP() exists
  stddef: Stop using FAM parameter of TRAILING_OVERLAP()

 include/linux/stddef.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)


base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
-- 
2.50.1


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

end of thread, other threads:[~2025-09-12 11:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-12 10:28 [PATCH 0/2] stddef: Simplify TRAILING_OVERLAP() and improve docs Uwe Kleine-König
2025-09-12 10:28 ` [PATCH 1/2] stddef: Add a comment about why TRAILING_OVERLAP() exists Uwe Kleine-König
2025-09-12 10:28 ` [PATCH 2/2] stddef: Stop using FAM parameter of TRAILING_OVERLAP() Uwe Kleine-König
2025-09-12 11:00   ` Gustavo A. R. Silva
2025-09-12 10:51 ` [PATCH 0/2] stddef: Simplify TRAILING_OVERLAP() and improve docs Gustavo A. R. Silva

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®