summaryrefslogtreecommitdiff
path: root/rust/kernel/processor.rs
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-11-03 16:26:16 -0800
committerJakub Kicinski <kuba@kernel.org>2025-11-04 19:10:33 -0800
commit2b5e9f9b7e414c5eeb20dd7a7b80816ff55cf57b (patch)
tree8e72511780bc69941e51a54cfa126f0e9538347a /rust/kernel/processor.rs
parentc1a799eef62b8c3298a4d82753fe0f2a448e5e4f (diff)
net: Convert struct sockaddr to fixed-size "sa_data[14]"
Revert struct sockaddr from flexible array to fixed 14-byte "sa_data", to solve over 36,000 -Wflex-array-member-not-at-end warnings, since struct sockaddr is embedded within many network structs. With socket/proto sockaddr-based internal APIs switched to use struct sockaddr_unsized, there should be no more uses of struct sockaddr that depend on reading beyond the end of struct sockaddr::sa_data that might trigger bounds checking. Comparing an x86_64 "allyesconfig" vmlinux build before and after this patch showed no new "ud1" instructions from CONFIG_UBSAN_BOUNDS nor any new "field-spanning" memcpy CONFIG_FORTIFY_SOURCE instrumentations. Cc: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kees Cook <kees@kernel.org> Link: https://patch.msgid.link/20251104002617.2752303-8-kees@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/processor.rs')
0 files changed, 0 insertions, 0 deletions