[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251121193957.1655580-1-morbo@google.com>
Date: Fri, 21 Nov 2025 19:39:42 +0000
From: Bill Wendling <morbo@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: Bill Wendling <morbo@...gle.com>, Kees Cook <kees@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>, Justin Stitt <justinstitt@...gle.com>,
linux-hardening@...r.kernel.org, llvm@...ts.linux.dev
Subject: [PATCH 0/2] Add __counted_by_ptr macro
These patches add the __counted_by_ptr macro and then uses it in
mm/memblock.h. The name of the __counted_by_ptr attribute is the same as
__counted_by, but two different macros are needed, because of feature
skew in GCC and clang. Once the minmum versions of the compilers support
'counted_by' on both flexible array members and pointers in structs,
this macro will become obsolete.
Bill Wendling (2):
Compiler Attributes: Add __counted_by_ptr macro
memblock: annotate struct memblock_type with __counted_by_ptr
include/linux/compiler_types.h | 11 +++++++++++
include/linux/memblock.h | 2 +-
init/Kconfig | 5 +++++
3 files changed, 17 insertions(+), 1 deletion(-)
--
2.52.0.rc2.455.g230fcf2819-goog
Powered by blists - more mailing lists