From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dNyxg-0007AS-MT for kexec@lists.infradead.org; Thu, 22 Jun 2017 10:03:42 +0000 Received: by mail-wr0-x22f.google.com with SMTP id 77so16323425wrb.1 for ; Thu, 22 Jun 2017 03:03:16 -0700 (PDT) Date: Thu, 22 Jun 2017 11:03:13 +0100 From: Matt Fleming Subject: Re: [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0 Message-ID: <20170622100313.GB3238@codeblueprint.co.uk> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Tom Lendacky Cc: linux-efi@vger.kernel.org, Brijesh Singh , Toshimitsu Kani , linux-doc@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , linux-arch@vger.kernel.org, kvm@vger.kernel.org, Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , kasan-dev@googlegroups.com, Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, iommu@lists.linux-foundation.org, Thomas Gleixner , Paolo Bonzini On Fri, 16 Jun, at 01:53:06PM, Tom Lendacky wrote: > The efi_mem_type() function currently returns a 0, which maps to > EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for > the supplied physical address. Returning EFI_RESERVED_TYPE implies that > a memmap entry exists, when it doesn't. Instead of returning 0, change > the function to return a negative error value when no memmap entry is > found. > > Reviewed-by: Borislav Petkov > Signed-off-by: Tom Lendacky > --- > arch/ia64/kernel/efi.c | 4 ++-- > arch/x86/platform/efi/efi.c | 6 +++--- > include/linux/efi.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Matt Fleming _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0 Date: Thu, 22 Jun 2017 11:03:13 +0100 Message-ID: <20170622100313.GB3238@codeblueprint.co.uk> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170616185306.18967.8964.stgit-qCXWGYdRb2BnqfbPTmsdiZQ+2ll4COg0XqFh9Ls21Oc@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tom Lendacky Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Brijesh Singh , Toshimitsu Kani , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jonathan Corbet , "Michael S. Tsirkin" , kasan-dev-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel@vger.k List-Id: linux-arch.vger.kernel.org On Fri, 16 Jun, at 01:53:06PM, Tom Lendacky wrote: > The efi_mem_type() function currently returns a 0, which maps to > EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for > the supplied physical address. Returning EFI_RESERVED_TYPE implies that > a memmap entry exists, when it doesn't. Instead of returning 0, change > the function to return a negative error value when no memmap entry is > found. > > Reviewed-by: Borislav Petkov > Signed-off-by: Tom Lendacky > --- > arch/ia64/kernel/efi.c | 4 ++-- > arch/x86/platform/efi/efi.c | 6 +++--- > include/linux/efi.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Matt Fleming From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com ([209.85.128.177]:33483 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160AbdFVKD0 (ORCPT ); Thu, 22 Jun 2017 06:03:26 -0400 Received: by mail-wr0-f177.google.com with SMTP id r103so16371266wrb.0 for ; Thu, 22 Jun 2017 03:03:20 -0700 (PDT) Date: Thu, 22 Jun 2017 11:03:13 +0100 From: Matt Fleming Subject: Re: [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0 Message-ID: <20170622100313.GB3238@codeblueprint.co.uk> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Tom Lendacky Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Brijesh Singh , Toshimitsu Kani , Radim =?utf-8?B?S3LEjW3DocWZ?= , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini Message-ID: <20170622100313.3xbzYg4INrf-CV-854Yb5jVXHvtwMgzGyvnCUWEniE0@z> On Fri, 16 Jun, at 01:53:06PM, Tom Lendacky wrote: > The efi_mem_type() function currently returns a 0, which maps to > EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for > the supplied physical address. Returning EFI_RESERVED_TYPE implies that > a memmap entry exists, when it doesn't. Instead of returning 0, change > the function to return a negative error value when no memmap entry is > found. > > Reviewed-by: Borislav Petkov > Signed-off-by: Tom Lendacky > --- > arch/ia64/kernel/efi.c | 4 ++-- > arch/x86/platform/efi/efi.c | 6 +++--- > include/linux/efi.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Matt Fleming From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by kanga.kvack.org (Postfix) with ESMTP id EE5566B0279 for ; Thu, 22 Jun 2017 06:03:16 -0400 (EDT) Received: by mail-wr0-f198.google.com with SMTP id z81so3188180wrc.2 for ; Thu, 22 Jun 2017 03:03:16 -0700 (PDT) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com. [2a00:1450:400c:c0c::235]) by mx.google.com with ESMTPS id k189si814113wmg.36.2017.06.22.03.03.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 03:03:15 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id r103so16371252wrb.0 for ; Thu, 22 Jun 2017 03:03:15 -0700 (PDT) Date: Thu, 22 Jun 2017 11:03:13 +0100 From: Matt Fleming Subject: Re: [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0 Message-ID: <20170622100313.GB3238@codeblueprint.co.uk> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170616185306.18967.8964.stgit@tlendack-t1.amdoffice.net> Sender: owner-linux-mm@kvack.org List-ID: To: Tom Lendacky Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Brijesh Singh , Toshimitsu Kani , Radim =?utf-8?B?S3LEjW3DocWZ?= , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini On Fri, 16 Jun, at 01:53:06PM, Tom Lendacky wrote: > The efi_mem_type() function currently returns a 0, which maps to > EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for > the supplied physical address. Returning EFI_RESERVED_TYPE implies that > a memmap entry exists, when it doesn't. Instead of returning 0, change > the function to return a negative error value when no memmap entry is > found. > > Reviewed-by: Borislav Petkov > Signed-off-by: Tom Lendacky > --- > arch/ia64/kernel/efi.c | 4 ++-- > arch/x86/platform/efi/efi.c | 6 +++--- > include/linux/efi.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Matt Fleming -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org