Files
linux-stable-mirror/include/linux
Gustavo A. R. Silva 2bbdcf02c3 stddef: Introduce __TRAILING_OVERLAP()
Introduce underlying __TRAILING_OVERLAP() macro to let callers apply
atributes to trailing overlapping members.

For instance, the code below:

| struct flex {
| 	size_t count;
| 	int data[];
| };

| struct {
| 	struct flex f;
| 	struct foo a;
| 	struct boo b;
| } __packed instance;

can now be changed to the following, and preserve the __packed
attribute:

| __TRAILING_OVERLAP(struct flex, f, data, __packed,
| 	struct foo a;
| 	struct boo b;
| ) instance;

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/f80c529b239ce11f0a51f714fe00ddf839e05f5e.1758115257.git.gustavoars@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-09-17 09:29:43 -07:00
..
2025-07-31 11:28:03 -04:00
2025-07-31 18:23:53 -07:00
2025-08-02 12:06:10 -07:00
2025-07-31 16:11:43 -05:00
2025-08-02 12:01:37 -07:00