[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrW4F33LWWA=cWYZ2N9=veCmVfjhCCLnSv2qh=32fOAf-w@mail.gmail.com>
Date: Sun, 22 Jul 2018 10:52:50 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>
Subject: Making KASAN compatible with VMAP_STACK
Hi all-
It would be really nice to make KASAN compatible with VMAP_STACK.
Both are valuable memory debugging features, and the fact that you
can't use both is disappointing.
As far as I know, there are only two problems:
1. The KASAN shadow population code is a mess, and adding *anything*
to the KASAN shadow requires magical, fragile incantations. It should
be cleaned up so that ranges can be easily populated without needing
to very carefully align things, call helpers in the right order, etc.
The core KASAN code should figure it out by itself.
2. The vmalloc area is potentially extremely large. It might be
necessary to have a way to *depopulate* shadow space when stacks get
freed or, more generally, when vmap areas are freed. Ideally KASAN
would integrate with the core vmalloc/vmap code and it would Just Work
(tm). And, as a bonus, we'd get proper KASAN protection of vmalloced
memory.
Any volunteers to fix this?
--Andy
Powered by blists - more mailing lists