Thread (10 messages) flat view 10 messages, 4 authors, 4d ago

Re: [PATCH v3] scripts/gcc-plugins: suppress recorded GCC switches for extmod builds

From: Nicolas Schier <nsc@kernel.org>
Date: 2026-08-28 15:16:55
Also in: linux-hardening, linux-kbuild, lkml

On Thu, Aug 20, 2026 at 11:31:16AM +0530, Jaihind Yadav wrote:
With GCC plugins enabled, external module builds can record
-fplugin=... paths in DWARF producer metadata via
-grecord-gcc-switches, leaking host/build specific paths and
triggering QA checks.

Handle this in scripts/Makefile.gcc-plugins for KBUILD_EXTMOD
builds by adding -gno-record-gcc-switches to plugin cflags.

This keeps plugin behavior unchanged while avoiding absolute
plugin path leakage in external module debug metadata.
Maybe it makes sense to add a note on how to restore the original
behaviour for those who may want to have the gcc switches recorded in
debug data for external kmods ('make KCFLAGS=-grecord-gcc-switches').


-- 
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help