# git rev-parse -q --verify a9f675f950a07d5c1dbcbb97aabac56f5ed085e3^{commit} a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 already have revision, skipping fetch # git checkout -q -f -B kisskb a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 # git clean -qxdf # < git log -1 # commit a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 # Author: Milton Miller # Date: Thu Jul 16 09:37:04 2020 +1000 # # powerpc/vdso: Fix vdso cpu truncation # # The code in vdso_cpu_init that exposes the cpu and numa node to # userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means # that any kernel running on a box with more than 4096 threads (NR_CPUS # advertises a limit of of 8192 cpus) would expose userspace to two cpu # contexts running at the same time with the same cpu number. # # Note: I'm not aware of any distro shipping a kernel with support for more # than 4096 threads today, nor of any system image that currently exceeds # 4096 threads. Found via code browsing. # # Fixes: 18ad51dd342a7eb09dbcd059d0b451b616d4dafc ("powerpc: Add VDSO version of getcpu") # Signed-off-by: Milton Miller # Signed-off-by: Anton Blanchard # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200715233704.1352257-1-anton@ozlabs.org # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 # < make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # < make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:4106:warning: override: reassigning to symbol PPC_E500MC .config:4107:warning: override: reassigning to symbol VIRTUALIZATION # make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 22 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) | ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' 139 | if (IS_ERR_VALUE(fep->ring_mem_addr)) | ^~~~~~~~~~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe84f8c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6818026 Bytes = 6658.23 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6818225 Bytes = 6658.42 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817368 Bytes = 6657.59 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f0031c INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6816302 Bytes = 6656.54 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6782769 Bytes = 6623.80 KiB = 6.47 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817320 Bytes = 6657.54 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6816499 Bytes = 6656.74 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817933 Bytes = 6658.14 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817321 Bytes = 6657.54 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:27 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6818386 Bytes = 6658.58 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe95790) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6816579 Bytes = 6656.82 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817629 Bytes = 6657.84 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817479 Bytes = 6657.69 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6816576 Bytes = 6656.81 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6816597 Bytes = 6656.83 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.8.0-rc2-ga9f675f950a0 Created: Thu Jul 16 16:47:34 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6817442 Bytes = 6657.66 KiB = 6.50 MiB Load Address: 00f00000 Entry Point: 00f002cc Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 # Build took: 0:05:09.688835