lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH -next 00/21] Address sanitizer for kernel (kasan) - dynamic memory error detector.
On 07/14/14 19:13, Christoph Lameter wrote:
> On Sun, 13 Jul 2014, Andrey Ryabinin wrote:
>
>>> How does that work when memory is sparsely populated?
>>>
>>
>> Sparsemem configurations currently may not work with kasan.
>> I suppose I will have to move shadow area to vmalloc address space and
>> make it (shadow) sparse too if needed.
>
> Well it seems to work with sparsemem / vmemmap? So non vmmemmapped configs
> of sparsemem only. vmemmmap can also handle holes in memory.
>
>

Not sure. This sparsemem/vmemmap thing is kinda new to me, so I need to dig some more
to understand how it iтteracts with kasan.

As far as I understand the main problem with sparsemem & kasan is shadow allocation:

unsigned long lowmem_size = (unsigned long)high_memory - PAGE_OFFSET;
shadow_size = lowmem_size >> KASAN_SHADOW_SCALE_SHIFT;

shadow_phys_start = memblock_alloc(shadow_size, PAGE_SIZE);

If we don't have one big enough physically contiguous block for shadow it will fail.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-07-15 17:21    [W:1.045 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site