Skip to content

stddef: Allow attributes to be used when creating flex arrays

Kees Cook linux-hardening lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- don't add a new helper, just add __VA_ARGS__ (Rasmus)
v1: https://lore.kernel.org/all/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2stddef: Allow attributes to be used when creating flex arraysinclude/linux/stddef.h include/uapi/linux/stddef.h+8 -81 reply
2/2net/ipv4: Annotate imsf_slist_flex with __counted_by(imsf_numsrc)include/uapi/linux/in.h+2 -10 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchGustavo A. R. SilvaJakub Kicinski
1/2R-b
2/2R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

v2:
- don't add a new helper, just add __VA_ARGS__ (Rasmus)
v1: https://lore.kernel.org/all/[email protected]/

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 an optional 3rd argument to allow for this and annotate one such user in linux/in.h.

I kept the acks/reviews since it's effectively the same...

-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      |  6 +++---
 include/uapi/linux/in.h     |  3 ++-
 include/uapi/linux/stddef.h | 10 +++++-----
 3 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
2.34.1