[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202408151400.614790C62@keescook>
Date: Fri, 16 Aug 2024 12:47:00 -0700
From: Kees Cook <kees@...nel.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Breno Leitao <leitao@...ian.org>, Justin Stitt <justinstitt@...gle.com>,
elver@...gle.com, andreyknvl@...il.com, ryabinin.a.a@...il.com,
kasan-dev@...glegroups.com, linux-hardening@...r.kernel.org,
asml.silence@...il.com, netdev@...r.kernel.org
Subject: Re: UBSAN: annotation to skip sanitization in variable that will wrap
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
Powered by blists - more mailing lists