Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp55934imm; Thu, 20 Sep 2018 15:05:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZkbk0YHXJwkkTP2CKX+94KYPeTbsQJKEIjAUA4i60BuRt7WhmlvPJM/f31W0O1aVkpQ9Fv X-Received: by 2002:a17:902:7c0a:: with SMTP id x10-v6mr41237597pll.77.1537481143065; Thu, 20 Sep 2018 15:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537481143; cv=none; d=google.com; s=arc-20160816; b=LCQW+EcXAvA9z6RBEGMk0l5AKw6LNO8NecOQTkU7suTwN27+qoVo82zwFCuotcUyl8 xxas7BQ4Zf7cYjA28umdmYEkznIrePVTxNLVGEukm/l4X8Lh8ThOXLYS+XsGdFzskICp ozgGTJixHsaHyTgLYRnePa7nmvGMIZbii3pNClFUAfbMcp/7h0n2HNVLsGRMss66tocb e8v0V9b7L3wlsvCnw2DIpYpVRIyWEU3XspuMeVN1mulxYLFk1DtENRBxLEmt8wHsVNDC Kd7KBtSNQrITy5pE6afUQ8nKPhEyJ1ehkQeazSs4u+0yp3LAJenGO1JZjXq+t0Qd9bdL Wq1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EuQohltGDo9SYaliAz8pDOeahA7WkilckNkQBZnBLS0=; b=S80Q3FZHP7XMXsFlPWSPJBIpxjEhmKSj1IFMlv/03JV5ebJLtAl6tOV7f/+yhYsQYS R6/H9sOqvbSYjDlMke4RQw4kv0n+9BfecXUireARH8lb4bpEylkveIbrT/V1GCd7UyCT efwRSGkH2HdhpEJ5PYAizKs2iNkAs5UupRE15AB3TAuOi2IO1SasM4+PES51+aoAJg8C 8ChPAcZ02NB3uhdSU9BI+2ovuXkyaroQyjeotDMb1Fb7CecrOfbE4L8j63pGjVkCxyeN DCOO7M8E4czfTnVnc5+eBdsp1GgXPpYt5qDqxBrhDhCEucICrtrFJf5Sb046+illc15N URJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si26500062plc.475.2018.09.20.15.05.27; Thu, 20 Sep 2018 15:05:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388749AbeIUDun (ORCPT + 99 others); Thu, 20 Sep 2018 23:50:43 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55776 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbeIUDun (ORCPT ); Thu, 20 Sep 2018 23:50:43 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id A4E1C80749; Fri, 21 Sep 2018 00:05:03 +0200 (CEST) Date: Fri, 21 Sep 2018 00:05:02 +0200 From: Pavel Machek To: Chen Yu Cc: Thomas Gleixner , "Rafael J. Wysocki" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Len Brown , Zhimin Gu Subject: Re: [PATCH 01/12][RFC v3] x86, hibernate: Fix nosave_regions setup for hibernation Message-ID: <20180920220502.GD27468@xo-6d-61-c0.localdomain> References: <9df6959bc2f3776eb512b7964a94bd02639e65eb.1537275915.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9df6959bc2f3776eb512b7964a94bd02639e65eb.1537275915.git.yu.c.chen@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2018-09-19 15:37:15, Chen Yu wrote: > From: Zhimin Gu > > On 32bit systems, nosave_regions(non RAM areas) located between > max_low_pfn and max_pfn are not excluded from hibernation snapshot > currently, which may result in a machine check exception when > trying to access these unsafe regions during hibernation: > > [ 612.800453] Disabling lock debugging due to kernel taint > [ 612.805786] mce: [Hardware Error]: CPU 0: Machine Check Exception: 5 Bank 6: fe00000000801136 > [ 612.814344] mce: [Hardware Error]: RIP !INEXACT! 60:<00000000d90be566> {swsusp_save+0x436/0x560} > [ 612.823167] mce: [Hardware Error]: TSC 1f5939fe276 ADDR dd000000 MISC 30e0000086 > [ 612.830677] mce: [Hardware Error]: PROCESSOR 0:306c3 TIME 1529487426 SOCKET 0 APIC 0 microcode 24 > [ 612.839581] mce: [Hardware Error]: Run the above through 'mcelog --ascii' > [ 612.846394] mce: [Hardware Error]: Machine check: Processor context corrupt > [ 612.853380] Kernel panic - not syncing: Fatal machine check > [ 612.858978] Kernel Offset: 0x18000000 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff) > > This is because on 32bit systems, pages above max_low_pfn are regarded > as high memeory, and accessing unsafe pages might cause expected MCE. > On the problematic 32bit system, there are reserved memory above low > memory, which triggered the MCE: > > Fix this problem by changing pfn limit from max_low_pfn to max_pfn. > This fix does not impact 64bit system because on 64bit max_low_pfn > is the same as max_pfn. > > Acked-by: Pavel Machek Thanks. I think this is nasty enough to add Cc: stable. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html