From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932974AbcISMng (ORCPT ); Mon, 19 Sep 2016 08:43:36 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37173 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757019AbcISMn3 (ORCPT ); Mon, 19 Sep 2016 08:43:29 -0400 Date: Mon, 19 Sep 2016 13:43:25 +0100 From: Matt Fleming To: Waiman Long Cc: Linus Torvalds , "Theodore Ts'o" , Arnd Bergmann , Greg Kroah-Hartman , Linux Kernel Mailing List , Scott J Norton , Douglas Hatch , Borislav Petkov Subject: Re: [PATCH] random: Fix kernel panic due to system_wq use before init Message-ID: <20160919124325.GE2892@codeblueprint.co.uk> References: <1473879781-23819-1-git-send-email-Waiman.Long@hpe.com> <57D9A1A9.8050506@hpe.com> <57DF56D4.50304@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57DF56D4.50304@hpe.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: > On 09/14/2016 03:19 PM, Linus Torvalds wrote: > >On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: > >>In the stack backtrace above, the kernel hadn't even reached SMP boot after > >>about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted > >>up fine. So I suspect that there may be too many interrupts going on and it > >>consumes most of the CPU cycles. The prime suspect is the random driver, I > >>think. > >Any chance of bisecting it at least partially? The random driver > >doesn't do interrupts itself, it just gets called by other drivers > >doing intterrupts. So if there are too many of them, that would be > >something else.. > > > > Linus > > I have finally finished bisecting the problem. I was wrong in saying that > the 4.7.3 kernel had no problem. It did have. There were some slight > differences between the 4.8 and 4.7 kernel config files that I used. After > some further testing, it was found that the bootup problem only happened > when the following kernel config option was defined: > > CONFIG_EFI_MIXED=y Could you try this patch? It won't be the final version, because it doesn't address the root cause of the crash, which looks like page table corruption of some kind, but it should at least confirm that this is the buggy code, --- diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 677e29e29473..8dd3784eb075 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -245,7 +245,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) * text and allocate a new stack because we can't rely on the * stack pointer being < 4GB. */ - if (!IS_ENABLED(CONFIG_EFI_MIXED)) + if (!IS_ENABLED(CONFIG_EFI_MIXED) || efi_is_native()) return 0; /*