From: Kees Cook <kees@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Alan Huang <mmpgouride@gmail.com>,
kent.overstreet@linux.dev,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-bcachefs@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH 1/2] bcachefs: Remove incorrect __counted_by annotation
Date: Thu, 1 May 2025 13:13:38 -0700 [thread overview]
Message-ID: <202505011313.52AF4DC@keescook> (raw)
In-Reply-To: <9BACA2F2-D306-46BA-ACBE-E06460E11FA0@linux.dev>
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
next prev parent reply other threads:[~2025-05-01 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 20:01 [PATCH 1/2] bcachefs: Remove incorrect __counted_by annotation Alan Huang
2025-05-01 20:01 ` [PATCH 2/2] bcachefs: Rename x_name to x_name_and_value Alan Huang
2025-05-02 1:56 ` Jan Hendrik Farr
2025-05-01 20:08 ` [PATCH 1/2] bcachefs: Remove incorrect __counted_by annotation Thorsten Blum
2025-05-01 20:11 ` Thorsten Blum
2025-05-01 20:13 ` Kees Cook [this message]
2025-05-02 1:55 ` Jan Hendrik Farr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505011313.52AF4DC@keescook \
--to=kees@kernel.org \
--cc=gustavoars@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=mmpgouride@gmail.com \
--cc=thorsten.blum@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox