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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6077ECE58D for ; Tue, 10 Sep 2024 10:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wPm/0cQYGbQ9bv+1W4Bq/e1N6Sw/kJRv3Xp3WjZvM18=; b=xIu0JpHtDgdhWWsgT4i690NDsP uOAhKmsHDta9krengF+Xi9o8gw6cM3o9DxBTOqjmAWjhcrE8UfT1q8xPwCaVVNrjQHRDvuml9BywJ 26h8OPjRmeLwnWa5PMXFr36MtTwzqDhsHkhCux60DszzgxarhclnrrZToQbWp11NFuDK2JoAtT+Lr 0pfr7TKgHcaAqsM48R8vtqGwXCrFbCAYgqvjG8V/JlJNDzHG2rGhq8MdGWrAxORjX9qY8T+vFwkWl iun1LxQGYv8ATlu0bdGKwGx6WhXYhXO4JJJFA8UYfSILTLcfcyNYq2O2HHEit4yHx/1+QoA1HuROF q62+6Hag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snxo7-00000005B3I-0dPQ; Tue, 10 Sep 2024 10:09:11 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snxkV-00000005A2m-1JH2 for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2024 10:05:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id F275AA444AA; Tue, 10 Sep 2024 10:05:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0674C4CECE; Tue, 10 Sep 2024 10:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725962726; bh=DLrMOWYFV1dYuWjvZRcOpD1VWr/pzu3RG8p181wCNqM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QyDw6Z2VSdVrcTO1xBJiH/TK9lMkjBG2boW4cmgvG3+kmQlhVMUUrqr4N7Y71FZzG r1DEB3QDEUQyCxDJiXE0BdBq4Nbd5oW2kuePdWNdasaUyYcF/G/yFpWTKgM9OSgvP8 vnnIMmhYSsUioJOkqfv+/No7fu4Yjk1x91yQfeG8NeLekay1QHFRH8uMcNSER3vzDA 8WRzhKKoX9O17xpZffwXdbceRmaR123cobfp+7GfY7rgw/8fqEGNayniVQ4GZ6veWi vmCHgbiF8Et5Gw6AjZcweveyJDsF3uZ6iHxtnqs5jDRZRxXn/XtfI6ZNsbvzvjn06R 53xDZG6vihgxQ== Date: Tue, 10 Sep 2024 11:05:19 +0100 From: Will Deacon To: Sebastian Ene Cc: akpm@linux-foundation.org, alexghiti@rivosinc.com, ankita@nvidia.com, ardb@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, james.morse@arm.com, vdonnefort@google.com, mark.rutland@arm.com, maz@kernel.org, oliver.upton@linux.dev, rananta@google.com, ryan.roberts@arm.com, shahuang@redhat.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v10 4/5] arm64: ptdump: Don't override the level when operating on the stage-2 tables Message-ID: <20240910100518.GD20813@willie-the-truck> References: <20240909124721.1672199-1-sebastianene@google.com> <20240909124721.1672199-5-sebastianene@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240909124721.1672199-5-sebastianene@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240910_030527_434865_F0F695CF X-CRM114-Status: GOOD ( 12.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 09, 2024 at 12:47:20PM +0000, Sebastian Ene wrote: > Ptdump uses the init_mm structure directly to dump the kernel > pagetables. When ptdump is called on the stage-2 pagetables, this mm > argument is not used. Prevent the level from being overwritten by > checking the argument against NULL. > > Signed-off-by: Sebastian Ene > --- > arch/arm64/mm/ptdump.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Will Deacon Will