Re: [RFC PATCH V1 4/8] kasan: Don't use kasan shadow pointer in generic functions
From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Date: 2015-08-17 11:36:58
From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Date: 2015-08-17 11:36:58
On 08/17/2015 09:36 AM, Aneesh Kumar K.V wrote:
We can't use generic functions like print_hex_dump to access kasan shadow region. This require us to setup another kasan shadow region for the address passed (kasan shadow address). Most architecture won't be able to do that. Hence remove dumping kasan shadow region dump. If we really want to do this we will have to have a kasan internal implemen tation of print_hex_dump for which we will disable address sanitizer operation.
I didn't understand that. Yes, you don't have shadow for shadow. But, for shadow addresses you return return (void *)kasan_zero_page in kasan_mem_to_shadow(), so we should be fine to access shadow in generic code. And with kasan_tracks_vaddr(), this should work too.