From patchwork Tue Jun 18 14:37:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxwell Bland X-Patchwork-Id: 13702491 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 8E9B9C27C4F for ; Tue, 18 Jun 2024 15:10:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CAAC6B02ED; Tue, 18 Jun 2024 11:10:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1547D6B02EE; Tue, 18 Jun 2024 11:10:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0F746B02EF; Tue, 18 Jun 2024 11:10:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CFB2F6B02ED for ; Tue, 18 Jun 2024 11:10:13 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D9EDAC3B11 for ; Tue, 18 Jun 2024 14:37:45 +0000 (UTC) X-FDA: 82244263290.14.00F62C8 Received: from mx0b-00823401.pphosted.com (mx0b-00823401.pphosted.com [148.163.152.46]) by imf13.hostedemail.com (Postfix) with ESMTP id 04AC820015 for ; Tue, 18 Jun 2024 14:37:42 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b="K u35k3s"; spf=pass (imf13.hostedemail.com: domain of mbland@motorola.com designates 148.163.152.46 as permitted sender) smtp.mailfrom=mbland@motorola.com; dmarc=pass (policy=none) header.from=motorola.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718721456; 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=6Mjw2tZfiMJ6uFQ21cibQZKdgxepVkmAZq6TGlRIs6s=; b=FsLBi/3hlalh6MIrWZ9gZPOPCSF+D655Vf7VHjH2njKZJnUylvC69aLObmBCvEmDQBDg7j 4L0C2n5q/POyVDVSyBwEoone+Js+rTubz6+/HBnf4Fem0wFYfoCWY1TBhLA6L/m1Em68AQ arNdIdEG3yJc4KoJfED3Z7/5EYP+4WA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718721456; a=rsa-sha256; cv=none; b=qZ+rxWsikgugp+7bvYGRrIeBuqZEas5Cqg0d1pyesbn6CuhZZLnGNyzgDfvGj6KKaF6wLR lBSIU0wp6SPSqJLty5o6z6BmyX8o8SNPbpxmXNKC2pUNA3B7TxW5y3+hMf5YmTVGy2ukcT 2IVkeGOUJfYqHErTvf/48DMGxmMwpu0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b="K u35k3s"; spf=pass (imf13.hostedemail.com: domain of mbland@motorola.com designates 148.163.152.46 as permitted sender) smtp.mailfrom=mbland@motorola.com; dmarc=pass (policy=none) header.from=motorola.com Received: from pps.filterd (m0355090.ppops.net [127.0.0.1]) by m0355090.ppops.net (8.18.1.2/8.18.1.2) with ESMTP id 45ID7VG6016852; Tue, 18 Jun 2024 14:37:34 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=6Mjw2tZfiMJ6uFQ21cibQZKdgxepVkmAZq6TGlRIs6s=; b=K u35k3sKb/hwe5r6DQ+an+DiZErYoP+FlxXltcHOVH0ZpyQnC0QYc/bRGfemHQYda SI5DWRGAWxNKAQQdJOpfbDnRU6MCkmGGJQuAq5ZdP9YdVLu6o6v3O9JrHysPno27 86TqMRK9zrfSrrI4athTEedOvHuWkt4mDRvk0+TSW0VKG5QQkE1imAuNV3QHc8X0 yhtfumdL3xRjS5A0LVuO/AlqMUMiXzsxI6teCrQbvA6JXSFPzNw2MD3MBhNhpS5J WTQk5jq5mf5cAQp9BbzMwq//CJwNNDUb4mVDQ+VCGiQFAbbcdBf8YKmszcFdSWfN XpwZxk7c8gUtnkZemuYMg== Received: from va32lpfpp03.lenovo.com ([104.232.228.23]) by m0355090.ppops.net (PPS) with ESMTPS id 3ysp9ry6sy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jun 2024 14:37:34 +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 va32lpfpp03.lenovo.com (Postfix) with ESMTPS id 4W3Tqf0Zkyz4yjWh; Tue, 18 Jun 2024 14:37:34 +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 4W3Tqd65lDz3p6jp; Tue, 18 Jun 2024 14:37:33 +0000 (UTC) Date: Tue, 18 Jun 2024 09:37:32 -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 v4 0/5] ptdump: add intermediate directory support Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Proofpoint-GUID: sc6QcvRW6h6thBBf9R7Kxq_tsknsRC8q X-Proofpoint-ORIG-GUID: sc6QcvRW6h6thBBf9R7Kxq_tsknsRC8q 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-18_02,2024-06-17_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 suspectscore=0 clxscore=1011 spamscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406180108 X-Rspamd-Queue-Id: 04AC820015 X-Stat-Signature: wfn1w5s9ajihhpzyuk7ph665r3dtq58o X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1718721462-431168 X-HE-Meta: U2FsdGVkX197tiGptw4oOekm6suL9w+baqWVWt0qT8g7ggsUnBwn6DduMyP4X3hKgnNa/kuNWL4Ad8DASXXNP38rLUGJlFcPyMhymTKjvdWLCjBQJRGODFgxGvCQgWxfl4fNON2w8O1cqmdr0gLoi3rG7TcdQ3AkPi8lw4V6Pu1beCB7C3ndQWCIJVQdwDXcs5e2F5tfsRMZ0ApAqo9Jq9MiOC6VGUpzpsFp6r0LNO78Jfz7I6r2L3CWd/CR1uRawmvc6D20XWuXA20c4EAtWqEWyW4MBPky7gl2N1Zzvt/RZTgpOloSf+zG2GxHHbvUnE0IqAe3gS0hpRIrjfxT2kBGCYRT+DcGIoV7UkM9psrepKI36SvrrxUwFTXP4iL3jc+mF8WncV4usNT7F25eNfiWAdQGUbAepin+/HH6QcFadHvfayVVwSi96FPrUiPQ2xVaGONsZezbHaXpykhOsw5CS5HePKa76lI2wBWSdIYVrnWDLFVym2TMfWotBtK+9zEbs07/fVFpbPPwKCHjSHRXglkK/vMpDYn/0IesTtfEGiYVSdiA5gAjsAp4cnXSEN+Vssf52ehPSHeI7+0/TBvuAn/8TbLwk3u8mLcbpGGyNcsuBHuteFM1f2noQKP6q7XJDCx+OyjRmSNfPbBSWn/xPGtym0Dm7IpGtaKaBZfZuD9PVzROxiGoHD6z2OuNOsGf97sBr/TNFC8tmj1eEa9mYZZy4EUGEszxT/xntSUadUvC71U+gfNhiPwt2jYuEFBhQrkiykUDXLnP/jj7bUQXer4KPgoJDSueH1oYKSal0OFFMHwUaOhkMJRY9gdjrrwM8ZoCQQDPeEAoNIYJzSRVYAFfh11RiNMgOXTgvoqQMHmtw7BT2PCa+v505aeMsmrR/dKI6Q0lMvWNVQa1lETvPErITFB0pRXhSpp4tsGRH/vn+Fi0mOkQIg6fux9oFmG8k5g32NYoOFwDIfU 0UN/5JSu MxcM+AzW9M3R6YDLPijGgSRP+MTqxAa4mHKfedvA9cE4UKawIj1JePXDKZDS5CENdv2W985xQPkFsM63eNETdfX8VxtcSAFL4zqH84h/z+fs60dS2gIgZABOnE7gpK+3ZEjWIqchlfRHsMVynCjpmn8YrUv1BUsaAbGSwsH0762kgFRRM3BHSfo7+4BxQfhd1jbcbHRkAndpZH5mM0V9AX3GcWkMLN8fDC8gRGscylHka4Xzs8x0BlC8+rpjCTfqefC5mv+swZVk3IXVY7y/Rgm3q2JfgNJ4RH/6Hm00kPGMJx+VT9prWM7VhDW0JUtSOjEe45xEOnKPVLMzUktTx7T/LWuQy2OW18YFkjldjjfh6V8bIeq6cjE7Lzg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000856, 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 many 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) 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 v4: - 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 (5): mm: add ARCH_SUPPORTS_NON_LEAF_PTDUMP arm64: non leaf 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 | 126 ++++++++++++----------- arch/arm64/Kconfig | 1 + arch/arm64/mm/ptdump.c | 149 +++++++++++++++++++++++++--- mm/Kconfig.debug | 9 ++ mm/ptdump.c | 21 ++-- 5 files changed, 217 insertions(+), 89 deletions(-)