[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <54CBC49C.5080503@samsung.com>
Date: Fri, 30 Jan 2015 20:51:24 +0300
From: Andrey Ryabinin <a.ryabinin@...sung.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Dmitry Vyukov <dvyukov@...gle.com>,
Konstantin Serebryany <kcc@...gle.com>,
Dmitry Chernenkov <dmitryc@...gle.com>,
Andrey Konovalov <adech.fo@...il.com>,
Yuri Gribov <tetra2005@...il.com>,
Konstantin Khlebnikov <koct9i@...il.com>,
Sasha Levin <sasha.levin@...cle.com>,
Christoph Lameter <cl@...ux.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Dave Hansen <dave.hansen@...el.com>,
Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v10 13/17] mm: vmalloc: add flag preventing guard hole
allocation
On 01/30/2015 02:12 AM, Andrew Morton wrote:
> On Thu, 29 Jan 2015 18:11:57 +0300 Andrey Ryabinin <a.ryabinin@...sung.com> wrote:
>
>> For instrumenting global variables KASan will shadow memory
>> backing memory for modules. So on module loading we will need
>> to allocate shadow memory and map it at exact virtual address.
>
> I don't understand. What does "map it at exact virtual address" mean?
>
I mean that if module_alloc() returned address x, than
shadow memory should be mapped exactly at address kasan_mem_to_shadow(x).
>> __vmalloc_node_range() seems like the best fit for that purpose,
>> except it puts a guard hole after allocated area.
>
> Why is the guard hole a problem?
>
Because of guard hole in shadow some future allocations of shadow memory
will fail. Requested address ( kasan_mem_to_shadow(x) ) will be already occupied
by guard hole of previous allocation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists