First round of Kbuild fixes for 7.3

- kbuild: don't delete in-flight filechk temporaries in asm-headers
 
    A rule for generating header files was changed from using make
    $(wildcard) fnglob to 'find' instead; as 'find' finds "hidden" files
    by default, temporary files from Kbuild's 'filechk', used for
    generating asm header files, may get deleted and break header file
    generating.
 
  - scripts/sorttable: Mark long_size as __maybe_unused
 
    Fix builds with clang-23 or newer on trees w/o commit b055f4c431
    ("sorttable: Move ELF parsing into scripts/elf-parse.[ch]");
    targetting for backport to stable kernels < 6.19.
 
  - scripts/mksysmap: drop the MODULE_INFO() symbols from kallsyms
 
    Update regexp to remove kallsyms entries from kernel binary, saves
    about 32 KiB of bzImage.
 
  - scripts/mksysmap: fix escape of '$' in the __pi_ pattern
 
    Prevent arm64 PIE namespace local symbols from appearing System.map
    and /proc/kallsyms.
 
 Cc: Lorenzo Stoakes (ARM) <ljs@kernel.org>
 Cc: Nathan Chancellor <nathan@kernel.org>
 Cc: Nicolas Schier <n.schier@fritz.com>
 Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
 Cc: Vlad Poenaru <vlad.wing@gmail.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEh0E3p4c3JKeBvsLGB1IKcBYmEmkFAmqlk5UACgkQB1IKcBYm
 Eml4QxAAx44wbbabtE6Ebwrm2fa8Np2NoJNfDtUb9KiTuMhybdswlpomcbXSGnri
 GZjeQOs+PPZMwsCVTffB+2ACevvGW+v/Ve68Aotc+iEQsMQnxnGlOTG1utmcgHEN
 NKpg3ESHh2QbQ6QP684h1HnOETVQelaFWezZZq6gtXYsBEaJnLdyskeNyFMiN2Jk
 t+h07mHTf9qgWzCb6WoWgokJj1uZgQwfgUfHM0hGxnrDXYh93mIWDy8FzuCY8LCl
 V+4jEUT5JQltP4ts8Q0gVgxGx83l0WxxswR00afuWL9nLyJ5jhH+TCA+Q6/D7OtM
 CHnZG+qi8K2qdT/nSMyaPzPrPhGIYFMBcXCT512jQGw7QeEME5xC9ebTSONxlV0G
 sMblzynFj+Hi7rAl8rNEbpj4madgpQdfXoYhLbZiP5XniWhQeYEIovw7pQa7AiQ1
 BftAaHPghBDKLOEBizLw4CDOdApRS8nAhjXJeRffaADUpuwhVpxX++7UpBYgICne
 /mfUv2D+qO08ASJy8RN06iCl2pzwVYPD+IjDk0ssDVYD92RKvVaT7H1fsOaxAObN
 pa4KUSCShWNLkNn8pnybRpFngyI5jq0p/A/h+V7iH45y5IdF2NWkPag2gG3nJhpc
 OF8v7V394NPqrZiFER087/jUes7hCmMotdIyAsztKh4GnB2h23s=
 =FqqV
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux

Pull Kbuild fixes from Nicolas Schier:
 "Fix a build race and builds on stable branches.

  The other two are low-hanging fruits from Lorenzo's recent kbuild
  speed-up patch set that fix older symbol leakages.

   - don't delete in-flight filechk temporaries in asm-headers

     A rule for generating header files was changed from using make
     $(wildcard) fnglob to 'find' instead; as 'find' finds "hidden"
     files by default, temporary files from Kbuild's 'filechk', used for
     generating asm header files, may get deleted and break header file
     generating.

   - scripts/sorttable: Mark long_size as __maybe_unused

     Fix builds with clang-23 or newer on trees w/o commit b055f4c431
     ("sorttable: Move ELF parsing into scripts/elf-parse.[ch]");
     targetting for backport to stable kernels < 6.19.

   - scripts/mksysmap: drop the MODULE_INFO() symbols from kallsyms

     Update regexp to remove kallsyms entries from kernel binary, saves
     about 32 KiB of bzImage.

   - scripts/mksysmap: fix escape of '$' in the __pi_ pattern

     Prevent arm64 PIE namespace local symbols from appearing System.map
     and /proc/kallsyms"

* tag 'kbuild-fixes-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
  scripts/mksysmap: fix escape of '$' in the __pi_ pattern
  scripts/mksysmap: drop the MODULE_INFO() symbols from kallsyms
  scripts/sorttable: Mark long_size as __maybe_unused
  kbuild: don't delete in-flight filechk temporaries in asm-headers
This commit is contained in:
Linus Torvalds 2026-09-12 11:29:20 -07:00
commit 3ce99a68f7
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
generated-y := $(addprefix $(obj)/, $(generated-y))
# Remove stale wrappers when the corresponding files are removed from generic-y
old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
old-headers := $(shell test -d $(obj) && find $(obj) -name '*.h' ! -name '.*')
unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
filechk_wrap = echo "\#include <asm-generic/$*.h>"

View File

@ -35,7 +35,7 @@
/ __efistub_/d
# arm64 local symbols in PIE namespace
/ __pi_\\$/d
/ __pi_\$/d
/ __pi_\.L/d
# arm64 local symbols in non-VHE KVM namespace
@ -83,7 +83,7 @@
/ _SDA2_BASE_$/d
# MODULE_INFO()
/ __UNIQUE_ID_modinfo[0-9]*$/d
/ __UNIQUE_ID_modinfo_[0-9]*$/d
# ---------------------------------------------------------------------------
# Ignored patterns

View File

@ -116,7 +116,7 @@ static inline void *get_index(void *start, int entsize, int index)
}
static int extable_ent_size;
static int long_size;
static int long_size __maybe_unused;
#define ERRSTR_MAXSZ 256