lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171122061923.o7wctfxkivgk63g4@gmail.com>
Date:   Wed, 22 Nov 2017 07:19:23 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Andy Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     X86 ML <x86@...nel.org>, Borislav Petkov <bpetkov@...e.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Brian Gerst <brgerst@...il.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>, kasan-dev@...glegroups.com
Subject: Re: [PATCH v2 06/18] x86/kasan/64: Teach KASAN about the
 cpu_entry_area


* Andy Lutomirski <luto@...nel.org> wrote:

> The cpu_entry_area will contain stacks.  Make sure that KASAN has
> appropriate shadow mappings for them.
> 
> Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
> Cc: Alexander Potapenko <glider@...gle.com>
> Cc: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: kasan-dev@...glegroups.com
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
>  arch/x86/mm/kasan_init_64.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
> index 99dfed6dfef8..43d376687315 100644
> --- a/arch/x86/mm/kasan_init_64.c
> +++ b/arch/x86/mm/kasan_init_64.c
> @@ -330,7 +330,14 @@ void __init kasan_init(void)
>  			      early_pfn_to_nid(__pa(_stext)));
>  
>  	kasan_populate_zero_shadow(kasan_mem_to_shadow((void *)MODULES_END),
> -			(void *)KASAN_SHADOW_END);
> +				   kasan_mem_to_shadow((void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_BOTTOM))));
> +
> +	kasan_populate_shadow((unsigned long)kasan_mem_to_shadow((void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_BOTTOM))),
> +			      (unsigned long)kasan_mem_to_shadow((void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_TOP) + PAGE_SIZE)),
> +		0);
> +
> +	kasan_populate_zero_shadow(kasan_mem_to_shadow((void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_TOP) + PAGE_SIZE)),
> +				   (void *)KASAN_SHADOW_END);

Note, this commit has a dependency on:

  d17a1d97dc20: x86/mm/kasan: don't use vmemmap_populate() to initialize shadow

which got merged upstream outside the x86 tree, so it has a whole bunch of merge 
window dependencies.

To make testing+backporting to v4.14 easier I've cherry-picked d17a1d97dc20 into 
x86/urgent.

( I've Cc:-ed Linus, just in case this kind of preemptive cherry-picking is 
  frowned upon. )

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ