[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANpmjNNGBCrTwcm=3wrXfdy5A5=3Vd-MVdLd8BBzHRseykFX6Q@mail.gmail.com>
Date: Thu, 14 Jan 2021 20:56:21 +0100
From: Marco Elver <elver@...gle.com>
To: Andrey Konovalov <andreyknvl@...gle.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Will Deacon <will.deacon@....com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Peter Collingbourne <pcc@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Branislav Rankov <Branislav.Rankov@....com>,
Kevin Brodsky <kevin.brodsky@....com>,
kasan-dev <kasan-dev@...glegroups.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 11/14] kasan: fix bug detection via ksize for HW_TAGS mode
On Thu, 14 Jan 2021 at 19:01, 'Andrey Konovalov' via kasan-dev
<kasan-dev@...glegroups.com> wrote:
> On Wed, Jan 13, 2021 at 5:54 PM Marco Elver <elver@...gle.com> wrote:
> >
> > > +/*
> > > + * Unlike kasan_check_read/write(), kasan_check_byte() is performed even for
> > > + * the hardware tag-based mode that doesn't rely on compiler instrumentation.
> > > + */
> > > +bool __kasan_check_byte(const void *addr, unsigned long ip);
> > > +static __always_inline bool kasan_check_byte(const void *addr, unsigned long ip)
> > > +{
> > > + if (kasan_enabled())
> > > + return __kasan_check_byte(addr, ip);
> > > + return true;
> > > +}
> >
> > Why was this not added to kasan-checks.h? I'd assume including all of
> > kasan.h is also undesirable for tag-based modes if we just want to do
> > a kasan_check_byte().
>
> It requires kasan_enabled() definition. I can move both to
> kasan-checks.h if you prefer. However, the only place where
> kasan_check_byte() is currently used includes kasan.h anyway.
Hmm, if it makes too much of a mess, let's just leave as-is.
Thanks,
-- Marco
Powered by blists - more mailing lists