Re: [PATCHv7 03/19] x86/kasan: Use the same shadow offset for 4- and 5-level paging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote:

> We are going to support boot-time switching between 4- and 5-level
> paging. For KASAN it means we cannot have different KASAN_SHADOW_OFFSET
> for different paging modes: the constant is passed to gcc to generate
> code and cannot be changed at runtime.
> 
> This patch changes KASAN code to use 0xdffffc0000000000 as shadow offset
> for both 4- and 5-level paging.
> 
> For 5-level paging it means that shadow memory region is not aligned to
> PGD boundary anymore and we have to handle unaligned parts of the region
> properly.
> 
> In addition, we have to exclude paravirt code from KASAN instrumentation
> as we now use set_pgd() before KASAN is fully ready.
> 
> Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
> [kirill.shutemov@xxxxxxxxxxxxxxx: clenaup, changelog message]
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Bad SOB chain. If Andrey the true author of this patch then it be reflected in a 
"From:" line.

> ---
>  arch/x86/Kconfig            |  1 -
>  arch/x86/kernel/Makefile    |  3 +-
>  arch/x86/mm/kasan_init_64.c | 86 ++++++++++++++++++++++++++++++++++-----------
>  3 files changed, 67 insertions(+), 23 deletions(-)

This is a lot of complex code added with exactly zero lines of comments that 
explains all the complexity ...

Thanks,

	Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux