lkml.org 
[lkml]   [2017]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv7 03/19] x86/kasan: Use the same shadow offset for 4- and 5-level paging

* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> 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@virtuozzo.com>
> [kirill.shutemov@linux.intel.com: clenaup, changelog message]
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

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

\
 
 \ /
  Last update: 2017-09-28 10:16    [W:0.189 / U:3.016 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site