From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maniaxx Subject: Re: PROBLEM: Kernel panic on EFI BGRT early init code (kernel 4.11/4.12rc2) [regression] Date: Sun, 4 Jun 2017 02:11:36 +0200 Message-ID: <4b651aea-0fcc-4f70-cf39-3a46393d2e28@gmail.com> References: <86c36f9b-f633-3354-d676-7693f35dae0d@gmail.com> <20170526012342.GA3096@dhcp-128-65.nay.redhat.com> <20170527051427.GA3492@dhcp-128-65.nay.redhat.com> <20170527053457.GB3492@dhcp-128-65.nay.redhat.com> <20170601015621.GA4306@dhcp-128-65.nay.redhat.com> <20170602025155.GA3637@dhcp-128-65.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from [195.159.176.226] ([195.159.176.226]:59395 "EHLO blaine.gmane.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdFDAME (ORCPT ); Sat, 3 Jun 2017 20:12:04 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dHJ9A-0007d9-Kb for linux-acpi@vger.kernel.org; Sun, 04 Jun 2017 02:11:56 +0200 In-Reply-To: Content-Language: en-US Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: linux-efi@vger.kernel.org New kernel (with early_init panic): In contrast to old kernel early_memremap is successful and "Ignoring BGRT: failed to map image header memory" condition isn't triggered. https://github.com/torvalds/linux/blob/v4.11-rc1/arch/x86/platform/efi/efi-bgrt.c#L65 The next memcpy is the culprit for the panic. I've checked that with printk. https://github.com/torvalds/linux/blob/v4.11-rc1/arch/x86/platform/efi/efi-bgrt.c#L71 This leads to this commit: https://github.com/torvalds/linux/commit/66dbe99cfe30e113d2e571e68b9b6a1a8985a157 My u64 image address might be complete garbage (0A08E01800000001). Rather looks like 2x u32. Here is another BGRT image address that looks much more valid than mine (on boundary, lower mem area). https://ubuntuforums.org/showthread.php?t=2264380 If so, we are poking in invalid memory areas. Reverting the commit until a better way is found to identify a valid image address should fix the problem.