All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>
Subject: Re: Making KASAN compatible with VMAP_STACK
Date: Mon, 23 Jul 2018 09:40:36 +0200	[thread overview]
Message-ID: <CACT4Y+aP4QSGBiLWt0iNHVJ4nMc_phthK9P+gTMd4d=exaAKwA@mail.gmail.com> (raw)
In-Reply-To: <CALCETrW4F33LWWA=cWYZ2N9=veCmVfjhCCLnSv2qh=32fOAf-w@mail.gmail.com>

On Sun, Jul 22, 2018 at 7:52 PM, Andy Lutomirski <luto@kernel.org> wrote:
> 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?

Hi Andy,

I understand that having most configs as orthogonal settings that can
be enabled independently is generally good in intself, but I would
like to understand what does VMAP_STACK add on top of KASAN in terms
of debugging capabilities?

  reply	other threads:[~2018-07-23  7:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 17:52 Making KASAN compatible with VMAP_STACK Andy Lutomirski
2018-07-23  7:40 ` Dmitry Vyukov [this message]
2018-07-23 11:18   ` Mark Rutland
2018-07-23 11:55     ` Dmitry Vyukov
2018-07-23 12:42       ` Mark Rutland
2018-07-23 12:51         ` Dmitry Vyukov
2018-12-17 15:10           ` Dmitry Vyukov

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='CACT4Y+aP4QSGBiLWt0iNHVJ4nMc_phthK9P+gTMd4d=exaAKwA@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.