From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Andrey Konovalov <andreyknvl@google.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] kasan, slub: fix handling of kasan_slab_free hook
Date: Wed, 7 Mar 2018 15:36:59 +0300 [thread overview]
Message-ID: <4e0eb106-1b1e-93ba-af4f-6714413422c3@virtuozzo.com> (raw)
In-Reply-To: <a62759a2545fddf69b0c034547212ca1eb1b3ce2.1520359686.git.andreyknvl@google.com>
On 03/06/2018 09:18 PM, Andrey Konovalov wrote:
> The kasan_slab_free hook's return value denotes whether the reuse of a
> slab object must be delayed (e.g. when the object is put into memory
> qurantine).
>
> The current way SLUB handles this hook is by ignoring its return value
> and hardcoding checks similar (but not exactly the same) to the ones
> performed in kasan_slab_free, which is prone to making mistakes.
>
> The main difference between the hardcoded checks and the ones in
> kasan_slab_free is whether we want to perform a free in case when an
> invalid-free or a double-free was detected (we don't).
>
> This patch changes the way SLUB handles this by:
> 1. taking into account the return value of kasan_slab_free for each of
> the objects, that are being freed;
> 2. reconstructing the freelist of objects to exclude the ones, whose
> reuse must be delayed.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> ---
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
prev parent reply other threads:[~2018-03-07 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 18:18 [PATCH v2] kasan, slub: fix handling of kasan_slab_free hook Andrey Konovalov
2018-03-07 12:36 ` Andrey Ryabinin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e0eb106-1b1e-93ba-af4f-6714413422c3@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).