All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Zhimin Gu <kookoo.gu@intel.com>, Chen Yu <yu.c.chen@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 4.18 30/34] x86, hibernate: Fix nosave_regions setup for hibernation
Date: Fri, 9 Nov 2018 09:13:22 +0100	[thread overview]
Message-ID: <20181109081322.GA12450@amd> (raw)
In-Reply-To: <20181108215140.736117265@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 4947 bytes --]

On Thu 2018-11-08 13:52:59, Greg Kroah-Hartman wrote:
> 4.18-stable review patch.  If anyone has any objections, please let me know.
>

For the record, this and

[PATCH 4.14 27/31] x86, hibernate: Fix nosave_regions setup

makes sense to me.

Best regards,
								Pavel



> ------------------
> 
> From: Zhimin Gu <kookoo.gu@intel.com>
> 
> commit cc55f7537db6af371e9c1c6a71161ee40f918824 upstream.
> 
> 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:
> 
> e820 memory mapping:
> [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
> [    0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
> [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000d160cfff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000d160d000-0x00000000d1613fff] ACPI NVS
> [    0.000000] BIOS-e820: [mem 0x00000000d1614000-0x00000000d1a44fff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000d1a45000-0x00000000d1ecffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000d1ed0000-0x00000000d7eeafff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000d7eeb000-0x00000000d7ffffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000d8000000-0x00000000d875ffff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000d8760000-0x00000000d87fffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000d8800000-0x00000000d8fadfff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000d8fae000-0x00000000d8ffffff] ACPI data
> [    0.000000] BIOS-e820: [mem 0x00000000d9000000-0x00000000da71bfff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000da71c000-0x00000000da7fffff] ACPI NVS
> [    0.000000] BIOS-e820: [mem 0x00000000da800000-0x00000000dbb8bfff] usable
> [    0.000000] BIOS-e820: [mem 0x00000000dbb8c000-0x00000000dbffffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000dd000000-0x00000000df1fffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
> [    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
> [    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041edfffff] usable
> 
> 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.
> 
> Signed-off-by: Zhimin Gu <kookoo.gu@intel.com>
> Acked-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: All applicable <stable@vger.kernel.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> ---
>  arch/x86/kernel/setup.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -1258,7 +1258,7 @@ void __init setup_arch(char **cmdline_p)
>  	x86_init.hyper.guest_late_init();
>  
>  	e820__reserve_resources();
> -	e820__register_nosave_regions(max_low_pfn);
> +	e820__register_nosave_regions(max_pfn);
>  
>  	x86_init.resources.reserve_resources();
>  
> 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-11-09  8:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 21:52 [PATCH 4.18 00/34] 4.18.18-stable review Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 01/34] eeprom: at24: Add support for address-width property Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 02/34] vfs: swap names of {do,vfs}_clone_file_range() Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 03/34] bpf: fix partial copy of map_ptr when dst is scalar Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 04/34] gpio: mxs: Get rid of external API call Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 05/34] clk: sunxi-ng: sun4i: Set VCO and PLL bias current to lowest setting Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 06/34] fscache: Fix incomplete initialisation of inline key space Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 07/34] cachefiles: fix the race between cachefiles_bury_object() and rmdir(2) Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 08/34] fscache: Fix out of bound read in long cookie keys Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 09/34] ptp: fix Spectre v1 vulnerability Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 10/34] drm/edid: Add 6 bpc quirk for BOE panel in HP Pavilion 15-n233sl Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 11/34] drm/edid: VSDB yCBCr420 Deep Color mode bit definitions Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 12/34] drm: fb-helper: Reject all pixel format changing requests Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 13/34] RDMA/ucma: Fix Spectre v1 vulnerability Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 14/34] IB/ucm: " Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 15/34] cdc-acm: do not reset notification buffer index upon urb unlinking Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 16/34] cdc-acm: correct counting of UART states in serial state notification Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 17/34] cdc-acm: fix race between reset and control messaging Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 18/34] usb: usbip: Fix BUG: KASAN: slab-out-of-bounds in vhci_hub_control() Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 19/34] usb: gadget: storage: Fix Spectre v1 vulnerability Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 20/34] usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 21/34] usb: xhci: pci: Enable Intel USB role mux on Apollo Lake platforms Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 22/34] USB: fix the usbfs flag sanitization for control transfers Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 23/34] block: dont deal with discard limit in blkdev_issue_discard() Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 24/34] tracing: Fix synthetic event to accept unsigned modifier Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 25/34] tracing: Fix synthetic event to allow semicolon at end Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 26/34] Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15IGM Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 27/34] drm/sun4i: Fix an ulong overflow in the dotclock driver Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 28/34] sched/fair: Fix throttle_list starvation with low CFS quota Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 29/34] x86/tsc: Force inlining of cyc2ns bits Greg Kroah-Hartman
2018-11-08 21:52 ` [PATCH 4.18 30/34] x86, hibernate: Fix nosave_regions setup for hibernation Greg Kroah-Hartman
2018-11-09  8:13   ` Pavel Machek [this message]
2018-11-08 21:53 ` [PATCH 4.18 31/34] x86/percpu: Fix this_cpu_read() Greg Kroah-Hartman
2018-11-08 21:53 ` [PATCH 4.18 32/34] x86/time: Correct the attribute on jiffies definition Greg Kroah-Hartman
2018-11-08 21:53 ` [PATCH 4.18 33/34] x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels Greg Kroah-Hartman
2018-11-08 21:53 ` [PATCH 4.18 34/34] x86/fpu: Fix i486 + no387 boot crash by only saving FPU registers on context switch if there is an FPU Greg Kroah-Hartman
2018-11-09  3:50 ` [PATCH 4.18 00/34] 4.18.18-stable review kernelci.org bot
2018-11-09 14:39 ` Naresh Kamboju
2018-11-10 15:24   ` Greg Kroah-Hartman
2018-11-09 19:41 ` Guenter Roeck
2018-11-09 19:55 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181109081322.GA12450@amd \
    --to=pavel@ucw.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=kookoo.gu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.