Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4362737imm; Tue, 11 Sep 2018 10:42:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZEJpZddNUJLLunjcxBPHdVlp8HTMZCOJGTfmpdjw9TXSnr5rGx+T2X6HrKCVp3kXcngMfb X-Received: by 2002:a62:4f0b:: with SMTP id d11-v6mr30351230pfb.132.1536687750933; Tue, 11 Sep 2018 10:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536687750; cv=none; d=google.com; s=arc-20160816; b=rlvajy78UWrIt7t6YdVuKRVENn36FBSKYxEEQrJQ9toRUHID5DVdsOGmodf2baUiXI 2pAt+TQcEPfwjlAqT9ZyCd9csMB2HR9G4Q3MJgXVCuXaFff9d7ObbvQKb3Or734c5JU4 BhbaJG56CFVSJT/xeKa/H7FV4DVmbqpdF7YRVIX5mjCEHbQMK/QBebd3i/szovczgpu4 oHwRuTkWZokMGdsVqC//zmgDhSLabWdAnKOb4wUzYZ7Ooyq+dEyDJmzmvstF7HQfJK1x YRATyoQp4KcOjeh9wDexOrtTzf6KaKxULPhcCfRREYdhis+IPok7g20/cUbsGOQV5YDA c8GQ== 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=AzSInbvsMsyrPE/UkDNUfvRDRgugmcDCnFM/oBYx96I=; b=g+DN9Ek9Gp5Byx40KVbBTub+tga0psIsAOQyfdpWCftjWp13GfKAbPBXj1CUcCJnHz e+jJmJcVxjGaOpK+cKa7Biix6lOJoUNTySA7EVTjQOUeZHW+K8bxPSmaijn8KhDXhIIN bw+npRYF0L8aCn9BySEjF5mjRZkfDH8vjy7N7kcjTyvB0dj5hdUkn5bbJQOwkofE22m+ KHqn0wzp5gTnJqu+Tdg9iHG7016YWafgt6gc5HRr+pv5tjoRUAQjtYCSoH2IzJe8OFkH /C6uoevJfnEDtFMV1FWFTP3kj8BHP+G/ED1LEy5B6uQylNixePi9Cao/AJHwh/bDHTPu tBgQ== 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 19-v6si22545670pgy.577.2018.09.11.10.42.08; Tue, 11 Sep 2018 10:42:30 -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 S1727822AbeIKWmY (ORCPT + 99 others); Tue, 11 Sep 2018 18:42:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:46790 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726782AbeIKWmY (ORCPT ); Tue, 11 Sep 2018 18:42:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EA6B1B036; Tue, 11 Sep 2018 17:42:00 +0000 (UTC) Date: Tue, 11 Sep 2018 19:41:58 +0200 From: Joerg Roedel To: Andy Lutomirski Cc: Guenter Roeck , linux-kernel@vger.kernel.org, Ard Biesheuvel , Thomas Gleixner , Michal Hocko , Andi Kleen , Linus Torvalds , Dave Hansen , Pavel Machek , linux-efi@vger.kernel.org, x86@kernel.org Subject: Re: Random crashes with i386 and efi boots Message-ID: <20180911174158.7qu6f4vfnfzqqrcf@suse.de> References: <20180910215659.GA17966@roeck-us.net> <877118e5-beee-4551-28d3-79e7aa52f74e@roeck-us.net> <90A7FF2E-F186-49CF-A028-CDE317BE13E1@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90A7FF2E-F186-49CF-A028-CDE317BE13E1@amacapital.net> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 11, 2018 at 09:36:51AM -0700, Andy Lutomirski wrote: > > save_pgd = efi_call_phys_prolog(); > > local_irq_save(flags); > > status = efi_call_phys(...); > > local_irq_restore(flags); > > > > efi_call_phys_epilog(save_pgd); > > > > So, yes, interrupts are very much enabled. > > Does fixing that solve the problem? It seems more robust. The problem is still that in efi_call_phys_prolog() we load the gdt with its physical address, and when we reload the %cr3 in _epilog from initial_page_table to swapper_pg_dir again the gdt is no longer mapped. Blocking interrupts is more robust, but we can't block NMIs that way that would also trigger the issue, no? So I am in favor of changing the order in efi_call_phys_epilog() too. Regards, Joerg