# git rev-parse -q --verify 13fef872f8b33431ebb920915252cafc651092dd^{commit} 13fef872f8b33431ebb920915252cafc651092dd already have revision, skipping fetch # git checkout -q -f -B kisskb 13fef872f8b33431ebb920915252cafc651092dd # git clean -qxdf # < git log -1 # commit 13fef872f8b33431ebb920915252cafc651092dd # Author: Michael Ellerman # Date: Mon May 20 20:55:20 2019 +1000 # # selftests/powerpc: Add a test of spectre_v2 mitigations # # This test uses the PMU to count branch prediction hits/misses for a # known loop, and compare the result to the reported spectre v2 # mitigation. # # This gives us a way of sanity checking that the reported mitigation is # actually in effect. # # Sample output for some cases, eg: # # Power9: # sysfs reports: 'Vulnerable' # PM_BR_PRED_CCACHE: result 368 running/enabled 5792777124 # PM_BR_MPRED_CCACHE: result 319 running/enabled 5792775546 # PM_BR_PRED_PCACHE: result 2147483281 running/enabled 5792773128 # PM_BR_MPRED_PCACHE: result 213604201 running/enabled 5792771640 # Miss percent 9 % # OK - Measured branch prediction rates match reported spectre v2 mitigation. # # sysfs reports: 'Mitigation: Indirect branch serialisation (kernel only)' # PM_BR_PRED_CCACHE: result 895 running/enabled 5780320920 # PM_BR_MPRED_CCACHE: result 822 running/enabled 5780312414 # PM_BR_PRED_PCACHE: result 2147482754 running/enabled 5780308836 # PM_BR_MPRED_PCACHE: result 213639731 running/enabled 5780307912 # Miss percent 9 % # OK - Measured branch prediction rates match reported spectre v2 mitigation. # # sysfs reports: 'Mitigation: Indirect branch cache disabled' # PM_BR_PRED_CCACHE: result 2147483649 running/enabled 20540186160 # PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 20540180056 # PM_BR_PRED_PCACHE: result 0 running/enabled 20540176090 # PM_BR_MPRED_PCACHE: result 0 running/enabled 20540174182 # Miss percent 100 % # OK - Measured branch prediction rates match reported spectre v2 mitigation. # # Power8: # sysfs reports: 'Vulnerable' # PM_BR_PRED_CCACHE: result 2147483649 running/enabled 3505888142 # PM_BR_MPRED_CCACHE: result 9 running/enabled 3505882788 # Miss percent 0 % # OK - Measured branch prediction rates match reported spectre v2 mitigation. # # sysfs reports: 'Mitigation: Indirect branch cache disabled' # PM_BR_PRED_CCACHE: result 2147483649 running/enabled 16931421988 # PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 16931416478 # Miss percent 100 % # OK - Measured branch prediction rates match reported spectre v2 mitigation. # success: spectre_v2 # # 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 13fef872f8b33431ebb920915252cafc651092dd # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, 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] #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' # 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' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:334.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:334.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 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc695d4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc58da0) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120462 Bytes = 5977.01 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120423 Bytes = 5976.98 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6121924 Bytes = 5978.44 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6121252 Bytes = 5977.79 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120444 Bytes = 5977.00 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120626 Bytes = 5977.17 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120628 Bytes = 5977.18 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120452 Bytes = 5977.00 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120422 Bytes = 5976.97 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120516 Bytes = 5977.07 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6122017 Bytes = 5978.53 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120388 Bytes = 5976.94 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6090050 Bytes = 5947.31 KiB = 5.81 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120318 Bytes = 5976.87 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120480 Bytes = 5977.03 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.2.0-rc1-g13fef872f8b3 Created: Thu May 23 20:37:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6120942 Bytes = 5977.48 KiB = 5.84 MiB Load Address: 00d00000 Entry Point: 00d002a4 Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-gcc5 # Build took: 0:00:52.845624