lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1745355442.git.gustavoars@kernel.org>
Date: Tue, 22 Apr 2025 15:04:48 -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 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(+)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ