# git rev-parse -q --verify 7e1ed4da4a16e035a76001461fbd75c453b73206^{commit} 7e1ed4da4a16e035a76001461fbd75c453b73206 already have revision, skipping fetch # git checkout -q -f -B kisskb 7e1ed4da4a16e035a76001461fbd75c453b73206 # git clean -qxdf # < git log -1 # commit 7e1ed4da4a16e035a76001461fbd75c453b73206 # Author: Breno Leitao # Date: Wed Jan 30 10:46:00 2019 -0200 # # powerpc/ptrace: Mitigate potential Spectre v1 # # 'regno' is directly controlled by user space, hence leading to a potential # exploitation of the Spectre variant 1 vulnerability. # # On PTRACE_SETREGS and PTRACE_GETREGS requests, user space passes the # register number that would be read or written. This register number is # called 'regno' which is part of the 'addr' syscall parameter. # # This 'regno' value is checked against the maximum pt_regs structure size, # and then used to dereference it, which matches the initial part of a # Spectre v1 (and Spectre v1.1) attack. The dereferenced value, then, # is returned to userspace in the GETREGS case. # # This patch sanitizes 'regno' before using it to dereference pt_reg. # # Notice that given that speculation windows are large, the policy is # to kill the speculation on the first load and not worry if it can be # completed with a dependent load/store [1]. # # [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 # # Signed-off-by: Breno Leitao # Acked-by: Gustavo A. R. Silva # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 7e1ed4da4a16e035a76001461fbd75c453b73206 # < make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc86xx_defconfig # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:140.22-142.4: Warning (pci_bridge): /pcie@f1008000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:97.7-122.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:107.9-121.4: Warning (pci_bridge): /pcie@f1008000/pcie@0: missing ranges for PCI bridge (or not a bridge) /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:144.22-146.4: Warning (pci_bridge): /pcie@f1009000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:124.7-149.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:134.9-148.4: Warning (pci_bridge): /pcie@f1009000/pcie@0: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:35.11-37.6: Warning (i2c_bus_reg): /soc@f1000000/i2c@3000/rtc@68: missing or empty reg property INFO: Uncompressed kernel (size 0x9f8e0c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xa00000) Image Name: Linux-5.0.0-rc2-g7e1ed4da4a16 Created: Wed Feb 6 01:24:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4941464 Bytes = 4825.65 KiB = 4.71 MiB Load Address: 00000000 Entry Point: 00000000 Completed OK # rm -rf /kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 # Build took: 0:01:42.018741