From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 7407A3F58FB for ; Thu, 9 Jul 2026 11:28:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783596522; cv=none; b=HmgGbmNv+chbeZq/e9ySx2HOsEokVKLDH0SV9ulX78CkRUkYdAfr64W4L4eUq5MkaCLEcDkg7+0hgKoJSDHN/Aag0MUKf2inKueFJ4VaoFayEa68E+63+paRFXcdvsSj8kOj/Ur+2/HXKBP0yKtS0UHFMjhTHWhcPSZqtBcQcqY= 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.221.42 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-wr1-f42.google.com with SMTP id ffacd0b85a97d-47c6e9a694bso936423f8f.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=mfW37Wo+/xnM2dp24QgKS0WmJ7WsZTw7TJiyQm2e0O00VU0JVqmxetZSC/GAr2wQQi 2++XxcPO2GxzVwSiKGwZOmGR9Pp07R4JO+ALql/egVS+jpclcVdYtUqOy4aesEseaU4T 2+NWnFR/XXrknzqf56uhdk5l9mwVPjZ2LMv23P4GrxcNxHeEwQChu2LcMzno1jqqINe8 av+AyZ3FTB89hD7d0uMH7FME3xsfl1Lm3WI5yg6M7orTFcrbUvwclnix0PrKjSlwygXi HbLDcmLJjQUY+tiPLOLGLDAjGB+SH4GKgodEO5qjCO33HsTYrwGZ5MGnL0VN2spahw3b pEVg== X-Forwarded-Encrypted: i=1; AHgh+RrZ0sse0UkpvxzAx78I+zbhhNwMghMYbrn2C/QS+UIbbeJi3kmayYHWfukaHS909HTquAf4LzA=@vger.kernel.org X-Gm-Message-State: AOJu0Yzzl2VA3DagsC0DLPqoatEOWbNnO0oHXZc+pxdw/09ooxl8RK10 2OyiT6Jwn2FkRH7laRWdf96rx5hN3OmFUnTQ0YV+vC7AcPJAyQc2Q6jXQLdaaImRtc8= X-Gm-Gg: AfdE7cmfC1jyMCF0sB9pE0+y0oRSgyXZokNmMFsLm88eq0DvOAIlqKx0vxfgMg65V7F ITvh4ML7YPMQnPgoeZ6c2DkzqanxLRnWMKtDzhlPPA/rbmF6iuWuZA+uraPlrpxwpJevCtMXVWb LlwwD8CkL7m5pTTwTQ4yEIzNF2B/ZiIJrpZMLD91Y+fvgUpHF8qDqEnqjmTA1NHddy4eMz0+ZrE QtBq3/xfgLKR7mhABOisk8x5AGfEHb27tkMdQohbsATJzpIl1CHwSHXddBca4pBaFZzdAfhggdG sOYrrdmtQ6uT83ZDK4WQbYehO4Vj3yJ8FX85zCYlBPIqJKb2pMGAa1QwzebmVE3Ku2cBBuxoYWM jpMsZr0q7nmVaRpqOfkPb6mHzHWix4hGzVRtkWExmjAX60bv8zFYRN4SrQwvsGWBBmJfcABkvQF 7xgn45KASxPgXyXB0= 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: netdev@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