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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF61AC433F5 for ; Mon, 21 Feb 2022 14:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377834AbiBUObE (ORCPT ); Mon, 21 Feb 2022 09:31:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377837AbiBUObB (ORCPT ); Mon, 21 Feb 2022 09:31:01 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59DF72251A; Mon, 21 Feb 2022 06:30:37 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C45F81F88E; Mon, 21 Feb 2022 14:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1645453835; 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=TpI+cKxMChFCiCtvh2NLQERVjIj4zZNRW9bSICtuUmA=; b=aCMoadF0LVnnQ+VKVgj7fnCZPEBpLO/gHwdORfjcQxrcQ/dgwjWhkKmXSz6hV4KqLu5aC5 Xzqn84pKCQo6GkMQtB3MUy6Q2dENVYWC12XgOm79IWsAq+7uf1HEcFEnql4u6lDOxHJvEY 5sUJMaJBwMh5pLnKTbc86vaCXvNVYdU= Received: from suse.cz (unknown [10.100.224.162]) (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 5A0E9A3C1A; Mon, 21 Feb 2022 14:30:35 +0000 (UTC) Date: Mon, 21 Feb 2022 15:30:34 +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> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org 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 Reviewed-by: Petr Mladek I am going to push this within two days or so unless anyone complains. Best Regards, Petr