2015-08-17 12:50 GMT+03:00 Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>: > Because of the above I concluded that we may not be able to do > inline instrumentation. Now if we are not doing inline instrumentation, > we can simplify kasan support by not creating a shadow mapping at all > for vmalloc and vmemmap region. Hence the idea of returning the address > of a zero page for anything other than kernel linear map region. >
Yes, mapping zero page needed only for inline instrumentation. You simply don't need to check shadow for vmalloc/vmemmap. So, instead of redefining kasan_mem_to_shadow() I'd suggest to add one more arch hook. Something like: bool kasan_tracks_vaddr(unsigned long addr) { return REGION_ID(addr) == KERNEL_REGION_ID; } And in check_memory_region(): if (!(kasan_enabled() && kasan_tracks_vaddr(addr))) return; _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev