Commit 190faecf authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kees Cook
Browse files

overflow: 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.

Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/83d53744e11c80eb3f03765238cbe648855f4168.1745355442.git.gustavoars@kernel.org


Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent ccf1d2b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment