From patchwork Tue Feb 27 08:21:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A. Shutemov" X-Patchwork-Id: 10244503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA54F60362 for ; Tue, 27 Feb 2018 08:22:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 973DA2A29C for ; Tue, 27 Feb 2018 08:22:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87B0F29C72; Tue, 27 Feb 2018 08:22:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D71129C72 for ; Tue, 27 Feb 2018 08:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752267AbeB0IV4 (ORCPT ); Tue, 27 Feb 2018 03:21:56 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36781 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbeB0IVx (ORCPT ); Tue, 27 Feb 2018 03:21:53 -0500 Received: by mail-wm0-f68.google.com with SMTP id 188so21436491wme.1 for ; Tue, 27 Feb 2018 00:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jbUt9/JGFPkTSkck2EjTSm7kor2TwVJhNZLZ/+eTh/8=; b=Fp1c7HJ6bDdoblE7RtyOHqSVnhkF0UslnkusZHKSO9hsT7GxyQwCNWOSZndNeFueV+ +mvEPO8syuQQxqRDyXnF3nQdBB7NHHQxeIXgEfTvstkU+ciiGgiejpDEBnDm12rBqnl1 lSsMx09qyS+1o4zZD8fZKUHJ4ogl4awKftlH0AJPAsLM+1gwaM5lABVyEFn6GjFPQmS/ bVlDRpog0Fojw/qS01RFAb0ZeransUI1IayqnRC722RZdFqGoQekPmxmFaRxAXSxLVtU LYsKBv+Ow/xu2CsJEDDq+Wpg173eZIldOTNBiVp/c/xY71L0xBM6Qm+K4hQcZi92L7Ul GyEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jbUt9/JGFPkTSkck2EjTSm7kor2TwVJhNZLZ/+eTh/8=; b=I7QG06eSNMoives6Gd3hYhqdPwOd+i6iwRgXsF3HK8Z37BAGETPPciopGE5HAgcBal PsLTophdnQYRvz/19dwRtmTJxbR15mG7dtu1xpHYnfMzBJxQp+SnA5bYnEcqHn0PMQk9 Xa3pYSGax0uzEL7hjse0TCC7FcaJfzaIAG24kWK4VJBu9zW7xOYVyKOS2QAbOomeUrz6 cP44M3igPfOpbRqmDz9h+/XcQLnzqeajDBuMDJeahf8qOn2VYCv6nskqqoVFB8KyEXx6 d8dbaXRLIHrMEeYHrGG0I8ni8y8OsO0Btt2e1WfP/tXWxDlrG/uGVjaU2EYmJucl4C7a 9VzQ== X-Gm-Message-State: APf1xPBTOR3wbacErD4mDuBlRqJW3wPz1J+rllCK/XrU+lb+75yIG9NO PdsfPg5fJ7JHNg1YrifXZHk4wZLT X-Google-Smtp-Source: AH8x226SSdCdDvKWyt7sQ/j3GzogUlx8fYl30S0jM+Wzju1ZUie0gLEa43YmjRpXu3Q6pA7CCvo+6Q== X-Received: by 10.80.214.158 with SMTP id r30mr17731196edi.288.1519719712275; Tue, 27 Feb 2018 00:21:52 -0800 (PST) Received: from node.shutemov.name ([178.121.199.127]) by smtp.gmail.com with ESMTPSA id f19sm10604255edd.84.2018.02.27.00.21.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 00:21:51 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id F040C648D520; Tue, 27 Feb 2018 11:21:42 +0300 (+03) Date: Tue, 27 Feb 2018 11:21:42 +0300 From: "Kirill A. Shutemov" To: kernel test robot Cc: "Kirill A. Shutemov" , LKP , linux-pm@vger.kernel.org, linux-efi@vger.kernel.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Ingo Molnar , wfg@linux.intel.com Subject: Re: 91f606a8fa ("x86/mm: Replace compile-time checks for 5-level .."): BUG: kernel reboot-without-warning in boot stage Message-ID: <20180227082142.7qxtlcx3hkb22abn@node.shutemov.name> References: <5a94243e.XdjEw/cR1zAcoW8q%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5a94243e.XdjEw/cR1zAcoW8q%fengguang.wu@intel.com> User-Agent: NeoMutt/20171215 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Feb 26, 2018 at 11:14:06PM +0800, kernel test robot wrote: > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm > > commit 91f606a8fa68264224cbc76888fa8649cdbe9990 > Author: Kirill A. Shutemov > AuthorDate: Wed Feb 14 21:25:41 2018 +0300 > Commit: Ingo Molnar > CommitDate: Fri Feb 16 10:48:49 2018 +0100 > > x86/mm: Replace compile-time checks for 5-level paging with runtime-time checks > > This patch converts the of CONFIG_X86_5LEVEL check to runtime checks for > p4d folding. > > Signed-off-by: Kirill A. Shutemov > Cc: Andy Lutomirski > Cc: Arjan van de Ven > Cc: Borislav Petkov > Cc: Dan Williams > Cc: Dave Hansen > Cc: David Woodhouse > Cc: Josh Poimboeuf > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: linux-mm@kvack.org > Link: http://lkml.kernel.org/r/20180214182542.69302-9-kirill.shutemov@linux.intel.com > Signed-off-by: Ingo Molnar > > 98219dda2a x86/mm: Fold p4d page table layer at runtime > 91f606a8fa x86/mm: Replace compile-time checks for 5-level paging with runtime-time checks > 1ea4fe8497 Merge branch 'x86/boot' into x86/mm, to unify branches > 94991480c2 Merge branch 'x86/pti' > f1753f6424 Add linux-next specific files for 20180226 Patch below should help. Please check. diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 81dda8d1d0bd..163e01a0631d 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -224,9 +224,9 @@ static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d) return; } - pgd = native_make_pgd(p4d_val(p4d)); + pgd = native_make_pgd(native_p4d_val(p4d)); pgd = pti_set_user_pgd((pgd_t *)p4dp, pgd); - *p4dp = native_make_p4d(pgd_val(pgd)); + *p4dp = native_make_p4d(native_pgd_val(pgd)); } static inline void native_p4d_clear(p4d_t *p4d)