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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3789C71157 for ; Wed, 18 Jun 2025 18:16:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 299746B008A; Wed, 18 Jun 2025 14:16:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 24A3E6B00DE; Wed, 18 Jun 2025 14:16:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 139336B00DF; Wed, 18 Jun 2025 14:16:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id F36F86B008A for ; Wed, 18 Jun 2025 14:16:08 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AC8A8140947 for ; Wed, 18 Jun 2025 18:16:08 +0000 (UTC) X-FDA: 83569325616.04.39F0E31 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf22.hostedemail.com (Postfix) with ESMTP id 0501EC0016 for ; Wed, 18 Jun 2025 18:16:05 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ZG5TVRXR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=6HSeBBKq; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=1SirJ28+; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CWid6ThH; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf22.hostedemail.com: domain of pfalcato@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=pfalcato@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750270566; a=rsa-sha256; cv=none; b=ptmQNpyKykGmhlmz81vmT0B8FMRJh1ZqfKbogMM3BhQClrze44B4I9FFfHNiRIdhg3ItYN dlNAwdzkYVz0PSdH/YfGRhqdoFwAJyfjTMLEyy06tiGFdsDT/H8VNhAs0wR5lfSRAIsPj+ 1nKDzrMUNQjcv9Q2B8BgSsizSOeKhCI= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ZG5TVRXR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=6HSeBBKq; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=1SirJ28+; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CWid6ThH; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf22.hostedemail.com: domain of pfalcato@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=pfalcato@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750270566; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JlOdVz/a4EQlXZp3F15gJUtSHGLctHhNiSjojlEQkSw=; b=NUcAxP3KdSlqzvtIdcl59SE1TImJbfNcWfmEMmGNqb1YG2tdnePA55vgk7qCdLcYajkV5R LdmHaby/adoGDSzSXTOokSpD/9Gk27kFjC6gLaDn0Ao5GUFx/UCe8089KdsSu2pjkJp7sx 2zpX1Opfxvla9SUQQbvsHcvSnteBIn4= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4406A21188; Wed, 18 Jun 2025 18:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1750270564; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlOdVz/a4EQlXZp3F15gJUtSHGLctHhNiSjojlEQkSw=; b=ZG5TVRXRYlO9AHwq0tsZE6lrWi7ON4KFYMjs2CFWeXBgiB5JuRbn89hwRzJj5glZXz62bb LkOA2E4ElKrzFebPAV4Q3EXquyQi0sDb9oNFHIvzk0LDFO/tRWAzcJrMFtNkSmSidXoR1O /+ytFqVrlDoG263L1RsyBzRrNAZs1uY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1750270564; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlOdVz/a4EQlXZp3F15gJUtSHGLctHhNiSjojlEQkSw=; b=6HSeBBKq4tXisrY4y6EpNgf9zH6o2g6WmXeVPz2L7c6O9Bx1rrfTCewkbtzVlzRSV+IQjY P994sg1c1hd17LDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1750270563; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlOdVz/a4EQlXZp3F15gJUtSHGLctHhNiSjojlEQkSw=; b=1SirJ28+SYOXAMpJ/3KpNwIx4cYdEVfTH4t3ooG1iDK4zxRkKj6FWQ6tL+MPtUtzX6uGRE Z/9fIe0bJy5Ssl1o6vXTOwy0AJ7CgvxAO9YZ0lGjeBOsTzi4mOGmSjUhXfuGruPZ1XWf5O 5qUQf2SYz93EyrZtZ/IUNalWp12kdRo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1750270563; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlOdVz/a4EQlXZp3F15gJUtSHGLctHhNiSjojlEQkSw=; b=CWid6ThHJ+CCV2iRfOHky4ZSHshJ0AkvVWqvco6WAZdy/lTc7MTqshW6ljrxFgjUxP6Wv8 JgMgWpjNDBHYw6Cw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7D77113A3F; Wed, 18 Jun 2025 18:16:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id hfu7GmICU2hNRgAAD6G6ig (envelope-from ); Wed, 18 Jun 2025 18:16:02 +0000 Date: Wed, 18 Jun 2025 19:16:00 +0100 From: Pedro Falcato To: David Hildenbrand Cc: Anshuman Khandual , linux-mm@kvack.org, Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Jonathan Corbet , Andrew Morton , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [RFC 1/2] lib/vsprintf: Add support for pte_t Message-ID: References: <20250618041235.1716143-1-anshuman.khandual@arm.com> <20250618041235.1716143-2-anshuman.khandual@arm.com> <5d037cb6-91a7-47b7-a902-c3e36f2adefb@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Queue-Id: 0501EC0016 X-Rspamd-Server: rspam10 X-Stat-Signature: qybe7hyywcfp7qc5uemx37knmmj4tz9j X-HE-Tag: 1750270565-495250 X-HE-Meta: U2FsdGVkX1/Zj9BgoUAbq18JYQM+Noup6HRVm3eRtXrZj1+udVMMszAMzbaWqsWOzp4bCz4G0rS5h3XtIrS3dQ1SRITkzO1N8PyKh891+m3GIbv1hmj3s3sdu6MpACh4BUfgVC11y0egg8OO5LarroM/qHEqAmwX2P6Mp77WHRfspQp//PPnuig0Y7II1sR6CL15jXxsJQXoQQKZ8vIEaMN6Gfz2aB2AyX3AzlxM7BQuR0wzDuu9MaT5Z0oIGviefkGYMad4qnpEqffbbeBCyOa+alN+PXPimKDb55yJep6GhEd6mC6fX4PqpFtAgorMvUaEROLm84Gcko1gQucjxhreXlJb0H51U1Y2oicsXFca28I7UwLDhJwGcw3dGNpj78gbDA2qNQyKRqgkfe1yDcHStEnI+gS6HIJhfGPQE3+6tbL2B+0khyTzUb5uag3K0vyDCfoK4JltNH1LIE855KZugyF16w4qRTW2yBy5Vm8PfBQrmJrFdt4+WRPa4++M+uUt18+uKv1asz73Xw052+QCqxL8ANJaG9iHCKDGWQTvE/xGzX+cdiPxp7e/mVlGCWmXrE7FcUYFZlU5tdz5Cfo6HaMlJDbJcpiXkUL8gZ40BnKDf6yMmxJts8Hdaqx6c/efwKNVTYsLIoS/zePSY2kwC3UiEXDWZWj56fuD6ErELJNSYdcrMMoVXZ5CEGbf2E9zijf1u5rvTGXvTteum5TUENvlE75VopvqSRx39kdjS58blm5ZARSN0khBIq1ryVXyaWlK3tU5N4uRlVUK1+76DVUwPzniF49drjSt3Z6bQtFQfVJ4jK7Xnig12U+oSOLViluOky+hblbsz66sUJUp7g9m5LU6/QMFiiPvkJscB82teychDZ+Tjs8xNhy8PZ5abDQJ+525aXLMCA/0dvmfQueTuf6GVW0PLz7WAWlGvxecZjGgm1EfIDGaxp1tFVARt0ozw2G9JMZevBO yhRdpshs Eoyt4gpuP6FRZPr4lhyfEK1WOOHKdf6sRGsfMn5Sjli+9puo3lAAeHSIt+AKjjJROxL3ZTLZuOYKHVXIzhECVjQg4YPh1AOLmLjGO7uLoT2mxPITFOZGwhJwRlJUpiUG09LmNYtMKM+cG7sNj+NqIngHoScrrJLFeZ20MUJztYZuwGhucZA5pW6x8z/LBj0t5Rt9n02HQv6C4YPEyhOMVHXrt4orgbTlYVKHsX7UHAOYWAMk+6NxMkfpMB4EGlvKDLExttqMN+e9J5ynB3nG/Ue8GHwN4c1U46YlAvtE+ZfgBCMPsz+i9yOpHzSauH6DncxI2quloe92AU/5k1b5PrFawWluofyDkYUOd8En1VhNBuXuYLucdoH8FwrSyQOrLtxJineRa5AWzjkSPVWr3r7VBERnuCpIohIutWGUMdZieD8lDLc0N9Ig12os8iPfxIl8aECywX4DnDOjW4/Hr5VZabD/So69wEdEMsxcQPNNzVRwyKU0DKHUxEnyuP1lkb/816rPwhKtdWSH0sUuPuqIcqhmokr9RN/foIQi+Q0cocuJ743Nf/ZB8nYGwYM0FTCYiyoZNKQwimBHZ2QoRJhua5qzJP5MvHpxwyxwDfhEbUpNYcnaz4oBGyDifWV6lB6qIXkJrNcCjXk/7Rj0v9qWSXunfy9Dn7J8SypHyL+FCPFU/Bx1pqaANOQXapJ/yU6htyAs8qJNG4QK+GTpiOTitEiOXcLwG/rBUXn5TTLKaja44wOcKW2uMpJ0ARZcR7Zrz1bv4kXjZnQ4qsGEg1ZPgFQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Jun 18, 2025 at 10:44:20AM +0200, David Hildenbrand wrote: > On 18.06.25 10:37, Anshuman Khandual wrote: > > > > > > On 18/06/25 1:48 PM, David Hildenbrand wrote: > > > On 18.06.25 06:12, Anshuman Khandual wrote: > > > > Add a new format for printing page table entries. > > > > > > > > Cc: Petr Mladek > > > > Cc: Steven Rostedt > > > > Cc: Jonathan Corbet > > > > Cc: Andrew Morton > > > > Cc: David Hildenbrand > > > > Cc: linux-doc@vger.kernel.org > > > > Cc: linux-kernel@vger.kernel.org > > > > Cc: linux-mm@kvack.org > > > > Signed-off-by: Anshuman Khandual > > > > --- > > > >   Documentation/core-api/printk-formats.rst | 14 ++++++++++++++ > > > >   lib/vsprintf.c                            | 20 ++++++++++++++++++++ > > > >   mm/memory.c                               |  5 ++--- > > > >   scripts/checkpatch.pl                     |  2 +- > > > >   4 files changed, 37 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst > > > > index 4b7f3646ec6ce..75a110b059ee1 100644 > > > > --- a/Documentation/core-api/printk-formats.rst > > > > +++ b/Documentation/core-api/printk-formats.rst > > > > @@ -689,6 +689,20 @@ Rust > > > >   Only intended to be used from Rust code to format ``core::fmt::Arguments``. > > > >   Do *not* use it from C. > > > >   +Page Table Entry > > > > +---------------- > > > > + > > > > +:: > > > > +        %ppte > > > > + > > > > +Print standard page table entry pte_t. > > > > + > > > > +Passed by reference. > > > > > > Curious, why the decision to pass by reference? > > > > Just to make this via %p<> based address mechanism. But wondering > > will it be better for the pte to be represented via value instead > > of reference ? > > We commonly pass ptes to functions through value, not reference, that's why > I am asking. All printf/printk extensions in the kernel follow %p and use pointers because %p takes pointers, so it lets us use -Wformat with no issues. So yes, taking a pte_t * is required. -- Pedro