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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANpmjNPuW47hwmLm=RXr6sXSzvAmz0_vo3m9UGgUbT_CQ=oSgg@mail.gmail.com>
Date:   Tue, 21 Sep 2021 13:35:42 +0200
From:   Marco Elver <elver@...gle.com>
To:     Dmitry Vyukov <dvyukov@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Alexander Potapenko <glider@...gle.com>,
        Jann Horn <jannh@...gle.com>,
        Aleksandr Nogikh <nogikh@...gle.com>,
        Taras Madan <tarasmadan@...gle.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kasan-dev@...glegroups.com
Subject: Re: [PATCH v2 4/5] kfence: limit currently covered allocations when
 pool nearly full

On Tue, 21 Sept 2021 at 13:05, Dmitry Vyukov <dvyukov@...gle.com> wrote:
[...]
> > +/*
> > + * Adds (or subtracts) count @val for allocation stack trace hash
> > + * @alloc_stack_hash from Counting Bloom filter.
> > + */
> > +static void alloc_covered_add(u32 alloc_stack_hash, int val)
> > +{
> > +       int i;
> > +
> > +       if (!alloc_stack_hash)
> > +               return;
>
> Nice!
> I like the hash seed, non-evicting cache and that threshold become a
> command line parameter.
>
> This check is the only place I don't understand. What's special about
> alloc_stack_hash == 0? I see that even double-free's won't call this
> with 0.

Indeed, it's no longer required (I think it was in a previous version
I played with). At this point, it should only be true if jhash()
returns 0 for something, and in that case might not even want the
check.

I can also remove the unnecessary "meta->alloc_stack_hash = 0;" in
kfence_guarded_free().

Unless I hear otherwise, I'll remove the unneeded code (and send a v3
of this series in a few days).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ