From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934074AbdA0Reg (ORCPT ); Fri, 27 Jan 2017 12:34:36 -0500 Received: from mail-io0-f172.google.com ([209.85.223.172]:34175 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932902AbdA0ReC (ORCPT ); Fri, 27 Jan 2017 12:34:02 -0500 MIME-Version: 1.0 In-Reply-To: <20170127144813.GE31613@codeblueprint.co.uk> References: <20170112094118.815108042@redhat.com> <20170112094214.860924858@redhat.com> <87r348r0k9.fsf@gmail.com> <20170112212952.GB2709@dhcp-128-65.nay.redhat.com> <20170127144813.GE31613@codeblueprint.co.uk> From: Ard Biesheuvel Date: Fri, 27 Jan 2017 17:04:50 +0000 Message-ID: Subject: Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into boot mem areas To: Matt Fleming Cc: Dave Young , Nicolai Stange , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Ingo Molnar , Thomas Gleixner , "hpa@zytor.com" , Dan Williams , =?UTF-8?Q?Mika_Penttil=C3=A4?= , Bhupesh Sharma Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27 January 2017 at 14:48, Matt Fleming wrote: > 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. Hmm, I just queued this. Should we drop it again? From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ard Biesheuvel Subject: Re: [PATCH 1/4] efi/x86: make efi_memmap_reserve only insert into boot mem areas Date: Fri, 27 Jan 2017 17:04:50 +0000 Message-ID: References: <20170112094118.815108042@redhat.com> <20170112094214.860924858@redhat.com> <87r348r0k9.fsf@gmail.com> <20170112212952.GB2709@dhcp-128-65.nay.redhat.com> <20170127144813.GE31613@codeblueprint.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20170127144813.GE31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Fleming Cc: Dave Young , Nicolai Stange , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , Ingo Molnar , Thomas Gleixner , "hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org" , Dan Williams , =?UTF-8?Q?Mika_Penttil=C3=A4?= , Bhupesh Sharma List-Id: linux-efi@vger.kernel.org On 27 January 2017 at 14:48, Matt Fleming wrote: > 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. Hmm, I just queued this. Should we drop it again?