From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76BFD3F86F5 for ; Thu, 9 Jul 2026 11:28:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783596522; cv=none; b=FS/GqqsG2M7RA5u3CEFWCNDQcvaUVPI9P8ABtL8oi6TaVxfdjp2XKfDf/gGvZGeG3CUmB4uEaS2u2yTTZMsW4c/EUbQ26Id1rIGrulhASzmR6NKomIJ26FIS5uenAzDfn2CILkFF+5uP3KixG7zF0eURo03LkVu8igmpcoz9GC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783596522; c=relaxed/simple; bh=zR5IvobiX93juVmkNYxE4pwPAFvrl3VzehnUf95zxCk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MqRtirRxq6ctIQgary16MVdI4EsWW4A4KjLvetIXTT0AK44NU41Tc6oW57jvu6S7PxmltmGv4XUD82mgNdk97X5Bh9tMXUOQ3IVudRKdUThug1EKemR/diOpFFDb4imWa2RK9VDBpi9zAkriGa6KlX8fIWZ2VPGf3aJhJKrFKsA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=T3vHFBol; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="T3vHFBol" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490cf322ed0so10250385e9.1 for ; Thu, 09 Jul 2026 04:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1783596519; x=1784201319; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=MOEJtxlqclUuG5d8o3QYDqlrpx9EFuuMBV9pwtsxKdk=; b=T3vHFBolJPerv4/sxeHZ4XelybmdPy1zwo5L5YJyiZWX2IkwHNdzPc0+wUkSeGCgWM GAKwhS60Z9jpAD7Chbu5mdDZH44ZLGcXAAg4B3tl3Qeu6A+Z82QaxSe6A6e/69Six0vh RXNbM18fAusbV0P3r5bL0hNcAT1WR6cxbePdcKMHWRJVc3MvfoclX9wrMMpogOYRbj5Q Pb4r6BAC8lq7Cpg/3hqR9XJA4Gsh4uZmDxufvOQkvKUBmSU+y1qacBIjGgUcPfwxCYTr WNNd+tqPFkLV/t+8c05lp67RciYKP5SlLuc/+c2JAw0hKwUeBb/FlWE7o+KDKd5i+8aO Zhuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783596519; x=1784201319; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MOEJtxlqclUuG5d8o3QYDqlrpx9EFuuMBV9pwtsxKdk=; b=ME3qaJwBvS2R3KVu6nb6awO5HVo1m6R86gyqwfgrMupl1pBluB0l3KIow21QDNN4O2 q56bfx4AGEpmZfCsoKcav2OYev45aLc4XoFVAWnLZAxBQhOYASwA9nEMNP3J8TlKzJCS xf4qnTgtFN9neInlbBNqpoe2xO/2nTm17aOrqPJUEMxaV6634RAlrYeAbWBICY/sQ0du XfDyjzzQbuwV31rneFMCYnFpCfJcA3ytodmK99Ut5YTemjSCYi7wxJG0OpbYbEa28TSf WECP1XjCy9Qd71zAGguyWPHE2YZlUmQfdXu953M9CEkyj87xHRLgwk5h/HkYdpA4FZB+ Yoqw== X-Forwarded-Encrypted: i=1; AHgh+RqCpmvrEmemQuQt6FkwZY5m4wre1AdvhXTKpLzW3z5aRNPChoFbMR8ijiIpynMKbvjps5SbgHmmtR0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4CbTh4bmLHXsg7+E/1xLlMytiKnIYpNVSJbeAblIbqWi5dbTr BcymEGMz+KYbLbwO09z8LQCyHtf1EzeLBTjNRrhu5tn/EV/E+0rzFz6Uxg5o/7mibqc= X-Gm-Gg: AfdE7cmYS+nwf8suCS82WfwX0c5WQGjqDrJB5w4C810w/FuKCjOs3SFdbH3N2JIdjWD SjcafcsL8kl5eo+rS/1qlHfKMIW90NegYfjy/UuEGTJv7bpTHgE3z1PAoXybasWf2AckHRNAvpj K1aTiQ+NtzZdzn3+LsdcwZrPKp25AruSeoYZvygyLYjVGte7PdwJ7PM6/IkxcFGloR8zKNVFGNg ZyDayjiDzYSvze/PzE8VawJcKJ7yt9NyTOQSPxYSh2vAIFKDLSj+SMwKWeYg1/9VLfagxDjl5o1 R+ieOCnFcx9QNFv1G2osslI0XALTjPUO41BJkPvVin4qJcRXmpyD+jvf+W0xvuTq1PrGNJ3RFjU GpIttXAylUs8msdnihGjKZdM8wFbI3fDluYYh+6aQQoJeHq3z3x6ts+rPLmYvNN23Vcvk9FT20w Krs01p3CmC9Qw2Le8= X-Received: by 2002:a05:600c:c87:b0:493:e890:9e0b with SMTP id 5b1f17b1804b1-493eb0130c0mr30213605e9.26.1783596518799; Thu, 09 Jul 2026 04:28:38 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb6ff432sm52559975e9.4.2026.07.09.04.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 04:28:38 -0700 (PDT) Date: Thu, 9 Jul 2026 13:28:36 +0200 From: Petr Mladek To: Sebastian Andrzej Siewior Cc: linux-atm-general@lists.sourceforge.net, linux-can@vger.kernel.org, linux-sctp@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Herbert Xu , Jakub Kicinski , Kuniyuki Iwashima , Marc Kleine-Budde , Marcelo Ricardo Leitner , Neal Cardwell , Oliver Hartkopp , Paolo Abeni , Remi Denis-Courmont , Simon Horman , Steffen Klassert , Willem de Bruijn , Xin Long , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Kees Cook Subject: Re: [PATCH net-next] net: Convert %pK back to %p Message-ID: References: <20260706073824.xixrLxoD@linutronix.de> Precedence: bulk X-Mailing-List: linux-can@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260706073824.xixrLxoD@linutronix.de> On Mon 2026-07-06 09:38:24, Sebastian Andrzej Siewior wrote: > This is a revert of commit 71338aa7d050c ("net: convert %p usage to > %pK") which is from 2011. Back then the default behaviour for %p was to > print the pointer. The %pK modifier was introduced to be able to control > the behaviour of specific pointer output without changing the behaviour > of %p for everyone. It was dedicated to avoid leaking pointers via > /proc. > There was also the idea to remove the check from formatting the string > and move to the open callback (of the /proc file) with some helpers but > this did not happen. > > Things changed over time. The default behaviour for %p is now to print a > hash pointer which does not leak the address but allows to > correlate if two pointers are equal. The pointer to hash value mapping > is not stable across reboots so one can not precompute the values and > have a lookup table. There is also the `hash_pointers' boot argument > which allows to disable it and print real pointers if needed. The > default behaviour of %pK (kptr_restrict==0) is already %p (hashed > pointer). > > The %pK modifier brings hardly and value over %p. Removing it allows to > remove the policy checks from pointer formatting. Yes, I believe that the %pK behavior has been obsoleted by hashing pointers printed via %p by default and hash_pointers= boot parameter. > My long term goal is remove the restricted_pointer() handling from > vsprintf. I don't see any benefit in having it and case kptr_restrict==1 > caused problems in terms of locking. Instead of attempting to get the > debug/ warn infrastructure right I am for removing it. Yes, it would be nice because the locking is tricky. Acked-by: Petr Mladek Best Regards, Petr