From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: export Rust symbols for dependent modules Date: Thu, 04 Jun 2026 16:23:29 +1000 Message-ID: In-Reply-To: <20260530-nova-exports-v3-2-1202aa339ef7@nvidia.com> References: <20260530-nova-exports-v3-0-1202aa339ef7@nvidia.com> <20260530-nova-exports-v3-2-1202aa339ef7@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Acceptable as a workaround, with a concern** This generates `EXPORT_SYMBOL_GPL()` calls for all Rust global text symbols= in `nova_core.o` by piping `nm` output through `awk`: ```makefile rust_exports =3D \ $(NM) -p --defined-only $(1) | \ awk '$$2 =3D=3D "T" && $$3 ~ /^_R/ { \ printf "extern void %s(void); EXPORT_SYMBOL_GPL(%s);\n", $$3, $$3 \ }' ``` The filter is correct: Rust v0 mangled symbols start with `_R`, and checkin= g `$$2 =3D=3D "T"` restricts to global text symbols. The generated `extern = void fn(void)` declarations are technically mistyped, but since only `EXPOR= T_SYMBOL_GPL()` uses them (no C code actually calls them with this signatur= e), this is harmless. **Concern: over-exporting.** This exports *every* Rust text symbol from nov= a-core, not just the ones nova-drm actually needs. This means internal impl= ementation details, monomorphized generics, trait method implementations, e= tc. all become part of the module's exported API. While acceptable as a tem= porary workaround, this could interact poorly with symbol versioning or mod= ule loading if any internal symbols change. A more targeted approach (e.g.,= an explicit symbol list) would be cleaner but harder to maintain as a work= around. The module composite object rename from `nova_core.o` =E2=86=92 `nova-core.= o` with `nova-core-y :=3D nova_core.o nova_core_exports.o` is clean and fol= lows standard Kbuild patterns. --- Generated by Claude Code Patch Reviewer