Messages in this thread | | | Date | Mon, 25 May 2015 16:43:06 +0300 | From | Alexander Popov <> | Subject | Re: [PATCH 1/1] x86_64: fix KASan shadow region page tables |
| |
On 25.05.2015 11:12, Andrey Ryabinin wrote: > On 05/22/2015 07:03 PM, Alexander Popov wrote: >> Physical addresses in KASan shadow region page tables need fixup: >> kernel halts without it if phys_base is not zero. >> > > Indeed. > Since we have to patch page tables anyway, compile-time created kasan > page tables become pointless. > So, I'd suggest to create them in runtime. This could be done in plain C > in kasan_map_early_shadow(). >
Thanks for your reply, Andrey.
Creating kasan_zero_pud, kasan_zero_pmd and kasan_zero_pte in kasan_map_early_shadow() doesn't look handy for me because this function is called twice in x86_64_start_kernel().
What do you think about leaving the initialization of KASan shadow region page tables in arch/x86/kernel/head_64.S and calling something like kasan_fixup_early_shadow() before calling kasan_map_early_shadow() for the first time?
Best regards, Alexander
| |