Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- Deduplicate Kconfig entries for CONFIG_CXL_PMU

- Fix unselectable choice entry in MIPS Kconfig, and forbid this
structure

- Remove unused include/asm-generic/export.h

- Fix a NULL pointer dereference bug in modpost

- Enable -Woverride-init warning consistently with W=1

- Drop KCSAN flags from *.mod.c files

* tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: Fix typo HEIGTH to HEIGHT
Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
kbuild: make -Woverride-init warnings more consistent
modpost: do not make find_tosym() return NULL
export.h: remove include/asm-generic/export.h
kconfig: do not reparent the menu inside a choice block
MIPS: move unselectable FIT_IMAGE_FDT_EPM5 out of the "System type" choice
cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig

+66 -87
+1 -1
Documentation/kbuild/llvm.rst
··· 178 178 - ``LLVM=1`` 179 179 * - s390 180 180 - Maintained 181 - - ``CC=clang`` 181 + - ``LLVM=1`` (LLVM >= 18.1.0), ``CC=clang`` (LLVM < 18.1.0) 182 182 * - um (User Mode) 183 183 - Maintained 184 184 - ``LLVM=1``
+9 -9
arch/mips/Kconfig
··· 619 619 620 620 bool 621 621 622 - config FIT_IMAGE_FDT_EPM5 623 - bool "Include FDT for Mobileye EyeQ5 development platforms" 624 - depends on MACH_EYEQ5 625 - default n 626 - help 627 - Enable this to include the FDT for the EyeQ5 development platforms 628 - from Mobileye in the FIT kernel image. 629 - This requires u-boot on the platform. 630 - 631 622 config MACH_NINTENDO64 632 623 bool "Nintendo 64 console" 633 624 select CEVT_R4K ··· 1001 1010 Say Y here for most Octeon reference boards. 1002 1011 1003 1012 endchoice 1013 + 1014 + config FIT_IMAGE_FDT_EPM5 1015 + bool "Include FDT for Mobileye EyeQ5 development platforms" 1016 + depends on MACH_EYEQ5 1017 + default n 1018 + help 1019 + Enable this to include the FDT for the EyeQ5 development platforms 1020 + from Mobileye in the FIT kernel image. 1021 + This requires u-boot on the platform. 1004 1022 1005 1023 source "arch/mips/alchemy/Kconfig" 1006 1024 source "arch/mips/ath25/Kconfig"
-13
drivers/cxl/Kconfig
··· 144 144 If unsure, or if this kernel is meant for production environments, 145 145 say N. 146 146 147 - config CXL_PMU 148 - tristate "CXL Performance Monitoring Unit" 149 - default CXL_BUS 150 - depends on PERF_EVENTS 151 - help 152 - Support performance monitoring as defined in CXL rev 3.0 153 - section 13.2: Performance Monitoring. CXL components may have 154 - one or more CXL Performance Monitoring Units (CPMUs). 155 - 156 - Say 'y/m' to enable a driver that will attach to performance 157 - monitoring units and provide standard perf based interfaces. 158 - 159 - If unsure say 'm'. 160 147 endif
+1 -1
drivers/gpu/drm/amd/display/dc/dce110/Makefile
··· 23 23 # Makefile for the 'controller' sub-component of DAL. 24 24 # It provides the control and status of HW CRTC block. 25 25 26 - CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = $(call cc-disable-warning, override-init) 26 + CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = -Wno-override-init 27 27 28 28 DCE110 = dce110_timing_generator.o \ 29 29 dce110_compressor.o dce110_opp_regamma_v.o \
+1 -1
drivers/gpu/drm/amd/display/dc/dce112/Makefile
··· 23 23 # Makefile for the 'controller' sub-component of DAL. 24 24 # It provides the control and status of HW CRTC block. 25 25 26 - CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = $(call cc-disable-warning, override-init) 26 + CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = -Wno-override-init 27 27 28 28 DCE112 = dce112_compressor.o 29 29
+1 -1
drivers/gpu/drm/amd/display/dc/dce120/Makefile
··· 24 24 # It provides the control and status of HW CRTC block. 25 25 26 26 27 - CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = $(call cc-disable-warning, override-init) 27 + CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = -Wno-override-init 28 28 29 29 DCE120 = dce120_timing_generator.o 30 30
+1 -1
drivers/gpu/drm/amd/display/dc/dce60/Makefile
··· 23 23 # Makefile for the 'controller' sub-component of DAL. 24 24 # It provides the control and status of HW CRTC block. 25 25 26 - CFLAGS_$(AMDDALPATH)/dc/dce60/dce60_resource.o = $(call cc-disable-warning, override-init) 26 + CFLAGS_$(AMDDALPATH)/dc/dce60/dce60_resource.o = -Wno-override-init 27 27 28 28 DCE60 = dce60_timing_generator.o dce60_hw_sequencer.o \ 29 29 dce60_resource.o
+1 -1
drivers/gpu/drm/amd/display/dc/dce80/Makefile
··· 23 23 # Makefile for the 'controller' sub-component of DAL. 24 24 # It provides the control and status of HW CRTC block. 25 25 26 - CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = $(call cc-disable-warning, override-init) 26 + CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = -Wno-override-init 27 27 28 28 DCE80 = dce80_timing_generator.o 29 29
+3 -3
drivers/gpu/drm/i915/Makefile
··· 33 33 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror 34 34 35 35 # Fine grained warnings disable 36 - CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) 37 - CFLAGS_display/intel_display_device.o = $(call cc-disable-warning, override-init) 38 - CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init) 36 + CFLAGS_i915_pci.o = -Wno-override-init 37 + CFLAGS_display/intel_display_device.o = -Wno-override-init 38 + CFLAGS_display/intel_fbdev.o = -Wno-override-init 39 39 40 40 # Support compiling the display code separately for both i915 and xe 41 41 # drivers. Define I915 when building i915.
+2 -2
drivers/gpu/drm/xe/Makefile
··· 172 172 -Ddrm_i915_gem_object=xe_bo \ 173 173 -Ddrm_i915_private=xe_device 174 174 175 - CFLAGS_i915-display/intel_fbdev.o = $(call cc-disable-warning, override-init) 176 - CFLAGS_i915-display/intel_display_device.o = $(call cc-disable-warning, override-init) 175 + CFLAGS_i915-display/intel_fbdev.o = -Wno-override-init 176 + CFLAGS_i915-display/intel_display_device.o = -Wno-override-init 177 177 178 178 # Rule to build SOC code shared with i915 179 179 $(obj)/i915-soc/%.o: $(srctree)/drivers/gpu/drm/i915/soc/%.c FORCE
+1 -1
drivers/net/ethernet/renesas/sh_eth.c
··· 50 50 * the macros available to do this only define GCC 8. 51 51 */ 52 52 __diag_push(); 53 - __diag_ignore(GCC, 8, "-Woverride-init", 53 + __diag_ignore_all("-Woverride-init", 54 54 "logic to initialize all and then override some is OK"); 55 55 static const u16 sh_eth_offset_gigabit[SH_ETH_MAX_REGISTER_OFFSET] = { 56 56 SH_ETH_OFFSET_DEFAULTS,
+1 -1
drivers/pinctrl/aspeed/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 # Aspeed pinctrl support 3 3 4 - ccflags-y += $(call cc-option,-Woverride-init) 4 + ccflags-y += -Woverride-init 5 5 obj-$(CONFIG_PINCTRL_ASPEED) += pinctrl-aspeed.o pinmux-aspeed.o 6 6 obj-$(CONFIG_PINCTRL_ASPEED_G4) += pinctrl-aspeed-g4.o 7 7 obj-$(CONFIG_PINCTRL_ASPEED_G5) += pinctrl-aspeed-g5.o
+1 -1
fs/proc/Makefile
··· 5 5 6 6 obj-y += proc.o 7 7 8 - CFLAGS_task_mmu.o += $(call cc-option,-Wno-override-init,) 8 + CFLAGS_task_mmu.o += -Wno-override-init 9 9 proc-y := nommu.o task_nommu.o 10 10 proc-$(CONFIG_MMU) := task_mmu.o 11 11
-11
include/asm-generic/export.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - #ifndef __ASM_GENERIC_EXPORT_H 3 - #define __ASM_GENERIC_EXPORT_H 4 - 5 - /* 6 - * <asm/export.h> and <asm-generic/export.h> are deprecated. 7 - * Please include <linux/export.h> directly. 8 - */ 9 - #include <linux/export.h> 10 - 11 - #endif
+1 -1
kernel/bpf/Makefile
··· 4 4 # ___bpf_prog_run() needs GCSE disabled on x86; see 3193c0836f203 for details 5 5 cflags-nogcse-$(CONFIG_X86)$(CONFIG_CC_IS_GCC) := -fno-gcse 6 6 endif 7 - CFLAGS_core.o += $(call cc-disable-warning, override-init) $(cflags-nogcse-yy) 7 + CFLAGS_core.o += -Wno-override-init $(cflags-nogcse-yy) 8 8 9 9 obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o log.o token.o 10 10 obj-$(CONFIG_BPF_SYSCALL) += bpf_iter.o map_iter.o task_iter.o prog_iter.o link_iter.o
+1 -2
mm/Makefile
··· 29 29 KCOV_INSTRUMENT_vmstat.o := n 30 30 KCOV_INSTRUMENT_failslab.o := n 31 31 32 - CFLAGS_init-mm.o += $(call cc-disable-warning, override-init) 33 - CFLAGS_init-mm.o += $(call cc-disable-warning, initializer-overrides) 32 + CFLAGS_init-mm.o += -Wno-override-init 34 33 35 34 mmu-y := nommu.o 36 35 mmu-$(CONFIG_MMU) := highmem.o memory.o mincore.o \
+3 -7
scripts/Makefile.extrawarn
··· 114 114 KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) 115 115 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) 116 116 117 + KBUILD_CFLAGS += -Wno-override-init # alias for -Wno-initializer-overrides in clang 118 + 117 119 ifdef CONFIG_CC_IS_CLANG 118 120 # Clang before clang-16 would warn on default argument promotions. 119 121 ifneq ($(call clang-min-version, 160000),y) ··· 153 151 KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) 154 152 KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) 155 153 156 - ifdef CONFIG_CC_IS_CLANG 157 - KBUILD_CFLAGS += -Winitializer-overrides 158 - endif 159 - 160 154 KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2 161 155 162 156 else ··· 162 164 KBUILD_CFLAGS += -Wno-type-limits 163 165 KBUILD_CFLAGS += -Wno-shift-negative-value 164 166 165 - ifdef CONFIG_CC_IS_CLANG 166 - KBUILD_CFLAGS += -Wno-initializer-overrides 167 - else 167 + ifdef CONFIG_CC_IS_GCC 168 168 KBUILD_CFLAGS += -Wno-maybe-uninitialized 169 169 endif 170 170
+1 -1
scripts/Makefile.modfinal
··· 23 23 part-of-module = y 24 24 25 25 quiet_cmd_cc_o_c = CC [M] $@ 26 - cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI) $(CFLAGS_GCOV), $(c_flags)) -c -o $@ $< 26 + cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI) $(CFLAGS_GCOV) $(CFLAGS_KCSAN), $(c_flags)) -c -o $@ $< 27 27 28 28 %.mod.o: %.mod.c FORCE 29 29 $(call if_changed_dep,cc_o_c)
-5
scripts/kconfig/conf.c
··· 552 552 continue; 553 553 } 554 554 sym_set_tristate_value(child->sym, yes); 555 - for (child = child->list; child; child = child->next) { 556 - indent += 2; 557 - conf(child); 558 - indent -= 2; 559 - } 560 555 return 1; 561 556 } 562 557 }
+1 -1
scripts/kconfig/lkc.h
··· 89 89 struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 90 90 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 91 91 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 92 - void menu_finalize(struct menu *parent); 92 + void menu_finalize(void); 93 93 void menu_set_type(int type); 94 94 95 95 extern struct menu rootmenu;
+1 -1
scripts/kconfig/lxdialog/checklist.c
··· 119 119 } 120 120 121 121 do_resize: 122 - if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN)) 122 + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGHT_MIN)) 123 123 return -ERRDISPLAYTOOSMALL; 124 124 if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN)) 125 125 return -ERRDISPLAYTOOSMALL;
+6 -6
scripts/kconfig/lxdialog/dialog.h
··· 162 162 int on_key_resize(void); 163 163 164 164 /* minimum (re)size values */ 165 - #define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ 165 + #define CHECKLIST_HEIGHT_MIN 6 /* For dialog_checklist() */ 166 166 #define CHECKLIST_WIDTH_MIN 6 167 - #define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ 167 + #define INPUTBOX_HEIGHT_MIN 2 /* For dialog_inputbox() */ 168 168 #define INPUTBOX_WIDTH_MIN 2 169 - #define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ 169 + #define MENUBOX_HEIGHT_MIN 15 /* For dialog_menu() */ 170 170 #define MENUBOX_WIDTH_MIN 65 171 - #define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ 171 + #define TEXTBOX_HEIGHT_MIN 8 /* For dialog_textbox() */ 172 172 #define TEXTBOX_WIDTH_MIN 8 173 - #define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ 173 + #define YESNO_HEIGHT_MIN 4 /* For dialog_yesno() */ 174 174 #define YESNO_WIDTH_MIN 4 175 - #define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ 175 + #define WINDOW_HEIGHT_MIN 19 /* For init_dialog() */ 176 176 #define WINDOW_WIDTH_MIN 80 177 177 178 178 int init_dialog(const char *backtitle);
+1 -1
scripts/kconfig/lxdialog/inputbox.c
··· 43 43 strcpy(instr, init); 44 44 45 45 do_resize: 46 - if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) 46 + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGHT_MIN)) 47 47 return -ERRDISPLAYTOOSMALL; 48 48 if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) 49 49 return -ERRDISPLAYTOOSMALL;
+1 -1
scripts/kconfig/lxdialog/menubox.c
··· 172 172 do_resize: 173 173 height = getmaxy(stdscr); 174 174 width = getmaxx(stdscr); 175 - if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) 175 + if (height < MENUBOX_HEIGHT_MIN || width < MENUBOX_WIDTH_MIN) 176 176 return -ERRDISPLAYTOOSMALL; 177 177 178 178 height -= 4;
+1 -1
scripts/kconfig/lxdialog/textbox.c
··· 175 175 176 176 do_resize: 177 177 getmaxyx(stdscr, height, width); 178 - if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) 178 + if (height < TEXTBOX_HEIGHT_MIN || width < TEXTBOX_WIDTH_MIN) 179 179 return -ERRDISPLAYTOOSMALL; 180 180 if (initial_height != 0) 181 181 height = initial_height;
+1 -1
scripts/kconfig/lxdialog/util.c
··· 291 291 getyx(stdscr, saved_y, saved_x); 292 292 293 293 getmaxyx(stdscr, height, width); 294 - if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { 294 + if (height < WINDOW_HEIGHT_MIN || width < WINDOW_WIDTH_MIN) { 295 295 endwin(); 296 296 return -ERRDISPLAYTOOSMALL; 297 297 }
+1 -1
scripts/kconfig/lxdialog/yesno.c
··· 32 32 WINDOW *dialog; 33 33 34 34 do_resize: 35 - if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) 35 + if (getmaxy(stdscr) < (height + YESNO_HEIGHT_MIN)) 36 36 return -ERRDISPLAYTOOSMALL; 37 37 if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) 38 38 return -ERRDISPLAYTOOSMALL;
+2 -2
scripts/kconfig/mconf.c
··· 659 659 dialog_clear(); 660 660 res = dialog_checklist(prompt ? prompt : "Main Menu", 661 661 radiolist_instructions, 662 - MENUBOX_HEIGTH_MIN, 662 + MENUBOX_HEIGHT_MIN, 663 663 MENUBOX_WIDTH_MIN, 664 - CHECKLIST_HEIGTH_MIN); 664 + CHECKLIST_HEIGHT_MIN); 665 665 selected = item_activate_selected(); 666 666 switch (res) { 667 667 case 0:
+16 -6
scripts/kconfig/menu.c
··· 282 282 } 283 283 } 284 284 285 - void menu_finalize(struct menu *parent) 285 + static void _menu_finalize(struct menu *parent, bool inside_choice) 286 286 { 287 287 struct menu *menu, *last_menu; 288 288 struct symbol *sym; ··· 296 296 * and propagate parent dependencies before moving on. 297 297 */ 298 298 299 - if (sym && sym_is_choice(sym)) { 299 + bool is_choice = false; 300 + 301 + if (sym && sym_is_choice(sym)) 302 + is_choice = true; 303 + 304 + if (is_choice) { 300 305 if (sym->type == S_UNKNOWN) { 301 306 /* find the first choice value to find out choice type */ 302 307 current_entry = parent; ··· 399 394 } 400 395 } 401 396 402 - if (sym && sym_is_choice(sym)) 397 + if (is_choice) 403 398 expr_free(parentdep); 404 399 405 400 /* ··· 407 402 * moving on 408 403 */ 409 404 for (menu = parent->list; menu; menu = menu->next) 410 - menu_finalize(menu); 411 - } else if (sym) { 405 + _menu_finalize(menu, is_choice); 406 + } else if (!inside_choice && sym) { 412 407 /* 413 408 * Automatic submenu creation. If sym is a symbol and A, B, C, 414 409 * ... are consecutive items (symbols, menus, ifs, etc.) that ··· 468 463 /* Superset, put in submenu */ 469 464 expr_free(dep2); 470 465 next: 471 - menu_finalize(menu); 466 + _menu_finalize(menu, false); 472 467 menu->parent = parent; 473 468 last_menu = menu; 474 469 } ··· 585 580 expr_alloc_and(parent->prompt->visible.expr, 586 581 expr_alloc_symbol(&symbol_mod))); 587 582 } 583 + } 584 + 585 + void menu_finalize(void) 586 + { 587 + _menu_finalize(&rootmenu, false); 588 588 } 589 589 590 590 bool menu_has_prompt(struct menu *menu)
+1 -1
scripts/kconfig/parser.y
··· 515 515 menu_add_prompt(P_MENU, "Main menu", NULL); 516 516 } 517 517 518 - menu_finalize(&rootmenu); 518 + menu_finalize(); 519 519 520 520 menu = &rootmenu; 521 521 while (menu) {
+5 -2
scripts/mod/modpost.c
··· 1007 1007 1008 1008 static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) 1009 1009 { 1010 + Elf_Sym *new_sym; 1011 + 1010 1012 /* If the supplied symbol has a valid name, return it */ 1011 1013 if (is_valid_name(elf, sym)) 1012 1014 return sym; ··· 1017 1015 * Strive to find a better symbol name, but the resulting name may not 1018 1016 * match the symbol referenced in the original code. 1019 1017 */ 1020 - return symsearch_find_nearest(elf, addr, get_secindex(elf, sym), 1021 - true, 20); 1018 + new_sym = symsearch_find_nearest(elf, addr, get_secindex(elf, sym), 1019 + true, 20); 1020 + return new_sym ? new_sym : sym; 1022 1021 } 1023 1022 1024 1023 static bool is_executable_section(struct elf_info *elf, unsigned int secndx)