From: Andrey Ryabinin Subject: Re: KASAN vs. boot-time switching between 4- and 5-level paging Date: Mon, 10 Jul 2017 19:57:00 +0300 Message-ID: References: <20170525203334.867-1-kirill.shutemov@linux.intel.com> <20170525203334.867-8-kirill.shutemov@linux.intel.com> <20170526221059.o4kyt3ijdweurz6j@node.shutemov.name> <71e11033-f95c-887f-4e4e-351bcc3df71e@virtuozzo.com> <75acbed7-6a08-692f-61b5-2b44f66ec0d8@virtuozzo.com> <20170710123346.7y3jnftqgpingim3@node.shutemov.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mail-he1eur01on0103.outbound.protection.outlook.com ([104.47.0.103]:36304 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754359AbdGJQzV (ORCPT ); Mon, 10 Jul 2017 12:55:21 -0400 In-Reply-To: <20170710123346.7y3jnftqgpingim3@node.shutemov.name> Content-Language: en-US Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Kirill A. Shutemov" Cc: Dmitry Vyukov , Alexander Potapenko , "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , "x86@kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Dave Hansen , Andy Lutomirski , linux-arch@vger.kernel.org, "linux-mm@kvack.org" , LKML , kasan-dev On 07/10/2017 03:33 PM, Kirill A. Shutemov wrote: > > [Sorry for loong delay.] > > The patch works for me for legacy boot. But it breaks EFI boot with > 5-level paging. And I struggle to understand why. > > What I see is many page faults at mm/kasan/kasan.c:758 -- > "DEFINE_ASAN_LOAD_STORE(4)". Handling one of them I get double-fault at > arch/x86/kernel/head_64.S:298 -- "pushq %r14", which ends up with triple > fault. > > Any ideas? > > If you want to play with this by yourself, qemu supports la57 -- use > -cpu "qemu64,+la57". > I'll have a look.