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+xberuUH0cn8U1N8X0n56Fy=uLCxZ=P3q+E2PPRsfuKNQ@mail.gmail.com>
Date:   Thu, 14 Jan 2021 18:58:57 +0100
From:   Andrey Konovalov <andreyknvl@...gle.com>
To:     Marco Elver <elver@...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 Wed, Jan 13, 2021 at 5:54 PM Marco Elver <elver@...gle.com> wrote:
>
> > +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().
>
> Was requiring 'ip' intentional? Unlike the other
> kasan_check-functions, this takes an explicit 'ip'. In the case of
> ksize() usage, this is an advantage, so I'd probably keep it, but the
> rationale to introducing 'ip' vs. before wasn't mentioned.

Yes, to avoid having a ksize() frame in the report. However, I'll move
_RET_IP_ inside of kasan_check_byte() as it's inline.

> > +bool __kasan_check_byte(const void *address, unsigned long ip)
> > +{
> > +       if (!kasan_byte_accessible(address)) {
> > +               kasan_report((unsigned long)address, 1, false, ip);
> > +               return false;
> > +       }
> > +       return true;
> > +}
>
> Like the other __kasan_check*, should this have been EXPORT_SYMBOL()?
> Or was it intentional to not export as it's currently only used by
> non-modules?

We can add EXPORT_SYMBOL as soon as there's a need for it.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ