Re: [PATCH 1/2] Compiler Attributes: Add __counted_by_ptr macro

From: Kees Cook

Date: Sat Jan 17 2026 - 14:06:15 EST


On Fri, Jan 16, 2026 at 09:36:04AM +0100, Peter Zijlstra wrote:
> On Wed, Jan 14, 2026 at 08:00:54PM -0800, Kees Cook wrote:
> > I think to keep operational parity, we should limit counted_ptr on Clang
> > to version 22 then, otherwise we'll have problems using it on void *.
>
> Ooh, you got that fixed! Nice!

Yes, to my great relief, I was able to convince both GCC and Clang.

--
Kees Cook