Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1824207imm; Mon, 3 Sep 2018 10:22:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0Tx/NP1qCE4johrfQ2GG2Z+kya0cCoFquTSRSNCNtRS3hHW35nsjxR4oXrD0uFD7byo3I X-Received: by 2002:a63:352:: with SMTP id 79-v6mr27116926pgd.112.1535995371768; Mon, 03 Sep 2018 10:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995371; cv=none; d=google.com; s=arc-20160816; b=JA4SS4sXmPH4NJyB44ggHY/HggXS1TxV1AE6NDfmVRv1F9EPiX8k7Mfs/CiMICiNhe 6iGQePSRQgeCb4IrnVKr2opESMOtL1LK1MdFYagOVVf54nZEE9UzCzFpmDsAHzKLSihj 7UfINNUJLOR2Xg5x46xzh137zeEA6E84cSx5KYFjVvAkkvocvELQ4TuEyqCqFvG6+RSx S5ApmSK704XezYiZrmZavub6gawhbg+kqp4hqUGvGyHnfuSJJjxv+cHHFMhpXj3wzvus yOj99sYkxqVCrtbpUE4EW27vW/fCnnqXWwLoMI7FG85buAn1TtPw/vKTMQABS7UUhrbt ySTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=GPxv+T2qB2829w1qLTJRyH6WDSqtbcD/ptJr3Bl5tdk=; b=nbz2/1Jexgoiw4dLGqXu977yCaZXVbRyxtqxR+zjOV6+E7MoId4BNP0o7ZRHTaiSE+ AJ6gAU3GJ2dY5wesBQ/9Z/RNks8z1zziaj7J95PrkcwlPchEPmCSN6/vJf3onhp/iati sbU1hnKT4ft+ImgnrrdLYtKKAT4BVAhmQe6No2V2pdRjGJ0f3W8ljUKlJCm7sGfP8VsI h/4ScfQcc+w65B9rUnKndXvdULQ09Grcr4RHzkcgCTuPq+lCfZieeHrlz350M7I79rjS 2Wnpk3JbU47XLN2T92yptj6AI5e4kvDxWdeGXG8i2aI++pjhoj+9o1gFZXhOxS5YLuii HKbg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y27-v6si18823658pgc.152.2018.09.03.10.22.36; Mon, 03 Sep 2018 10:22:51 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730384AbeICVjq convert rfc822-to-8bit (ORCPT + 99 others); Mon, 3 Sep 2018 17:39:46 -0400 Received: from mga18.intel.com ([134.134.136.126]:48301 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730161AbeICVjp (ORCPT ); Mon, 3 Sep 2018 17:39:45 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 10:18:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,325,1531810800"; d="scan'208";a="86816379" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga001.fm.intel.com with ESMTP; 03 Sep 2018 10:16:02 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Sep 2018 10:16:02 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.8]) by ORSMSX111.amr.corp.intel.com ([169.254.12.139]) with mapi id 14.03.0319.002; Mon, 3 Sep 2018 10:16:02 -0700 From: "Prakhya, Sai Praneeth" To: Thomas Gleixner CC: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Neri, Ricardo" , "matt@codeblueprint.co.uk" , Lee Chun-Yi , Al Stone , Borislav Petkov , Ingo Molnar , Andy Lutomirski , Bhupesh Sharma , Peter Zijlstra , Ard Biesheuvel Subject: RE: [PATCH V2 4/6] x86/efi: Add efi page fault handler to fixup/recover from page faults caused by firmware Thread-Topic: [PATCH V2 4/6] x86/efi: Add efi page fault handler to fixup/recover from page faults caused by firmware Thread-Index: AQHUQqID5ZqTpFABTEWuUoO8aT1pw6TeuKqAgAATPZA= Date: Mon, 3 Sep 2018 17:16:01 +0000 Message-ID: References: <1535881594-25469-1-git-send-email-sai.praneeth.prakhya@intel.com> <1535881594-25469-5-git-send-email-sai.praneeth.prakhya@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjBkNjEyYWEtYzFhZS00MWI1LThjYTUtYTlhMGI0YzViODUwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYWoxVm5QYkhXY0FpVk41cGxtSkNjU3VVOENVc2ZycHdxaVk4Yk96cms4RUl4dnZCM0daRXZBclM1WnZuYlIyUSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > The efi specific page fault handler offers us two advantages: > > 1. Avoid panics/hangs caused by buggy firmware. > > 2. Shout loud that the firmware is buggy and hence is not a kernel bug. > > > > Finally, this new mapping will not impact a reboot from kexec, as > > kexec is only concerned about runtime memory regions. > > No. This is just a horrible hack to make completely bogus firmware work and > never fixed. > Yes, that's true. > The proper thing to do is to have a minimal page fault handler which does: > > 1) Yell loudly if that ever happens > > 2) Handles the reboot request gracefully > > 3) Freeze and disable the EFI mess for all other cases > > That does not require any hackery to make these mappings work from atomic > context and keeps the mess confined to the EFI code where it belongs. > > Ideally we just blacklist the offending system and be done with it. This makes sense to me. I will implement the above suggested and as said should avoid the need for making mappings work from atomic context. Regards, Sai