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: 13710190 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E22CFC2BD09 for ; Mon, 24 Jun 2024 22:07:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C4BE6B036B; Mon, 24 Jun 2024 18:07:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 374AF6B036E; Mon, 24 Jun 2024 18:07:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23C8F6B036F; Mon, 24 Jun 2024 18:07:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0528E6B036B for ; Mon, 24 Jun 2024 18:07:55 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 79EC8C13AD for ; Mon, 24 Jun 2024 22:07:55 +0000 (UTC) X-FDA: 82267170510.14.C4A8043 Received: from mx0a-00823401.pphosted.com (mx0a-00823401.pphosted.com [148.163.148.104]) by imf17.hostedemail.com (Postfix) with ESMTP id 7222140010 for ; Mon, 24 Jun 2024 22:07:53 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b="z 1hvrSN"; dmarc=pass (policy=none) header.from=motorola.com; spf=pass (imf17.hostedemail.com: domain of mbland@motorola.com designates 148.163.148.104 as permitted sender) smtp.mailfrom=mbland@motorola.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719266862; a=rsa-sha256; cv=none; b=lObsG/vtxGwfbQEM1Zy5z6UnK9hSzVLvdIcCv2uOwQS8HdY5RCo3hA2oEAMcMTAt160WPi xU53xiYKmINXpsiEK1anmKioUv5orwjWt+oh0qZsZHUGbIWEcZ+d7KcoHBO/QokJmi93fU ll3vWzfYpwcOgk2g3mb/TsQxxYudKMo= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b="z 1hvrSN"; dmarc=pass (policy=none) header.from=motorola.com; spf=pass (imf17.hostedemail.com: domain of mbland@motorola.com designates 148.163.148.104 as permitted sender) smtp.mailfrom=mbland@motorola.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719266862; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=rh6vKXe7UkpTIRLRBOBHrto3kTiRhPZ1UTIBaRKUd9U=; b=hVimYIPZ8hfWUmwINcrwdtwMzvT/cx2OZOIZ9jkqOxJ6eQWI/ASJpnQVWIC8jE5qAdQHgs 7g1/ZxrXQVvUQqYYNV/+iL95hLUDR3A6ZInMBeb98ytc8lTSeVHz8nONqwIH/tPijro+Os ZaLbpSY0ZEB+ocyvnFzECdcpq2Exhwk= 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-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 7222140010 X-Stat-Signature: pjh54orjw1tsf4qaa8p941r1e83qg8so X-Rspam-User: X-HE-Tag: 1719266873-60903 X-HE-Meta: U2FsdGVkX19mCu59K/PlyWIoNscjq66V+JX5pnMvSmH33DfZzpAh/Y/2b5SXLyw8AaLrDgAdoZKXoYxjq7ljAXNQLHOwMO2QJjmcSYGM3eLK5CxHu+bl1PtzClH/JTitnBy+Ybi7j6YdmVHggtYzL/F5w5dLURe7Lrx8O0rpZ9OTi2ByTF9gQP5gA55nOO/DCSc6HuorIi0ONY9Rj88lZbXlDP7my+Kxud0xWrgZ+9ioyEhuELNHdL6IwX/hPJ0rOTNJfjVP4jz8cqL55u3wF5xkzsGgr4vZWhPw2nngyXVUE6X8hEsoT/uxgaVHbPyK61ZpI+SV/dJiE23vIEMxgqA/spkt9iS+uImLUU9SqhY+NSHve2ea2IndII+porQSXDOxNjzuer2JKRFIlBAQMG5p2bJdvhRMjcbTP5Jgrmmgo99B9tSa3WNDccjwoCbYWmnGsqYf3bC6CzVucqvNYZBeykHRcjb9Ce6ckFJuHm95L7Yr8MpDf1lKqvGVilXdy1+zEkKOx5W/NXT7BiB854v7QN3Hz0RlPwrMX2vLHPw7jTw39qzz2yrFwejzNEeBfGw7oQhhqhn2ghiPLmxTRQha/DGXPsXM5qGWleWad797k6/pv2nlUc5pWlqIM2jCr2T5C7dclWPhjBIqRU2zN/eUfkIr82dTVJBlYsGGBGGyYamPRPfq0CPLEecEI9PLZF6mxgq1Wil8mmzu8sjO7BIxD5XUuEbkAc3IMRHG/30hGb9CbszXNRcZ1fb556Ju8iWzMBOJOGPK7GiqzbBFyCMvlUg2pq7masvtrcHStgFijU6ElyMBGeuK3W+o9cqKVrSAYbXA9ujZHIkWLAB0mX/NupF+G2vAKCbOLN5CSp7OYNk/3gmd5e3mlVp3i/J6XF6RY49aVNDRs+w0xIVAPDeBpT0FwW/4yBT1yR/mQQOrdCFeoXvR/PRDASs1wcK77U2/DdT95/Q6sBkPi5L +ifs2u7j AoirN5RO2Kl+kMGPGtdVssAzJ/fumV2TzgZIp8G8z1MbJsJG9JZ9yASbGG4ZgXs1O+LFVIo73BClk0stuQac6XqzuZUnNY4VLJN5TrLax8jVjDdRYMs+V6S79CJNyHi/grrrkVYEAdMc/YJOtDLBk2L/t0KtKRFdGApk+XbxupFh3xw1nodtoaEqMvdE4m3OKpeBETHOFj1BLgxtUjbdI0+eAY1r9ybRMkYLUk3AsyvShomZTRvjpjklF6uSCf818FMRdO1nbUY/5aQVedbW3dmH92YPGI8tdV3lJlNBglZsp/ObrH7IYgPO1ZPJmCReqzkjLmMF00PpkJVmZZ0u0QmXh+QUPKVjR/HzPcZCHmgkY8I84yuceeUKqPRw+IBmZlrbP3LS2qS5fmZvp6dRhQRD8QWRGKyVKXA/l X-Bogosity: Ham, tests=bogofilter, spamicity=0.000028, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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(-)