Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2167620imm; Fri, 7 Sep 2018 11:52:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrO0Miy12JTTGNP0/I2f/HxEm2SHiDYu2kuzwkrAeK1wCH1YO4cImAUOfrHNvbZnFeuJMy X-Received: by 2002:a63:2043:: with SMTP id r3-v6mr9720912pgm.105.1536346341904; Fri, 07 Sep 2018 11:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536346341; cv=none; d=google.com; s=arc-20160816; b=QPhw3CPPqYILdnNj35uBEdNzo51piEGnGy257b+1G3CfLfZ1AhDR7YTKHjakhtHHs3 3v9+VNWUdjYkhBjtkeZVrC0gssE98cawNKwIG7YmwTFpY61udR5Z9kOf/FkD1UvQLRff HBGQI/k7632nVxGrR076bZ1+FQVcQcVdbD6UsH+U1swQoZBgKJZXauZfM2O9qBwWphli BEww1zRTWfZjx5Ahua1/etvh6P3JvtCmuo6RGIKw7FsLRk5ag0hhDojnlOIFKtSDIKxM bLGG6ii3jpQc+aT0KozZcUYcIDQkz8Dn0aVhTNDkK0hd5UmPdrS4sg76ogWuqC1YYXSM 6EZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:references:subject:cc:to :from; bh=vIIkIbgiuSUJjpz0K1r5H4tLrFnyyZwMmUr4AOpBfZ0=; b=NJKtuma7WqoehhrApJ5/S1YIvg+D/QIVTpn5VQACLjPYzpQ9gjfYXoKYRbGfCck2iW x8PNpnL3fsi6fSvaAgmza5c4i6lC5eqk9wtMzrJWy/ShvisyAhsV59FRPZuTsr1Cq+Fu P9mrKdwnRi64tDodKkp3A6LGtP7wuL04QaeCcs3cErZXaTeV/EyqXKmE6ZzUQ4GPAPPB 25WNFGE9v/K4TZbfnfD6ipaZlyCebvBg2rlXFeE7ZOgGw9KHOFoS929P92Fl/mUvBw/K BeV5v2JDvMcPZK+vviSQEfNo6dxRVQiLo/G/uq05c1CmJlVfO4eULNprJav7CqiFoAzY 3GCw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si8462970pgp.299.2018.09.07.11.52.06; Fri, 07 Sep 2018 11:52:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727720AbeIGXcB (ORCPT + 99 others); Fri, 7 Sep 2018 19:32:01 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40487 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727694AbeIGXcA (ORCPT ); Fri, 7 Sep 2018 19:32:00 -0400 Received: by mail-pg1-f193.google.com with SMTP id l63-v6so7405149pga.7 for ; Fri, 07 Sep 2018 11:49:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vIIkIbgiuSUJjpz0K1r5H4tLrFnyyZwMmUr4AOpBfZ0=; b=oz+EJwVnFHzoUl3boqy2vM+62qjUvu5dnFFhwBLIYZNc/f3TEEySiWzXNLQec72wSa Rl2Eawb2892OWoOx832VkqvgvNHBVNN6ON37UXDZ6jESE75kvOyyl8N5PL17A4+z3LcV rmftzQfq6rNBNJqiDTXmYerjP8Jq5vLCa1hKW90ugu/m0s26P44PdmFq+d22lAsHK6Ua 1VJu/GYGFn16o5Ra+jagQW+U9PK2q9SU+YFfKF/xOQHT8/zG8Cota03S2wEgmVzU0ITP oVEJHF8gu1xs51E8O5UkQZIgD/muw8VYalrSipkg54eljfHoYxHsVIcjqVTWYd4zxSIn 7a+w== X-Gm-Message-State: APzg51CNU1N/N7LPOtkSurZIe4mKPwJx87uSdSxdtd2D7avjJgUh0QBF HOVKtNYJ09akDsIrXxI3LPVi7A== X-Received: by 2002:a62:2646:: with SMTP id m67-v6mr10168793pfm.254.1536346186233; Fri, 07 Sep 2018 11:49:46 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1004:378:275a:f56d:4749:7a3b]) by smtp.gmail.com with ESMTPSA id l85-v6sm15587466pfk.34.2018.09.07.11.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 11:49:44 -0700 (PDT) From: Bhupesh Sharma To: "Prakhya, Sai Praneeth" Cc: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "Neri, Ricardo" , "matt@codeblueprint.co.uk" , Al Stone , Borislav Petkov , Ingo Molnar , Andy Lutomirski , Thomas Gleixner , Ard Biesheuvel , Peter Zijlstra Subject: Re: [PATCH V4 3/3] x86/efi: Introduce EFI_PAGE_FAULT_HANDLER References: <1536276468-28499-1-git-send-email-sai.praneeth.prakhya@intel.com> <1536276468-28499-4-git-send-email-sai.praneeth.prakhya@intel.com> <20180907112207.GS24106@hirez.programming.kicks-ass.net> Message-ID: Date: Sat, 8 Sep 2018 00:19:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2018 11:53 PM, Prakhya, Sai Praneeth wrote: > >> There may exist some buggy UEFI firmware implementations that might > >> access efi regions other than EFI_RUNTIME_SERVICES_ even > >> after the kernel has assumed control of the platform. This violates > >> UEFI specification. > >> > >> If selected, this debug option will print a warning message if the > >> UEFI firmware tries to access any memory region which it shouldn't. > >> Along with the warning, the efi page fault handler will also try to > >> recover from the page fault triggered by the firmware so that the > >> machine doesn't hang. > > > > Why make this optional? > > I made it as a config option in RFC because the page fault handler was > complicated and touching many parts (it had lots of code change and I didn't want > to break any existing functionality). Now that it's simple, I don't think we need > the config option. > > Without efi page fault handler, any page fault caused by firmware should panic > kernel but with this patch I think we are just improving existing condition (ideally). > > So, if Thomas, Ingo, Andy, Ard and Boris are ok.. I will make it as default (i.e. without > config). > > Regards, > Sai > Also, some distributions already have specific ways to handle buggy firmwares which can be at times dependent on the underlying hardware and the firmware versions. I would suggest that we enable this under a CONFIG for the first round and once it is tested with wider variety of x86 machines which have buggy or orphaned firmware and linux (and reboot) works fine with them, we can drop the CONFIG option in future and enable this by default. Regards, Bhupesh