Buildresult: linus-rand/powerpc-randconfig/powerpc-gcc4.6 built on Feb 2 2019, 07:58
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Feb 2 2019, 07:58
Duration:
0:02:09.129731
Builder:
ka3
Revision:
x86: explicitly align IO accesses in memcpy_{to,from}io (
c228d294f2040c3a5f5965ff04d4947d0bf6e7da)
Target:
linus-rand/powerpc-randconfig/powerpc-gcc4.6
Branch:
linus-rand
Compiler:
powerpc-gcc4.6
(powerpc-linux-gcc (GCC) 4.6.3 / GNU ld (GNU Binutils) 2.22)
Config:
randconfig
(
download
)
Log:
Download original
Possible warnings (28)
kernel/printk/printk.c:186:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] kernel/cgroup/cgroup-v1.c:1263:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] sound/hda/hdac_regmap.c:282:16: warning: 'err' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] arch/powerpc/include/asm/io.h:162:1: warning: 'px_is' may be used uninitialized in this function [-Wuninitialized] arch/powerpc/include/asm/io.h:162:1: warning: 'px_cmd' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] drivers/base/regmap/regmap.c:1855:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] drivers/base/regmap/regmap.c:2594:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] fs/f2fs/file.c:2937:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] include/linux/list.h:63:13: warning: 'head' may be used uninitialized in this function [-Wuninitialized] drivers/mfd/arizona-core.c:1422:6: warning: 'n_subdevs' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] drivers/tty/serial/8250/8250_core.c:247:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] drivers/iio/temperature/mlx90632.c:349:37: warning: 'object_old_raw' may be used uninitialized in this function [-Wuninitialized] drivers/iio/temperature/mlx90632.c:349:37: warning: 'object_new_raw' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] WARNING: modpost: Found 2 section mismatch(es).
Full Log
# git rev-parse -q --verify c228d294f2040c3a5f5965ff04d4947d0bf6e7da^{commit} c228d294f2040c3a5f5965ff04d4947d0bf6e7da already have revision, skipping fetch # git checkout -q -f -B kisskb c228d294f2040c3a5f5965ff04d4947d0bf6e7da # git clean -qxdf # < git log -1 # commit c228d294f2040c3a5f5965ff04d4947d0bf6e7da # Author: Linus Torvalds <torvalds@linux-foundation.org> # Date: Thu Jan 31 11:10:20 2019 -0800 # # x86: explicitly align IO accesses in memcpy_{to,from}io # # In commit 170d13ca3a2f ("x86: re-introduce non-generic memcpy_{to,from}io") # I made our copy from IO space use a separate copy routine rather than # rely on the generic memcpy. I did that because our generic memory copy # isn't actually well-defined when it comes to internal access ordering or # alignment, and will in fact depend on various CPUID flags. # # In particular, the default memcpy() for a modern Intel CPU will # generally be just a "rep movsb", which works reasonably well for # medium-sized memory copies of regular RAM, since the CPU will turn it # into fairly optimized microcode. # # However, for non-cached memory and IO, "rep movs" ends up being # horrendously slow and will just do the architectural "one byte at a # time" accesses implied by the movsb. # # At the other end of the spectrum, if you _don't_ end up using the "rep # movsb" code, you'd likely fall back to the software copy, which does # overlapping accesses for the tail, and may copy things backwards. # Again, for regular memory that's fine, for IO memory not so much. # # The thinking was that clearly nobody really cared (because things # worked), but some people had seen horrible performance due to the byte # accesses, so let's just revert back to our long ago version that dod # "rep movsl" for the bulk of the copy, and then fixed up the potentially # last few bytes of the tail with "movsw/b". # # Interestingly (and perhaps not entirely surprisingly), while that was # our original memory copy implementation, and had been used before for # IO, in the meantime many new users of memcpy_*io() had come about. And # while the access patterns for the memory copy weren't well-defined (so # arguably _any_ access pattern should work), in practice the "rep movsb" # case had been very common for the last several years. # # In particular Jarkko Sakkinen reported that the memcpy_*io() change # resuled in weird errors from his Geminilake NUC TPM module. # # And it turns out that the TPM TCG accesses according to spec require # that the accesses be # # (a) done strictly sequentially # # (b) be naturally aligned # # otherwise the TPM chip will abort the PCI transaction. # # And, in fact, the tpm_crb.c driver did this: # # memcpy_fromio(buf, priv->rsp, 6); # ... # memcpy_fromio(&buf[6], &priv->rsp[6], expected - 6); # # which really should never have worked in the first place, but back # before commit 170d13ca3a2f it *happened* to work, because the # memcpy_fromio() would be expanded to a regular memcpy, and # # (a) gcc would expand the first memcpy in-line, and turn it into a # 4-byte and a 2-byte read, and they happened to be in the right # order, and the alignment was right. # # (b) gcc would call "memcpy()" for the second one, and the machines that # had this TPM chip also apparently ended up always having ERMS # ("Enhanced REP MOVSB/STOSB instructions"), so we'd use the "rep # movbs" for that copy. # # In other words, basically by pure luck, the code happened to use the # right access sizes in the (two different!) memcpy() implementations to # make it all work. # # But after commit 170d13ca3a2f, both of the memcpy_fromio() calls # resulted in a call to the routine with the consistent memory accesses, # and in both cases it started out transferring with 4-byte accesses. # Which worked for the first copy, but resulted in the second copy doing a # 32-bit read at an address that was only 2-byte aligned. # # Jarkko is actually fixing the fragile code in the TPM driver, but since # this is an excellent example of why we absolutely must not use a generic # memcpy for IO accesses, _and_ an IO-specific one really should strive to # align the IO accesses, let's do exactly that. # # Side note: Jarkko also noted that the driver had been used on ARM # platforms, and had worked. That was because on 32-bit ARM, memcpy_*io() # ends up always doing byte accesses, and on 64-bit ARM it first does byte # accesses to align to 8-byte boundaries, and then does 8-byte accesses # for the bulk. # # So ARM actually worked by design, and the x86 case worked by pure luck. # # We *might* want to make x86-64 do the 8-byte case too. That should be a # pretty straightforward extension, but let's do one thing at a time. And # generally MMIO accesses aren't really all that performance-critical, as # shown by the fact that for a long time we just did them a byte at a # time, and very few people ever noticed. # # Reported-and-tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> # Tested-by: Jerry Snitselaar <jsnitsel@redhat.com> # Cc: David Laight <David.Laight@aculab.com> # Fixes: 170d13ca3a2f ("x86: re-introduce non-generic memcpy_{to,from}io") # Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 c228d294f2040c3a5f5965ff04d4947d0bf6e7da # < make -s -j 80 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- randconfig KCONFIG_SEED=0xEC78798A # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig # yes \n | make -s -j 80 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- oldconfig yes: standard output: Broken pipe # make -s -j 80 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:186:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1263:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/cgroup/cgroup-v1.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/kernel/printk/printk.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/sound/hda/hdac_regmap.c: In function 'hda_reg_write': /kisskb/src/sound/hda/hdac_regmap.c:282:16: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/hda/hdac_regmap.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset': /kisskb/src/arch/powerpc/include/asm/io.h:162:1: warning: 'px_is' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/ata/ahci_qoriq.c:86:14: note: 'px_is' was declared here /kisskb/src/arch/powerpc/include/asm/io.h:162:1: warning: 'px_cmd' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/ata/ahci_qoriq.c:86:6: note: 'px_cmd' was declared here /kisskb/src/drivers/ata/ahci_qoriq.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1855:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2594:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/fs/f2fs/file.c: In function 'f2fs_precache_extents': /kisskb/src/fs/f2fs/file.c:2937:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/f2fs/file.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:339:21: note: 'pdeo' was declared here /kisskb/src/fs/proc/inode.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/fs/f2fs/node.c: In function '__set_nat_cache_dirty': /kisskb/src/include/linux/list.h:63:13: warning: 'head' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/f2fs/node.c:237:24: note: 'head' was declared here /kisskb/src/drivers/mfd/arizona-core.c: In function 'arizona_dev_init': /kisskb/src/drivers/mfd/arizona-core.c:1422:6: warning: 'n_subdevs' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/mfd/arizona-core.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/fs/f2fs/node.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:247:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:227:19: note: 'i' was declared here /kisskb/src/drivers/tty/serial/8250/8250_core.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/drivers/iio/temperature/mlx90632.c: In function 'mlx90632_read_raw': /kisskb/src/drivers/iio/temperature/mlx90632.c:349:37: warning: 'object_old_raw' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/iio/temperature/mlx90632.c:430:56: note: 'object_old_raw' was declared here /kisskb/src/drivers/iio/temperature/mlx90632.c:349:37: warning: 'object_new_raw' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/iio/temperature/mlx90632.c:430:40: note: 'object_new_raw' was declared here /kisskb/src/drivers/iio/temperature/mlx90632.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" [enabled by default] WARNING: modpost: Found 2 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' Completed OK # rm -rf /kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc4.6 # Build took: 0:02:09.129731
© Michael Ellerman 2006-2018.