mbox series

[0/2] stddef: Allow attributes to be used when creating flex arrays

Message ID 20240210011452.work.985-kees@kernel.org (mailing list archive)
Headers show
Series stddef: Allow attributes to be used when creating flex arrays | expand

Message

Kees Cook Feb. 10, 2024, 1:16 a.m. UTC
Hi,

We're going to have more cases where we need to apply attributes
(e.g. __counted_by) to struct members that have been declared with
DECLARE_FLEX_ARRAY. Add a new ..._ATTR helper to allow for this and
annotate one such user in linux/in.h.

-Kees

Kees Cook (2):
  stddef: Allow attributes to be used when creating flex arrays
  net/ipv4: Annotate imsf_slist_flex with __counted_by(imsf_numsrc)

 include/linux/stddef.h      | 16 ++++++++++++++--
 include/uapi/linux/in.h     |  3 ++-
 include/uapi/linux/stddef.h | 25 +++++++++++++++++++------
 3 files changed, 35 insertions(+), 9 deletions(-)