Skip to contentSkip to conversation

arm64: skip kmemleak for KASAN again

PATCH In review Qian Cai 2 participants 2 messages Dec 26, 2018 – Dec 27, 2018

Subsystems (3)
lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 arm64: skip kmemleak for KASAN again

Due to 871ac3d540f (kasan: initialize shadow to 0xff for tag-based mode), kmemleak is broken again with KASAN. It needs a similar fix from e55058c2983 (mm/memblock.c: skip kmemleak for kasan_init()).

---
 arch/arm64/mm/kasan_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/mm/kasan_init.c +1 -2
index 48d8f2fa0d14..4b55b15707a3 100644
@@ -47,8 +47,7 @@ static phys_addr_t __init kasan_alloc_raw_page(int node)
 {
 	void *p = memblock_alloc_try_nid_raw(PAGE_SIZE, PAGE_SIZE,
 						__pa(MAX_DMA_ADDRESS),
-						MEMBLOCK_ALLOC_ACCESSIBLE,
-						node);
+						MEMBLOCK_ALLOC_KASAN, node);
 	return __pa(p);
 }
 
Signature · 1 line
2.17.2 (Apple Git-113)
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Qian Cai

Due to 871ac3d540f (kasan: initialize shadow to 0xff for tag-based mode), kmemleak is broken again with KASAN. It needs a similar fix from e55058c2983 (mm/memblock.c: skip kmemleak for kasan_init()).

Hi Qian,

Sorry, didn't see your first kmemleak fix. I can merge this fix into my series if I end up resending it.

In any case:

Thanks!

Quoted 21 lines
---
 arch/arm64/mm/kasan_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/mm/kasan_init.c +1 -3
index 48d8f2fa0d14..4b55b15707a3 100644
@@ -47,8 +47,7 @@ static phys_addr_t __init kasan_alloc_raw_page(int node)
 {
        void *p = memblock_alloc_try_nid_raw(PAGE_SIZE, PAGE_SIZE,
                                                __pa(MAX_DMA_ADDRESS),
-                                               MEMBLOCK_ALLOC_ACCESSIBLE,
-                                               node);
+                                               MEMBLOCK_ALLOC_KASAN, node);
        return __pa(p);
 }
 
--

2.17.2 (Apple Git-113)