Received: by 10.223.185.116 with SMTP id b49csp3851637wrg; Mon, 26 Feb 2018 07:08:56 -0800 (PST) X-Google-Smtp-Source: AH8x227TkEcm1stbv1NZyFlTL+a/CFLqw8JhcBg2H2DQgpzrKzIVjwP3ZduS7ECWXra8lEma2K3a X-Received: by 10.101.98.85 with SMTP id q21mr8509502pgv.182.1519657735853; Mon, 26 Feb 2018 07:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519657735; cv=none; d=google.com; s=arc-20160816; b=Y4qujkALlO9uVcgNTI7+5Fc150Z7jh0fQkDodbjkMvPibYQYhwlDGbv3stjqXpMM2G yaqmiTMzKtvNd4hLTkMn0k6QC4hItcjK4ja9e9OEVdX07M8QTF0z4Jj8duCXNVhKxwV0 RwAAZfiM92ri1gTjhFTfKUm9+MVyALYikpPSa4X5bgkYrk4+bquV/FjX6haisvarQcr0 p8pI2nJWbfwSUU1m6VzMLX+ldrLruwRQ1G6+I+mX0x7Di9WzTkpM5/kWvt9geOrAM2gM CA00yZWKaqL5bOIs5y8c4nOD7NClNToMYF2cmS+L4O/SeQJ5o9/djv+hwmX3AsyG01Il 92ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=GpA40cIAi71SV8bvvATyz6tB/rfy6+hA/06m31oMcrU=; b=WYdW9WSqPVE5lE3X2Y6uw4o8YmcFspGeCwT3lKu43eLzPjZjiOsX0Si8TZsBO92TN+ kD4vXXLs3zRiV/8szTtM+9Y8ZUw/Me3zzV19EEn1o0R3Fv+8fQfNTImTB6I1wja7uHaQ lOJz9M6Rz19DtsZvcv3ukCLF0eW1BldzysWFU4uL6aQ5b9SNq3isxp69MQY5a+y137ax GKTecHOXyIN69DDJkzZCgeSpSYoOERVmVSx1TcgpCpFiwU4LBfO0v457vS+Yz1MAppWS DfNXH5xrBvgjZMalM5F5prGFjtjucV1003GEZMcziXL6+VqhioZY62SGDxZAohtDqDad osWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ko48S8J3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m189si6814961pfc.410.2018.02.26.07.08.40; Mon, 26 Feb 2018 07:08:55 -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=@linaro.org header.s=google header.b=ko48S8J3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754274AbeBZPHP (ORCPT + 99 others); Mon, 26 Feb 2018 10:07:15 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:40796 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754127AbeBZPHM (ORCPT ); Mon, 26 Feb 2018 10:07:12 -0500 Received: by mail-io0-f180.google.com with SMTP id v6so16400195iog.7 for ; Mon, 26 Feb 2018 07:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GpA40cIAi71SV8bvvATyz6tB/rfy6+hA/06m31oMcrU=; b=ko48S8J32Ny5iOJ3/QuoS7ZrdFM8S69LZCc8U/mEiltAuE1tVjQRC64YfaEfq6JD9c 4hf8pUr+M5tSXCU4mMsJSbcg2V4wM7TnZeoKx33fdeC1pq7M23f4tkOKrqgv2WK/zXec 13Zguly3Dc2rX5HGrT94VDCP5fTrtZsAWHHjs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GpA40cIAi71SV8bvvATyz6tB/rfy6+hA/06m31oMcrU=; b=KXcFLa5oR+nWjTjYjYKz0VHQFkHUsZ2WlE1+uw1N768DFca50JUcala22ztVog/ub3 xD12QoTPU7G/exUVcieq4H9Qpknyn5At8Fhm/2RQnMrRjcFyOKRDxYFapUVc4e66ue00 mQiJg4g9tslj1noerHPeHdERk1cz6rxTBUutS1ACl/tHlzGBgMmLX+B40S3RuUY7DLLH hN1BsJTMBqZXWrJPwNIRC4Ejhp93lwT5z9Gqx76prD/Pcoyka/Gwo0TgcRmL4meXC8MT w8SuttdU7nN46euH/6TGypG8WRjLsq5hpkxruYSbi0s/tA5DtVvABvYFbWErETo90ufF KywA== X-Gm-Message-State: APf1xPDItFKKcTIMhsUuzHNiazEqR3IOLD5C9jqCbeby8mjaB/E9La1R 99O2EgMJC1OoxAVZjuDpdWDc3lPVJrQ5awwE8Mia2g== X-Received: by 10.107.56.69 with SMTP id f66mr12030313ioa.170.1519657632262; Mon, 26 Feb 2018 07:07:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Mon, 26 Feb 2018 07:07:11 -0800 (PST) In-Reply-To: <9e3fa182-0635-108f-590b-6f1966bdabe0@codeaurora.org> References: <1519414953-5478-1-git-send-email-tbaicar@codeaurora.org> <1519414953-5478-3-git-send-email-tbaicar@codeaurora.org> <9e3fa182-0635-108f-590b-6f1966bdabe0@codeaurora.org> From: Ard Biesheuvel Date: Mon, 26 Feb 2018 15:07:11 +0000 Message-ID: Subject: Re: [PATCH 2/2] efi/esrt: mark ESRT memory region as nomap To: Tyler Baicar Cc: James Morse , AKASHI Takahiro , linux-efi@vger.kernel.org, Linux Kernel Mailing List , Jeff Hugo , Sameer Goel , Timur Tabi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26 February 2018 at 15:06, Tyler Baicar wrote: > 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()? > I don't think there is any special handling of memblock_reserve()'d regions at all at the moment.