Re: [PATCH 1/1] alloc_tag: work around clang-14 issue with __builtin_object_size()
From: Kees Cook
Date: Wed Feb 05 2025 - 16:28:50 EST
On Wed, Feb 05, 2025 at 03:16:12PM -0500, Kent Overstreet wrote:
> ARRAY_SIZE() is sizeof() underneath, just used creatively to guarantee
> that the input is an array - although that property is probably what we
> want here, since strtomem_pad() really only makes sense on static or
> flex-arrays, no?
Exactly. strtomem*/memtostr* are very picky about the destination being
compile-time sized, so sizeof() under the hood seems correct. I'm making
my way through testing a patch now...
--
Kees Cook