Received: by 10.223.185.116 with SMTP id b49csp3874259wrg; Mon, 26 Feb 2018 07:30:24 -0800 (PST) X-Google-Smtp-Source: AH8x224/mwU2EwKcA6QZlS5Lc/q9Y9ah7vSIONyVF6+2YwVYIZOfOv7Q4DfqtGHJAyFGypxgJ/Rp X-Received: by 10.98.32.28 with SMTP id g28mr11006830pfg.182.1519659024796; Mon, 26 Feb 2018 07:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519659024; cv=none; d=google.com; s=arc-20160816; b=pwuVHptk6tAdgFVaXV9p5LgjicDnVw3fVvV3y53c9HgO5iCXgfHw3vaDGZcy3GQYw0 RIbo3tvltW6hyLlupy/7VzS1rw4mcvdeNCraYMUqyn2aGsod6PkA0ELHZ1SdRz/DRISp ZUuu6NDhCxMQis044lj6QTtPXmIowWHUCIpCzXpmFuDfaIMsVn8ogb9fBGhRQrQTST0E i0mi1PlfOlesaM8S3AK1CLVbCL1aYyrIuRWEdGx5H4+s2y37AyK3BYXGFp1JeX/4GToE 5x3bZJT+DLMdtJLaPhYollWY9hUdfDOCJD+MjuFN9MGr55PhLzQozpkdmvsTHYlTbYw8 GcBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=bagJUDRCKH7zioF7PNUfHq1pvTgPsdaP0zPpb2hrfwQ=; b=vpYLyEug//P5RfzXxtppdndLPMHLK5q1V0cw8xWFUg+kHv3YWiXJTu4mlsrTxG6EmJ rhzJHfwZIjY48GtK+YG6o29TTWy3lb5Hxn548G9MMGNcjkUTXiu5av6QWi/0LMwraglp Ave9uiYyOaoItMOZROeRPiibAHr+HRVwnz/ZGcROZjURfCRzm7iPLkdAkh/RIGZw+JkV ByvUPXJGgajjI/g+qIO+chQsyxO4D78kPT+yoBmlwp3LiOfYjZqA/qAP0VyXYSTKBWTI h409Qb36swxCSO0s2upxyP4n7cz5GhLig+otrnkuvFNsTCuoNRUGblpC77WMnvQR6DOh N+ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=eeDlz+Uh; dkim=pass header.i=@codeaurora.org header.s=default header.b=awsO+iZK; 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 l70si5663365pge.778.2018.02.26.07.30.08; Mon, 26 Feb 2018 07:30:24 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=eeDlz+Uh; dkim=pass header.i=@codeaurora.org header.s=default header.b=awsO+iZK; 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 S1754143AbeBZPGW (ORCPT + 99 others); Mon, 26 Feb 2018 10:06:22 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:34478 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387AbeBZPGS (ORCPT ); Mon, 26 Feb 2018 10:06:18 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0A4F760FA9; Mon, 26 Feb 2018 15:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519657577; bh=Tb//dMCSiCEyUMmlartuZFXqBV+dA1Zg294WJcyZ5f8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eeDlz+Uhos/daZr3lt3bLpowqzfPr1k2CDpyg3ggzMFenvxKSHf9/23seIJDdyMWI miY0mLBc5uOTw1Mjkm3P9BOAIH7RonN8wASqRmWALMtvncF/d74PRTSBQA1qWqyJvm DoBs/PnyxM1XzRG+9SMnTTunceUIdbWufZKIOo+I= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.84] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AB24360FEA; Mon, 26 Feb 2018 15:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519657574; bh=Tb//dMCSiCEyUMmlartuZFXqBV+dA1Zg294WJcyZ5f8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=awsO+iZKThs+8ahV4H0Jm3aCq7U7rPM8ubPurbA6JGp4LJjdHP+q0cyOUd5U4u+Rf c8qqTDhY7+l64LxnuQMbJIN3Bn3WKPWxCuOlwNVNXEK7EFEAm+ut1M+N1U6miD/MKf g7JtJojljH7HWEueWQRLTDmTlgDnHOlZ7PlVXAYc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AB24360FEA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org Subject: Re: [PATCH 2/2] efi/esrt: mark ESRT memory region as nomap To: Ard Biesheuvel , James Morse , AKASHI Takahiro Cc: linux-efi@vger.kernel.org, Linux Kernel Mailing List , Jeff Hugo , Sameer Goel , Timur Tabi References: <1519414953-5478-1-git-send-email-tbaicar@codeaurora.org> <1519414953-5478-3-git-send-email-tbaicar@codeaurora.org> From: Tyler Baicar Message-ID: <9e3fa182-0635-108f-590b-6f1966bdabe0@codeaurora.org> Date: Mon, 26 Feb 2018 10:06:11 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Ard, On 2/24/2018 3:03 AM, Ard Biesheuvel wrote: > Hi Tyler, > > On 23 February 2018 at 19:42, Tyler Baicar wrote: >> The ESRT memory region is being exposed as System RAM in /proc/iomem >> which is wrong because it cannot be overwritten. This memory is needed >> for kexec kernels in order to properly initialize ESRT, so if it is >> overwritten it will cause ESRT failures in the kexec kernel. Mark this >> region as nomap so that it is not overwritten. >> > This is not the right fix. We should only mark regions NOMAP if it is > uncertain whether the firmware may have a mapping of the same region > with mismatched attributes. NOMAP regions punch holes in the linear > region, increasing its TLB footprint significantly, so we should avoid > them if we can. Thanks for the explanation, that makes sense. > This same issue has come up in relation to mapping ACPI tables after > kexec. This should simply be a matter of ensuring that all > memblock_reserve()d region appear as such in /proc/iomem rather than > as 'System RAM' Do you know why this memory region would be coming up as System RAM rather than reserved if we're calling memblock_reserve() on it in efi_mem_reserve()? Thanks, Tyler -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.