lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 02/17] x86_64: add KASan support
On Fri, 30 Jan 2015 19:15:42 +0300 Andrey Ryabinin <a.ryabinin@samsung.com> wrote:

> >> --- a/lib/Kconfig.kasan
> >> +++ b/lib/Kconfig.kasan
> >> @@ -5,6 +5,7 @@ if HAVE_ARCH_KASAN
> >>
> >> config KASAN
> >> bool "AddressSanitizer: runtime memory debugger"
> >> + depends on !MEMORY_HOTPLUG
> >> help
> >> Enables address sanitizer - runtime memory debugger,
> >> designed to find out-of-bounds accesses and use-after-free bugs.
> >
> > That's a significant restriction. It has obvious runtime implications.
> > It also means that `make allmodconfig' and `make allyesconfig' don't
> > enable kasan, so compile coverage will be impacted.
> >
> > This wasn't changelogged. What's the reasoning and what has to be done
> > to fix it?
> >
>
> Yes, this is runtime dependency. Hot adding memory won't work.
> Since we don't have shadow for hotplugged memory, kernel will crash on the first access to it.
> To fix this we need to allocate shadow for new memory.

This definitely should be covered in the changelog.

In general, please take most (all?) review questions as requests to add
content to the changelog and/or to add code comments - if a reviewer
didn't understand something then other readers are likely to be
wondering the same thing.

> Perhaps it would be better to have a runtime warning instead of Kconfig dependecy?

mmm... yes, that sounds better. Maybe print a warning at startup and
then disable memory hot-add? I expect that if the user has enabled
kasan and mem-hotplug at the same time, he/she would prefer that
hotplug be disabled than kasan.



\
 
 \ /
  Last update: 2015-01-30 22:41    [W:0.188 / U:2.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site