# git rev-parse -q --verify b7213ffa0e585feb1aee3e7173e965e66ee0abaa^{commit} b7213ffa0e585feb1aee3e7173e965e66ee0abaa already have revision, skipping fetch # git checkout -q -f -B kisskb b7213ffa0e585feb1aee3e7173e965e66ee0abaa # git clean -qxdf # < git log -1 # commit b7213ffa0e585feb1aee3e7173e965e66ee0abaa # Author: Linus Torvalds # Date: Wed Sep 15 13:56:37 2021 -0700 # # qnx4: avoid stringop-overread errors # # The qnx4 directory entries are 64-byte blocks that have different # contents depending on the a status byte that is in the last byte of the # block. # # In particular, a directory entry can be either a "link info" entry with # a 48-byte name and pointers to the real inode information, or an "inode # entry" with a smaller 16-byte name and the full inode information. # # But the code was written to always just treat the directory name as if # it was part of that "inode entry", and just extend the name to the # longer case if the status byte said it was a link entry. # # That work just fine and gives the right results, but now that gcc is # tracking data structure accesses much more, the code can trigger a # compiler error about using up to 48 bytes (the long name) in a structure # that only has that shorter name in it: # # fs/qnx4/dir.c: In function ‘qnx4_readdir’: # fs/qnx4/dir.c:51:32: error: ‘strnlen’ specified bound 48 exceeds source size 16 [-Werror=stringop-overread] # 51 | size = strnlen(de->di_fname, size); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ # In file included from fs/qnx4/qnx4.h:3, # from fs/qnx4/dir.c:16: # include/uapi/linux/qnx4_fs.h:45:25: note: source object declared here # 45 | char di_fname[QNX4_SHORT_NAME_MAX]; # | ^~~~~~~~ # # which is because the source code doesn't really make this whole "one of # two different types" explicit. # # Fix this by introducing a very explicit union of the two types, and # basically explaining to the compiler what is really going on. # # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 b7213ffa0e585feb1aee3e7173e965e66ee0abaa # < make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 allmodconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_KCOV=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=n # Added to kconfig CONFIG_GCC_PLUGIN_SANCOV=n # Added to kconfig CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n # Added to kconfig CONFIG_GCC_PLUGIN_STRUCTLEAK=n # Added to kconfig CONFIG_GCC_PLUGIN_RANDSTRUCT=n # Added to kconfig CONFIG_UML_NET=n # Added to kconfig CONFIG_UML_NET_ETHERTAP=n # Added to kconfig CONFIG_UML_NET_TUNTAP=n # Added to kconfig CONFIG_UML_NET_SLIP=n # Added to kconfig CONFIG_UML_NET_DAEMON=n # Added to kconfig CONFIG_UML_NET_VDE=n # Added to kconfig CONFIG_UML_NET_MCAST=n # Added to kconfig CONFIG_UML_NET_PCAP=n # Added to kconfig CONFIG_UML_NET_SLIRP=n # Added to kconfig CONFIG_GCOV_KERNEL=n # Added to kconfig CONFIG_DEBUG_INFO_BTF=n # Added to kconfig CONFIG_BPF_PRELOAD=n # < make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 help # make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 olddefconfig .config:11719:warning: override: reassigning to symbol GCC_PLUGIN_SANCOV .config:11722:warning: override: reassigning to symbol GCC_PLUGIN_RANDSTRUCT .config:11724:warning: override: reassigning to symbol UML_NET_ETHERTAP .config:11726:warning: override: reassigning to symbol UML_NET_SLIP .config:11729:warning: override: reassigning to symbol UML_NET_MCAST .config:11731:warning: override: reassigning to symbol UML_NET_SLIRP # make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 /kisskb/src/arch/x86/um/Makefile:44: FORCE prerequisite is missing /kisskb/src/drivers/pci/controller/vmd.c:117:21: error: field 'sysdata' has incomplete type struct pci_sysdata sysdata; ^ /kisskb/src/drivers/pci/controller/vmd.c: In function 'vmd_compose_msi_msg': /kisskb/src/drivers/pci/controller/vmd.c:151:20: error: 'X86_MSI_BASE_ADDRESS_HIGH' undeclared (first use in this function) msg->address_hi = X86_MSI_BASE_ADDRESS_HIGH; ^ /kisskb/src/drivers/pci/controller/vmd.c:151:20: note: each undeclared identifier is reported only once for each function it appears in /kisskb/src/drivers/pci/controller/vmd.c:152:19: error: 'arch_msi_msg_addr_lo_t {aka struct arch_msi_msg_addr_lo}' has no member named 'base_address' msg->arch_addr_lo.base_address = X86_MSI_BASE_ADDRESS_LOW; ^ /kisskb/src/drivers/pci/controller/vmd.c:152:35: error: 'X86_MSI_BASE_ADDRESS_LOW' undeclared (first use in this function) msg->arch_addr_lo.base_address = X86_MSI_BASE_ADDRESS_LOW; ^ /kisskb/src/drivers/pci/controller/vmd.c:153:19: error: 'arch_msi_msg_addr_lo_t {aka struct arch_msi_msg_addr_lo}' has no member named 'destid_0_7' msg->arch_addr_lo.destid_0_7 = index_from_irqs(vmd, irq); ^ /kisskb/src/drivers/pci/controller/vmd.c: In function 'vmd_enable_domain': /kisskb/src/drivers/pci/controller/vmd.c:751:4: error: dereferencing pointer to incomplete type 'struct pci_sysdata' sd->vmd_dev = vmd->dev; ^ /kisskb/src/drivers/pci/controller/vmd.c: In function 'vmd_from_bus': /kisskb/src/drivers/pci/controller/vmd.c:128:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:277: drivers/pci/controller/vmd.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/pci/controller] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/pci] Error 2 make[2]: *** Waiting for unfinished jobs.... /kisskb/src/drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe': /kisskb/src/drivers/video/fbdev/riva/fbdev.c:2062:11: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers] iounmap(default_par->riva.PRAMIN); ^ In file included from /kisskb/src/arch/um/include/asm/io.h:7:0, from /kisskb/src/include/linux/io.h:13, from /kisskb/src/include/linux/irq.h:20, from /kisskb/src/include/asm-generic/hardirq.h:17, from /kisskb/src/arch/um/include/asm/hardirq.h:5, from /kisskb/src/include/linux/hardirq.h:11, from /kisskb/src/include/linux/interrupt.h:11, from /kisskb/src/include/linux/trace_recursion.h:5, from /kisskb/src/include/linux/ftrace.h:10, from /kisskb/src/include/linux/kprobes.h:29, from /kisskb/src/include/linux/kgdb.h:19, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/riva/fbdev.c:39: /kisskb/src/include/asm-generic/logic_io.h:36:17: note: expected 'void *' but argument is of type 'volatile U032 * {aka volatile unsigned int *}' #define iounmap iounmap ^ /kisskb/src/include/asm-generic/logic_io.h:37:6: note: in expansion of macro 'iounmap' void iounmap(void __iomem *addr); ^ /kisskb/src/drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_remove': /kisskb/src/drivers/video/fbdev/riva/fbdev.c:2095:11: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers] iounmap(par->riva.PRAMIN); ^ In file included from /kisskb/src/arch/um/include/asm/io.h:7:0, from /kisskb/src/include/linux/io.h:13, from /kisskb/src/include/linux/irq.h:20, from /kisskb/src/include/asm-generic/hardirq.h:17, from /kisskb/src/arch/um/include/asm/hardirq.h:5, from /kisskb/src/include/linux/hardirq.h:11, from /kisskb/src/include/linux/interrupt.h:11, from /kisskb/src/include/linux/trace_recursion.h:5, from /kisskb/src/include/linux/ftrace.h:10, from /kisskb/src/include/linux/kprobes.h:29, from /kisskb/src/include/linux/kgdb.h:19, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/riva/fbdev.c:39: /kisskb/src/include/asm-generic/logic_io.h:36:17: note: expected 'void *' but argument is of type 'volatile U032 * {aka volatile unsigned int *}' #define iounmap iounmap ^ /kisskb/src/include/asm-generic/logic_io.h:37:6: note: in expansion of macro 'iounmap' void iounmap(void __iomem *addr); ^ cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:277: drivers/video/fbdev/riva/fbdev.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/video/fbdev/riva] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/video/fbdev] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:540: drivers/video] Error 2 make[1]: *** [/kisskb/src/Makefile:1868: drivers] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_um-allmodconfig_um-x86_64 # Build took: 0:02:53.373152