From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD8BE606A31A for ; Wed, 28 Oct 2026 20:25:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nfDkUCUv Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 384C710E69A; Wed, 28 Oct 2026 20:25:24 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA66A10E134 for ; Wed, 28 Oct 2026 20:25:13 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id A086340DCF; Wed, 28 Oct 2026 20:25:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED8451F01828; Wed, 28 Oct 2026 20:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793219113; bh=O6yGKa93TxFyAJGzdOzoN/pRr+EPCAQmQhZOkVtjIVM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=nfDkUCUvqI7Yw25/PD3RQNGFPhmATnA/ZvO1xoO0niGX++NvRSLVpoAJ3oBXZtwP5 KH5m2amr93fzCBLRLwfla+ykkWuPf4Jv4sLgQ0Gh9gMSz9LNatbcvizeFyZe3nW3oH wleFiWW7f3mdcNncAhrRsuc9CH//0qvsYmypDkD7LsMeLGQe8ZlnytCfy71UT5a0xF G8JMdBgr7wJdBLmSsvblhhx6BKOVD4MsdjZGOEngNzC+eRht1AkbYZGzTazMhMqQE5 Hjm9WGZi14Oj5gNfiecbEFYNMWo8jYn71ovQUpfMaokvgfwvJbDNKTnTEoISY4A287 pRLQvUOYatNCg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v13 19/39] dyndbg,module: make proper substructs in _ddebug_info To: "Jim Cromie" , "Jason Baron" , "Shuah Khan" , "Andrew Morton" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Arnd Bergmann" , "Luis Chamberlain" , "Petr Pavlu" , "Daniel Gomez" , "Sami Tolvanen" , "Aaron Tomlin" , "Jonathan Corbet" , "Greg Kroah-Hartman" , "Nathan Chancellor" , "Nicolas Schier" , "Shuah Khan" , "Randy Dunlap" , "Rafael J. Wysocki" , "Pavel Machek" , "Len Brown" , "Jonathan Corbet" , "Petr Mladek" , "Steven Rostedt" , "John Ogness" , "Sergey Senozhatsky" , =?utf-8?b?VGhvbWFzIFdlacOfc2NodWg=?= , "Jason A. Donenfeld" Cc: dri-devel@lists.freedesktop.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, "Jason Baron" , "Louis Chauvet" In-Reply-To: <20261027-dd-cmap-part2-clean-v13-19-9267923be612@gmail.com> References: <20261027-dd-cmap-part2-clean-v13-0-9267923be612@gmail.com> <20261027-dd-cmap-part2-clean-v13-19-9267923be612@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 28 Oct 2026 20:25:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] dyndbg: __UNIQUE_ID(_ddebug) prefix change breaks objtool klp di= ff -- commit 317df06d413f02902ba4470f9dd1320a81d15cee Author: Jim Cromie dyndbg,module: make proper substructs in _ddebug_info This commit refactors struct _ddebug_info to group descriptor and class map vectors into struct _ddebug_descs and struct _ddebug_class_maps substructs, embeds struct _ddebug_info into struct ddebug_table, and renames the linker sections accordingly. > diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h > index 36b7d341076db..b05dc843a1d8e 100644 > --- a/include/linux/dynamic_debug.h > +++ b/include/linux/dynamic_debug.h [ ... ] > @@ -245,7 +257,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, > * macro. > */ > #define _dynamic_func_call_cls(cls, fmt, func, ...) \ > - __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARG= S__) > + __dynamic_func_call_cls(__UNIQUE_ID(_ddebug), cls, fmt, func, ##__VA_AR= GS__) > #define _dynamic_func_call(fmt, func, ...) \ > _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__) > =20 > @@ -255,7 +267,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, > * with precisely the macro's varargs. > */ > #define _dynamic_func_call_cls_no_desc(cls, fmt, func, ...) \ > - __dynamic_func_call_cls_no_desc(__UNIQUE_ID(ddebug), cls, fmt, \ > + __dynamic_func_call_cls_no_desc(__UNIQUE_ID(_ddebug), cls, fmt, \ > func, ##__VA_ARGS__) [Severity: Medium] Does changing __UNIQUE_ID(ddebug) to __UNIQUE_ID(_ddebug) in _dynamic_func_call_cls() and _dynamic_func_call_cls_no_desc() break livepat= ch builds with objtool klp diff? In include/linux/compiler.h, __UNIQUE_ID() already appends an underscore after __UNIQUE_ID_: /* Format: __UNIQUE_ID__<__COUNTER__> */ #define __UNIQUE_ID(name) \ __PASTE(__UNIQUE_ID_, \ __PASTE(name, \ __PASTE(_, __COUNTER__))) Passing _ddebug changes the generated static struct _ddebug descriptor symb= ol names from __UNIQUE_ID_ddebug_ to __UNIQUE_ID__ddebug_ (with a double underscore). When CONFIG_JUMP_LABEL is enabled and a livepatched module function contain= s a dynamic debug callsite, tools/objtool/klp-diff.c checks for the single underscore prefix in validate_special_section_klp_reloc(): if (strstr(reloc->sym->name, "__UNIQUE_ID_ddebug_")) { WARN("%s: disabling unsupported pr_debug()", code_sym); ret =3D 1; continue; } ERROR("%s+0x%lx: unsupported static branch key %s. Use static_key_enab= led() instead", code_sym, code_offset, reloc->sym->name); return -1; With the extra underscore in __UNIQUE_ID__ddebug_, strstr() will no long= er match and validate_special_section_klp_reloc() will fail with an unsupported static branch key error. Should this remain __UNIQUE_ID(ddebug), or should validate_special_section_klp_reloc() in tools/objtool/klp-diff.c be updated= to match? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261027-dd-cmap-pa= rt2-clean-v13-0-9267923be612@gmail.com?part=3D19