aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2025-09-17 15:28:07 +0200
committerKees Cook <kees@kernel.org>2025-09-17 09:29:43 -0700
commit2bbdcf02c3f3df6c85abd0a2fee0d7f0f4113e96 (patch)
treea44f0ae5f25d3e263ae30540ea71e72ac289e8d3 /lib/test_fortify/write_overflow-strncpy-src.c
parentstddef: Remove token-pasting in TRAILING_OVERLAP() (diff)
downloadlinux-2bbdcf02c3f3df6c85abd0a2fee0d7f0f4113e96.tar.gz
linux-2bbdcf02c3f3df6c85abd0a2fee0d7f0f4113e96.zip
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>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions