summaryrefslogtreecommitdiff
path: root/drivers/target
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-11-03 16:26:09 -0800
committerJakub Kicinski <kuba@kernel.org>2025-11-04 19:10:32 -0800
commitbf33247a90d3e85d53a9b55bb276b725456ff0bf (patch)
tree7dbd40ff0d260dd872f96fdfad8963d9add74f9d /drivers/target
parentbd0fa860730861bd6482b7acc5d39fd1e15c7453 (diff)
net: Add struct sockaddr_unsized for sockaddr of unknown length
Add flexible sockaddr structure to support addresses longer than the traditional 14-byte struct sockaddr::sa_data limitation without requiring the full 128-byte sa_data of struct sockaddr_storage. This allows the network APIs to pass around a pointer to an object that isn't lying to the compiler about how big it is, but must be accompanied by its actual size as an additional parameter. It's possible we may way to migrate to including the size with the struct in the future, e.g.: struct sockaddr_unsized { u16 sa_data_len; u16 sa_family; u8 sa_data[] __counted_by(sa_data_len); }; Signed-off-by: Kees Cook <kees@kernel.org> Link: https://patch.msgid.link/20251104002617.2752303-1-kees@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/target')
0 files changed, 0 insertions, 0 deletions