From: Kees Cook <kees@kernel.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Breno Leitao <leitao@debian.org>,
Justin Stitt <justinstitt@google.com>,
elver@google.com, andreyknvl@gmail.com, ryabinin.a.a@gmail.com,
kasan-dev@googlegroups.com, linux-hardening@vger.kernel.org,
asml.silence@gmail.com, netdev@vger.kernel.org
Subject: Re: UBSAN: annotation to skip sanitization in variable that will wrap
Date: Fri, 16 Aug 2024 12:47:00 -0700 [thread overview]
Message-ID: <202408151400.614790C62@keescook> (raw)
In-Reply-To: <1019eec3-3b1c-42b4-9649-65f58284bfec@kernel.dk>
On Thu, Aug 15, 2024 at 12:40:12PM -0600, Jens Axboe wrote:
> On 8/15/24 11:58 AM, Breno Leitao wrote:
> >> 1) There exists some new-ish macros in overflow.h that perform
> >> wrapping arithmetic without triggering sanitizer splats -- check out
> >> the wrapping_* suite of macros.
> >
> > do they work for atomic? I suppose we also need to have them added to
> > this_cpu_add(), this_cpu_sub() helpers.
>
> I don't think so, it's the bias added specifically to the atomic_long_t
> that's the issue with the percpu refs.
Yeah, the future annotations will be variable attributes, so it should
be much nicer to apply.
--
Kees Cook
prev parent reply other threads:[~2024-08-16 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 17:10 UBSAN: annotation to skip sanitization in variable that will wrap Breno Leitao
2024-08-14 21:05 ` Justin Stitt
2024-08-15 16:20 ` Kees Cook
2024-08-15 17:58 ` Breno Leitao
2024-08-15 18:40 ` Jens Axboe
2024-08-16 19:47 ` Kees Cook [this message]
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=202408151400.614790C62@keescook \
--to=kees@kernel.org \
--cc=andreyknvl@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=elver@google.com \
--cc=justinstitt@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=leitao@debian.org \
--cc=linux-hardening@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ryabinin.a.a@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).