Skip to content

Commit 15b3f48

Browse files
committed
Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix module versioning broken on some architectures - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128 - Remove -Wformat-zero-length, which has no warning instance - Fix the order between drivers and libs in modules.order - Fix false-positive warnings in clang-analyzer * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check kbuild: fix the modules order between drivers and libs scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ modpost: fix module versioning when a symbol lacks valid CRC
2 parents 16b3d85 + 4be72c1 commit 15b3f48

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,13 +1113,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
11131113
$(patsubst %/,%,$(filter %/, $(core-) \
11141114
$(drivers-) $(libs-))))
11151115

1116-
subdir-modorder := $(addsuffix modules.order,$(filter %/, \
1117-
$(core-y) $(core-m) $(libs-y) $(libs-m) \
1118-
$(drivers-y) $(drivers-m)))
1119-
11201116
build-dirs := $(vmlinux-dirs)
11211117
clean-dirs := $(vmlinux-alldirs)
11221118

1119+
subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
1120+
11231121
# Externally visible symbols (used by link-vmlinux.sh)
11241122
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
11251123
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))

scripts/Makefile.extrawarn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ ifdef CONFIG_CC_IS_CLANG
4949
KBUILD_CFLAGS += -Wno-initializer-overrides
5050
KBUILD_CFLAGS += -Wno-format
5151
KBUILD_CFLAGS += -Wno-sign-compare
52-
KBUILD_CFLAGS += -Wno-format-zero-length
5352
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
5453
KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
5554
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)

scripts/clang-tools/run-clang-tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def run_analysis(entry):
5151
checks += "linuxkernel-*"
5252
else:
5353
checks += "clang-analyzer-*"
54+
checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
5455
p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
5556
stdout=subprocess.PIPE,
5657
stderr=subprocess.STDOUT,

scripts/dummy-tools/gcc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fi
5959
if arg_contain -E "$@"; then
6060
# For scripts/cc-version.sh; This emulates GCC 20.0.0
6161
if arg_contain - "$@"; then
62-
sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}'
62+
sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}; s/__LONG_DOUBLE_128__/1/ p'
6363
exit 0
6464
else
6565
echo "no input files" >&2

scripts/mod/modpost.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,13 +2021,11 @@ static void add_exported_symbols(struct buffer *buf, struct module *mod)
20212021
/* record CRCs for exported symbols */
20222022
buf_printf(buf, "\n");
20232023
list_for_each_entry(sym, &mod->exported_symbols, list) {
2024-
if (!sym->crc_valid) {
2024+
if (!sym->crc_valid)
20252025
warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n"
20262026
"Is \"%s\" prototyped in <asm/asm-prototypes.h>?\n",
20272027
sym->name, mod->name, mod->is_vmlinux ? "" : ".ko",
20282028
sym->name);
2029-
continue;
2030-
}
20312029

20322030
buf_printf(buf, "SYMBOL_CRC(%s, 0x%08x, \"%s\");\n",
20332031
sym->name, sym->crc, sym->is_gpl_only ? "_gpl" : "");

0 commit comments

Comments
 (0)