From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A3F325D8FB; Thu, 19 Jun 2025 13:30:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750339832; cv=none; b=FdxokmYhb9As/X29pJaC5yQdB/0MOUEOuUUJjPv9DzSqhedzIFABdFLUAfMx0mRoyhlpNvO96HO8WL0dTvY0RactqlYRlc1csPJOTCFurHZBYzxQJnSeg3gaLPVgHLnfR5n9Y4BhIKk6GZW2NYzIls7NKt234cT+4UkOtWTGPUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750339832; c=relaxed/simple; bh=hudOF111YgnX2+jpkJZHTU1k6oIbLOWGe2PdF1fYcS4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZOd6KfAWRYT/TRex0DXDKcYKbbirb9SPZkrzWeOF/E1pyPV5s4+x2F3g6ikAqGZ7ZVoTkt6kJ7/06hcyLsK09VnSpWch/spRVyFi7yxg2U25Wbq+t/tubX2GvURVOdpkhrRpvT1whVuKxphur9k+ukqwvPa2m+AtWVq+ASfKus4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h4jifniy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h4jifniy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBF92C4CEEA; Thu, 19 Jun 2025 13:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750339831; bh=hudOF111YgnX2+jpkJZHTU1k6oIbLOWGe2PdF1fYcS4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h4jifniyPlHfhCbjOAvSofdWxdQcpSwKyDVXk4v5K7sNFBp/RqlfqCGOgC7XjO2q1 VjHU9dlUJraLJPHmrGiMWcJHLY2Ophpl2nVZ1GByC2uypRKTuhwUFzdVOisfZzeiH6 qu1sbk+6Im/bq/7nYzHhedqsGqEYdpUx25OvCZgpe4b8iRqq5/ZkyhpcOBDvZlIVRz vTPbzBfJ12vvBMO8gDq5TRzh0HrzOdrhg+CkhcP9jKQPiRhdlwUKnlQ1VNLDbeOTNz EcdDy05J6gtt+bi1DyIwIWxp5aA8gEaxf1uOTsNaEPsGaDBeYD2/1AVgzORZIjN/jD UUArqCpMCUUww== Date: Thu, 19 Jun 2025 14:30:26 +0100 From: Simon Horman To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Aleksandr Loktionov Subject: Re: [PATCH net-next v3 1/2] ice: Don't use %pK through printk or tracepoints Message-ID: <20250619133026.GP1699@horms.kernel.org> References: <20250618-restricted-pointers-net-v3-0-3b7a531e58bb@linutronix.de> <20250618-restricted-pointers-net-v3-1-3b7a531e58bb@linutronix.de> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250618-restricted-pointers-net-v3-1-3b7a531e58bb@linutronix.de> On Wed, Jun 18, 2025 at 09:08:06AM +0200, Thomas Weißschuh wrote: > In the past %pK was preferable to %p as it would not leak raw pointer > values into the kernel log. > Since commit ad67b74d2469 ("printk: hash addresses printed with %p") > the regular %p has been improved to avoid this issue. > Furthermore, restricted pointers ("%pK") were never meant to be used > through printk(). They can still unintentionally leak raw pointers or > acquire sleeping locks in atomic contexts. > > Switch to the regular pointer formatting which is safer and > easier to reason about. > There are still a few users of %pK left, but these use it through seq_file, > for which its usage is safe. > > Signed-off-by: Thomas Weißschuh > Acked-by: Przemek Kitszel > Reviewed-by: Aleksandr Loktionov Reviewed-by: Simon Horman