Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568417

Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into boot mem areas

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into boot mem areas
Date Fri, 27 Jan 2017 16:00:02 +0100
Message-ID <t4gam-5qf-15@gated-at.bofh.it> (permalink)
References <sYKb7-2kU-3@gated-at.bofh.it> <sYKb7-2kU-15@gated-at.bofh.it> <sYLAd-3jp-5@gated-at.bofh.it> <sYVge-Ak-25@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MeLo4TLXWHLjSMvgBTpQVjPLVeos6tx4A2oYgfCOhyY=; b=wDqQ+fthM3SWLJHL+WzVzkvEJYKkb14yBA5V/gxhhWnODP4fivFN0i3pI4uKNR5CwJ y7Y3V76sEhS05V3fg8AeADR31O0U12p5vWw1awqv5CytRZVr3iTtbKban3SRFDGXFg6/ wRsHHTwsRsWhYEOq2OOW3CZc9d/tf9Cj6wq+46BJwkyIDzyW25hPA7VtKPeiXXxA2IJb lotAjvMQyJB8NFbeYrWCvr8bF6txn6v7pkpzQY1NugLRcPUPZYrX8v2OA3QxYP8gDwOs LkZ9N7TXD9BpD1Y/O0f/DqQVypALVgnuMFB1pSKRXVmMHbJoZ1sTPhflXGOS67IjuCZe TOEQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MeLo4TLXWHLjSMvgBTpQVjPLVeos6tx4A2oYgfCOhyY=; b=K4iq/h6u9oyAuJQtLTC1lwxA3w8WhZAOf5QKU63x9WzNmliGengbyqSYmOT5IEENTs NErhlwPEZO9xJBRVDOHC07m9c9R2C0dmeFcp8PZsYquglZOisSPG0OjE/cJPFX6v2fDT DxKXd/UC5ABqjfBczN3PGj1ZvIv5+5DkbmxSjwkCfaXEu3hP/2GrysaskT1K6FyamjiC FDG95sHGA9LBi1umsFs4tgQwBo11C5WOg/v57xccGjsRTux0lEhVoxolNyu3iWsmkEss 0aDLv+I0ib7s9EA4ZLyzEs//D7QvT7t98HHJdFo9PlgZ6xjQ7md3WHqsThSeelJcsq2d eCNA==
X-Gm-Message-State AIkVDXLfjt4wP36x+Lm1ZlWPlydwkEyWpRUnwxiB/3B7xwqJMeWHiwoaT76DXKnAFTzyAg==
X-Received by 10.28.5.70 with SMTP id 67mr3378481wmf.32.1485528495422; Fri, 27 Jan 2017 06:48:15 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc Nicolai Stange <nicstange@gmail.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, hpa@zytor.com, Dan Williams <dan.j.williams@intel.com>, mika.penttila@nextfour.com, bhsharma@redhat.com
X-Original-Date Fri, 27 Jan 2017 14:48:13 +0000
X-Original-Message-ID <20170127144813.GE31613@codeblueprint.co.uk>
X-Original-References <20170112094118.815108042@redhat.com> <20170112094214.860924858@redhat.com> <87r348r0k9.fsf@gmail.com> <20170112212952.GB2709@dhcp-128-65.nay.redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1568417

Show key headers only | View raw


On Fri, 13 Jan, at 05:29:52AM, Dave Young wrote:
> 
> It sounds reasonable though I'm still not sure about EFI_LOADER*.
> 
> The main purpose of this patch is to address the invalid mem ranges
> case. As Ard mentioned I will test with Peter's patch first, if it works
> fine I would like to either drop this patch as a future improvement or add
> it at the end of the next post.
> 
> Matt, what's your opinion about the boot_only check and the EFI_LOADERS*
> question?

The main reason that efi_mem_reserve() isn't used for EFI_LOADER
regions today is because we already have a mechanism for reserving it
via memblock_reserve(), which we do during a very early stage of boot
when parsing all the different types of SETUP_* objects.

It's questionable whether it would make sense to switch to
efi_mem_reserve() for EFI_LOADER regions because then you'd
potentially have different APIs for different SETUP_* objects.

As things stand today, I would suggest triggering a WARN_ON() if
someone tries to efi_mem_reserve() an EFI_LOADER region, until/unless
the day comes when a user exists in the kernel.

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into  boot mem areas Matt Fleming <matt@codeblueprint.co.uk> - 2017-01-27 16:00 +0100
  Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into  boot mem areas Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-27 18:40 +0100
    Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into  boot mem areas Matt Fleming <matt@codeblueprint.co.uk> - 2017-01-27 23:20 +0100
      Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into  boot mem areas Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-27 23:30 +0100

csiph-web