lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeHK+wc8Z-mYR=UeA3XwGjiUNr0f+bAoouKu1MP-vsKZ2+4bw@mail.gmail.com>
Date:   Thu, 12 Nov 2020 20:27:05 +0100
From:   Andrey Konovalov <andreyknvl@...gle.com>
To:     Alexander Potapenko <glider@...gle.com>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Marco Elver <elver@...gle.com>,
        Evgenii Stepanov <eugenis@...gle.com>,
        Branislav Rankov <Branislav.Rankov@....com>,
        Kevin Brodsky <kevin.brodsky@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        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 v9 21/44] kasan: kasan_non_canonical_hook only for
 software modes

On Thu, Nov 12, 2020 at 4:16 PM Alexander Potapenko <glider@...gle.com> wrote:
>
> On Wed, Nov 11, 2020 at 7:52 PM 'Andrey Konovalov' via kasan-dev
> <kasan-dev@...glegroups.com> wrote:
> >
> > On Wed, Nov 11, 2020 at 4:09 PM Alexander Potapenko <glider@...gle.com> wrote:
> > >
> > > On Tue, Nov 10, 2020 at 11:11 PM Andrey Konovalov <andreyknvl@...gle.com> wrote:
> > > >
> > > > This is a preparatory commit for the upcoming addition of a new hardware
> > > > tag-based (MTE-based) KASAN mode.
> > > >
> > > > kasan_non_canonical_hook() is only applicable to KASAN modes that use
> > > > shadow memory, and won't be needed for hardware tag-based KASAN.
> > > >
> > > > No functional changes for software modes.
> > > >
> > > > Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> > > > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
> > > > Reviewed-by: Marco Elver <elver@...gle.com>
> > > > ---
> > > > Change-Id: Icc9f5ef100a2e86f3a4214a0c3131a68266181b2
> > > > ---
> > > >  mm/kasan/report.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> > > > index 5d5733831ad7..594bad2a3a5e 100644
> > > > --- a/mm/kasan/report.c
> > > > +++ b/mm/kasan/report.c
> > > > @@ -403,7 +403,8 @@ bool kasan_report(unsigned long addr, size_t size, bool is_write,
> > > >         return ret;
> > > >  }
> > > >
> > > > -#ifdef CONFIG_KASAN_INLINE
> > > > +#if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \
> > > > +       defined(CONFIG_KASAN_INLINE)
> > > >  /*
> > > >   * With CONFIG_KASAN_INLINE, accesses to bogus pointers (outside the high
> > > >   * canonical half of the address space) cause out-of-bounds shadow memory reads
> > >
> > > Perhaps this comment also needs to be updated.
> >
> > In what way?
>
> Ok, maybe not. I thought you were restricting the set of configs under
> which this hook is used, so this should've been explained.
> But as far as I understand, CONFIG_KASAN_INLINE already implies
> "defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)",
> doesn't it?
> Maybe this change is not needed at all then?

Ah, yes, you're right. Will drop this patch, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ