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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0B51C83F17 for ; Fri, 18 Jul 2025 13:23:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6CD7360903; Fri, 18 Jul 2025 13:23:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id C0zRYmFhbSDS; Fri, 18 Jul 2025 13:23:53 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A52D360C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1752845033; bh=iE7hw9+bZACRqLCE5oK6anYds6V+tWE0n5Y1ZwoRR1M=; h=From:Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=dlqgAZ0bCP7zJPyBeNe+lemYnGwPI2AQyvEzkCdhp15YWTKcKm5S/A98sNhT4vizV nIbbwg4tXlaGTETuqs/tuyxLZ5K5x7SOAx4VUaD/OpihDTc6IK1DQL0mQC84KfY19F /qiR54d6NXFULCrAG7j+2DnDXsYIvLYZvX7p1F4rL4ub4IcGuS34GYo1vgrDqYLZ6C EJ65FFQIVcYg79KWNNuriJHbJi+ZoaEWzcoPxKlKSFkavl8BbgUVCL+DRnRhatIzmv eK0ZoTIKoa+7Bdeagf34FClG24ol/dDBeReZEz1kOvjERfbARZKoVme+X/aZ+/H8nn nJJ2zkMsohIaw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id A52D360C1F; Fri, 18 Jul 2025 13:23:53 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with UTF8SMTP id BCF3EDA for ; Fri, 18 Jul 2025 13:23:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with UTF8SMTP id A3C1A60C1F for ; Fri, 18 Jul 2025 13:23:51 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with UTF8SMTP id X5OlrmLLOjDu for ; Fri, 18 Jul 2025 13:23:51 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=t-8ch@linutronix.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org B26A360903 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B26A360903 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by smtp3.osuosl.org (Postfix) with UTF8SMTPS id B26A360903 for ; Fri, 18 Jul 2025 13:23:50 +0000 (UTC) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 18 Jul 2025 15:23:41 +0200 Message-Id: <20250718-restricted-pointers-net-v4-0-4baa64e40658@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAN5KemgC/3XNS47CMBAE0KsgrzHyLx9mNfdALBy7Ai0hB9kmC kK5OyYsQKPJslTdrx4sIRIS+9k8WMRIiYZQgtlumDvbcAInXzJTQlXCCMMjUo7kMjy/DhQyYuI BmdvWee+FRuUlK9/XiJ6mRT6w10HAlNmxNGdKeYj3ZXKUS//W5bo+Si64VLYXDqYuS78XCrcch 0DTzmNxR/VtNeuWKtbeuL5B36K2+M/SH6uW7bqli6W7xlZaomq77q81z/MT130swGQBAAA= X-Change-ID: 20250404-restricted-pointers-net-a8cddd03e5d1 To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Mark Bloch Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Aleksandr Loktionov , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Simon Horman X-Developer-Signature: v=1; a=ed25519-sha256; t=1752845027; l=1796; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=3Gj5w5HsItXOBNki2riEbc69tNDXQwN6DrDF+HRXaSQ=; b=DWaPcDFUr2/N2fYXMgVEmheOtBa9OQXB8VHbff97i8usZ/cxn4dmeEsP68M/YKkJiWq1Z+H1c FPEwYW7yHA9DIGq5iZK0JE0MCO7A8B3773+7aVeQ69bQMJjF6fLB3Te X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1752845028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iE7hw9+bZACRqLCE5oK6anYds6V+tWE0n5Y1ZwoRR1M=; b=F/w5LVRbDSebIic/4Y0Fr0thO5Uv7WpT55/AIK/GzmnkxlvMy7c9ThpvuvCR64mGN35mj+ IHqX0+BEuu+v8EXbUxLdoX9EmGvLQzjweRMIVX5JSWNWwx6UIqnakE47soxm3/zH10JFc+ +j2mlAfwiQnb6+j5PgjNMPDXesocGEfQhqlY+WIa/jzBgTn40xVkb46SaixhyZonZPApYB qb+VNCOgfOi6a+/iNabXlFO0kgAJ9LxZGPcOIX21m0trgX8OhXTzjP2EVnMcmccEBjBZZw WfGlhV/Ejr2K/EMAS8oy4UGmTHp8JpC6mQApdvx32DqEywk4ghpGcOk/k5WY5Q== X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1752845028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iE7hw9+bZACRqLCE5oK6anYds6V+tWE0n5Y1ZwoRR1M=; b=J7nloz6c1uwBPmOsvHuHIjNrJDgNV6BNkq7pz0gJXDOHjEQxUfHpCxKzjg9Si49GAqSnMf j7kah6zkbakXKdDw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=linutronix.de X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=F/w5LVRb; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=J7nloz6c Subject: [Intel-wired-lan] [PATCH net-next v4 0/2] net: Don't use %pK through printk X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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 --- Changes in v4: - Pick up Review-by from Simon - Link to v3: https://lore.kernel.org/r/20250618-restricted-pointers-net-v3-0-3b7a531e58bb@linutronix.de Changes in v3: - Fix typo in commit messages - Link to v2: https://lore.kernel.org/r/20250417-restricted-pointers-net-v2-0-94cf7ef8e6ae@linutronix.de Changes in v2: - Drop wifi/ath patches, they are submitted on their own now - Link to v1: https://lore.kernel.org/r/20250414-restricted-pointers-net-v1-0-12af0ce46cdd@linutronix.de --- Thomas Weißschuh (2): ice: Don't use %pK through printk or tracepoints net/mlx5: Don't use %pK through printk or tracepoints drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/ice/ice_trace.h | 10 +++++----- .../ethernet/mellanox/mlx5/core/sf/dev/diag/dev_tracepoint.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) --- base-commit: d086c886ceb9f59dea6c3a9dae7eb89e780a20c9 change-id: 20250404-restricted-pointers-net-a8cddd03e5d1 Best regards, -- Thomas Weißschuh