[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1745342381.git.gustavoars@kernel.org>
Date: Tue, 22 Apr 2025 11:20:40 -0600
From: "Gustavo A. R. Silva" <gustavoars@...nel.org>
To: Kees Cook <kees@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 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 | 13 +++++++++++++
lib/tests/overflow_kunit.c | 3 +++
2 files changed, 16 insertions(+)
--
2.43.0
Powered by blists - more mailing lists