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 2A99DC433F5 for ; Thu, 24 Feb 2022 09:43:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49E4D8D0002; Thu, 24 Feb 2022 04:43:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44E928D0001; Thu, 24 Feb 2022 04:43:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33D988D0002; Thu, 24 Feb 2022 04:43:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 2756E8D0001 for ; Thu, 24 Feb 2022 04:43:03 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 00981120932 for ; Thu, 24 Feb 2022 09:43:02 +0000 (UTC) X-FDA: 79177184646.01.4F4F107 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf12.hostedemail.com (Postfix) with ESMTP id 807D340003 for ; Thu, 24 Feb 2022 09:43:02 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 58504212B6; Thu, 24 Feb 2022 09:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1645695781; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VhYBAe1gSGopgSRSOGMTGOmOvlVoIMiOWHRCXiap7/Q=; b=P1OoCH8Hysjd2HFJr+09bFIvyRIBq+BM0fJ3CCR0CtN2K6H83HzE2Px/uJJs+A7wa3CuRY +QJ3u5s/4vjmLZRyQytgjCjDBZc2CbBbNEJJnejBXcGyH6Lkpn+VjoyLhqVcwe18Rkbx2k f3LLmhPlGtAZPvxlMix5S8oq0NCJNm0= Received: from suse.cz (unknown [10.100.216.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F21E2A3B87; Thu, 24 Feb 2022 09:43:00 +0000 (UTC) Date: Thu, 24 Feb 2022 10:43:00 +0100 From: Petr Mladek To: Christophe Leroy Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v2] vsprintf: Fix %pK with kptr_restrict == 0 Message-ID: References: <107476128e59bff11a309b5bf7579a1753a41aca.1645087605.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <107476128e59bff11a309b5bf7579a1753a41aca.1645087605.git.christophe.leroy@csgroup.eu> Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=P1OoCH8H; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf12.hostedemail.com: domain of pmladek@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=pmladek@suse.com X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 807D340003 X-Stat-Signature: u6318fqgbkbmc536zr1dmuje6r9hpk7c X-HE-Tag: 1645695782-818747 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: On Thu 2022-02-17 09:49:59, Christophe Leroy wrote: > Although kptr_restrict is set to 0 and the kernel is booted with > no_hash_pointers parameter, the content of /proc/vmallocinfo is > lacking the real addresses. > > / # cat /proc/vmallocinfo > 0x(ptrval)-0x(ptrval) 8192 load_module+0xc0c/0x2c0c pages=1 vmalloc > 0x(ptrval)-0x(ptrval) 12288 start_kernel+0x4e0/0x690 pages=2 vmalloc > 0x(ptrval)-0x(ptrval) 12288 start_kernel+0x4e0/0x690 pages=2 vmalloc > 0x(ptrval)-0x(ptrval) 8192 _mpic_map_mmio.constprop.0+0x20/0x44 phys=0x80041000 ioremap > 0x(ptrval)-0x(ptrval) 12288 _mpic_map_mmio.constprop.0+0x20/0x44 phys=0x80041000 ioremap > ... > > According to the documentation for /proc/sys/kernel/, %pK is > equivalent to %p when kptr_restrict is set to 0. > > Fixes: 5ead723a20e0 ("lib/vsprintf: no_hash_pointers prints all addresses as unhashed") > Signed-off-by: Christophe Leroy The patch has been committed into printk/linux.git, branch for-5.18. Best Regards, Petr