From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45121C4363A for ; Wed, 28 Oct 2020 22:36:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 020CE20725 for ; Wed, 28 Oct 2020 22:36:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388420AbgJ1Wg0 (ORCPT ); Wed, 28 Oct 2020 18:36:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:51268 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388077AbgJ1Wdl (ORCPT ); Wed, 28 Oct 2020 18:33:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1030DB94D; Wed, 28 Oct 2020 13:29:56 +0000 (UTC) Date: Wed, 28 Oct 2020 14:29:54 +0100 From: Joerg Roedel To: Arvind Sankar Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , x86@kernel.org, "Kirill A. Shutemov" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mm/ident_map: Check for errors from ident_pud_init() Message-ID: <20201028132954.GK22179@suse.de> References: <20201027230648.1885111-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027230648.1885111-1-nivedita@alum.mit.edu> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 07:06:48PM -0400, Arvind Sankar wrote: > Commit > ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support") > added ident_p4d_init() to support 5-level paging, but this function > doesn't check and return errors from ident_pud_init(). > > For example, the decompressor stub uses this code to create an identity > mapping. If it runs out of pages while trying to allocate a PMD > pagetable, the error will be currently ignored. > > Fix this to propagate errors. > > Signed-off-by: Arvind Sankar > Fixes: ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support") > --- > arch/x86/mm/ident_map.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Reviewed-by: Joerg Roedel