Skip to content

Add STACK_FLEX_ARRAY_SIZE() helper

Gustavo A. R. Silva linux-hardening lkml 2 versions Applied

Status from this message: Applied to for-next/hardening, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 3 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2overflow: Add STACK_FLEX_ARRAY_SIZE() helperinclude/linux/overflow.h+15 -00 replies
2/2kunit/overflow: Add tests for STACK_FLEX_ARRAY_SIZE() helperlib/tests/overflow_kunit.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2][next] Add STACK_FLEX_ARRAY_SIZE() helper

Add new STACK_FLEX_ARRAY_SIZE() helper to get the size of a flexible-array member defined using DEFINE_FLEX()/DEFINE_RAW_FLEX() at compile time.

This is essentially the same as ARRAY_SIZE() but for on-stack flexible-array members.

Gustavo A. R. Silva (2):
overflow: Add STACK_FLEX_ARRAY_SIZE() helper kunit/overflow: Add tests for STACK_FLEX_ARRAY_SIZE() helper

 include/linux/overflow.h   | 15 +++++++++++++++
 lib/tests/overflow_kunit.c |  4 ++++
 2 files changed, 19 insertions(+)
Signature · 1 line
2.43.0