From patchwork Mon Jun 24 22:07:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxwell Bland X-Patchwork-Id: 13710192 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 DF2A5C30653 for ; Mon, 24 Jun 2024 22:08:19 +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:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Owner; bh=rh6vKXe7UkpTIRLRBOBHrto3kTiRhPZ1UTIBaRKUd9U=; b=gE6Y84tvODTqRijc9Km30LylOA Bt/TCGiHWicl4tmd4kb0np6yX8v7t4NTriQUEd5pOzaH143fM4QmCFSWVFNhp6Ym1aibATE4EubB+ 1eX2Kp/AymniantEOwL3mV8fwgITyeSqM2XMlEoZDqQg+tDacoHGiwsqCUMcX6UoaRV4/zNpGNoOM 3bMUPdLNB3RZ2BUXMXjGrnYQ/k9TgTqprveUTxHad+Isg9Ux3JHMblY0Nd3kpSBnzldiM/98OeVAP E3IL0tSQojwBsj3hdV2uWkv1EZUUBxtnxRmu7UBGjtbI2+r6hKxK3UBHQGOy3azlBCSJWfYYpmP8+ VztGKqYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLrr4-00000000n4o-3x8w; Mon, 24 Jun 2024 22:08:06 +0000 Received: from mx0a-00823401.pphosted.com ([148.163.148.104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLrqy-00000000n2z-2wsh for linux-arm-kernel@lists.infradead.org; Mon, 24 Jun 2024 22:08:02 +0000 Received: from pps.filterd (m0355087.ppops.net [127.0.0.1]) by mx0a-00823401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45OEu2kd021591; Mon, 24 Jun 2024 22:07:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=motorola.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= DKIM202306; bh=rh6vKXe7UkpTIRLRBOBHrto3kTiRhPZ1UTIBaRKUd9U=; b=z 1hvrSNs0b2F/HuX0iLBrIxbIWWtprDdu46KpaHdefI4ZusVDvm/PXMqwzPnCfCZx fQkP4TcYRrTxxl2klotx6hgUfbd4yUsHQsubAydUmsZxe962Po4UZv/O7YPw/So4 noyNzNsxSg/NgEwNHsk6tnh1tcxaCA6bZWuxc0Aw/PaSyIh5MOXjBXtPYe28KBmO a+7smItmRoU5IeoG3FD4fP14PvgYeip+b1gJ9sLzLEceAQuRv49XXyGE/DXgoNbT /y3Pi5DhBpq6humP9+lKCyciEPN1bsP4DeHAv4OT4Umow3JxcbseilC8N18+tt4y zeKUiYgU9OajVT2/ETFdg== Received: from va32lpfpp02.lenovo.com ([104.232.228.22]) by mx0a-00823401.pphosted.com (PPS) with ESMTPS id 3yxbfkaye0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 22:07:38 +0000 (GMT) Received: from ilclmmrp02.lenovo.com (ilclmmrp02.mot.com [100.65.83.26]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by va32lpfpp02.lenovo.com (Postfix) with ESMTPS id 4W7MX953C0z53xyW; Mon, 24 Jun 2024 22:07:37 +0000 (UTC) Received: from ilclasset02 (ilclasset02.mot.com [100.64.49.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mbland) by ilclmmrp02.lenovo.com (Postfix) with ESMTPSA id 4W7MX93R4jz3p6jp; Mon, 24 Jun 2024 22:07:37 +0000 (UTC) Date: Mon, 24 Jun 2024 17:07:36 -0500 From: Maxwell Bland To: linux-mm@kvack.org Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Ard Biesheuvel , Mark Rutland , Christophe Leroy , Maxwell Bland , Alexandre Ghiti , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/6] ptdump: add intermediate directory support Message-ID: <2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3> MIME-Version: 1.0 Content-Disposition: inline X-Proofpoint-ORIG-GUID: raIFYTMSO8rW7zddTOUtcmSxsmAxGQ34 X-Proofpoint-GUID: raIFYTMSO8rW7zddTOUtcmSxsmAxGQ34 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-24_19,2024-06-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406240176 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240624_150800_756031_DBECC12E X-CRM114-Status: GOOD ( 13.99 ) 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 Makes several improvements to (arm64) ptdump debugging, including: - support note_page on intermediate table entries - (arm64) print intermediate entries and add an array for their specific attributes - (arm64) bitfield definitions and printing for hierarchical access control bits - (arm64) adjust the entry ranges to remove the implicit exclusive upper bound - (arm64) indent page table by level while maintaining attribute alignment - (arm64) improve documentation clarity, detail, and precision Thank you again to the maintainers for their review of this patch. A comparison of the differences in output is provided here: github.com/maxwell-bland/linux-patch-data/tree/main/ptdump-non-leaf New in v5: - Clean up and fix ptdump.c calls to reference right directory level - Change "pxd" bit specifier for non-leaf directories to tbl_bits, introduce a proper delineation between blk_bits and tbl_bits, where table entries will no longer print attributes that are specific to blocks - Because we now support printing details on table descriptors, add encodings for the ARMv8 APTable bits - Make attributes uniformly capitalized, make their explanations more precise - Fix typos v4: https://lore.kernel.org/all/aw675dhrbplkitj3szjut2vyidsxokogkjj3vi76wl2x4wybtg@5rhk5ca5zpmv/ - Inclusive upper bounds on range specifications - Splits commit into multiple smaller commits and separates cosmetic, documentation, and logic changes - Updates documentation more sensibly - Fixes bug in size computation and handles ULONG_MAX bound overflow v3: https://lore.kernel.org/all/fik5ys53dbkpkl22o4s7sw7cxi6dqjcpm2f3kno5tyms73jm5y@buo4jsktsnrt/ - Added tabulation to delineate entries - Fixed formatting issues with mailer and rebased to mm/linus v2: https://lore.kernel.org/r/20240423142307.495726312-1-mbland@motorola.com - Rebased onto linux-next/akpm (the incorrect branch) v1: https://lore.kernel.org/all/20240423121820.874441838-1-mbland@motorola.com/ Maxwell Bland (6): mm: add ARCH_SUPPORTS_NON_LEAF_PTDUMP arm64: add APTable encoding to pagetable defs arm64: table descriptor ptdump support arm64: indent ptdump by level, aligning attributes arm64: exclusive upper bound for ptdump entries arm64: add attrs and format to ptdump document Documentation/arch/arm64/ptdump.rst | 131 ++++++++++----------- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgtable-hwdef.h | 6 + arch/arm64/mm/ptdump.c | 150 +++++++++++++++++++------ mm/Kconfig.debug | 8 ++ mm/ptdump.c | 26 +++-- 6 files changed, 214 insertions(+), 108 deletions(-)