[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202505011313.52AF4DC@keescook>
Date: Thu, 1 May 2025 13:13:38 -0700
From: Kees Cook <kees@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Alan Huang <mmpgouride@...il.com>, kent.overstreet@...ux.dev,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-bcachefs@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 1/2] bcachefs: Remove incorrect __counted_by annotation
On Thu, May 01, 2025 at 10:08:16PM +0200, Thorsten Blum wrote:
> On 1. May 2025, at 22:01, Alan Huang wrote:
> > + /*
> > + * x_name contains the name and value counted by
> > + * x_name_len + x_val_len. The introduction of
> > + * __counted_by(x_name_len) caused a false positive
> > + * detection of an out of bounds write.
> > + */
>
> Instead of removing it, would __counted_by(x_name_len + x_val_len) work?
Not yet, but once __counted_by_expr() has landed in GCC and Clang, yes
it will. :)
--
Kees Cook
Powered by blists - more mailing lists