All of lore.kernel.org
 help / color / mirror / Atom feed
* Making KASAN compatible with VMAP_STACK
@ 2018-07-22 17:52 Andy Lutomirski
  2018-07-23  7:40 ` Dmitry Vyukov
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Lutomirski @ 2018-07-22 17:52 UTC (permalink / raw)
  To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov, kasan-dev,
	LKML, X86 ML

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-17 15:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-22 17:52 Making KASAN compatible with VMAP_STACK Andy Lutomirski
2018-07-23  7:40 ` Dmitry Vyukov
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

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.