# git rev-parse -q --verify 2e2e7910e6eccaed0c3bce8125e60e16d19dfc29^{commit} 2e2e7910e6eccaed0c3bce8125e60e16d19dfc29 already have revision, skipping fetch # git checkout -q -f -B kisskb 2e2e7910e6eccaed0c3bce8125e60e16d19dfc29 # git clean -qxdf # < git log -1 # commit 2e2e7910e6eccaed0c3bce8125e60e16d19dfc29 # Author: Nicholas Piggin # Date: Tue May 22 09:00:00 2018 +1000 # # powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit # # On some CPUs we can prevent a vulnerability related to store-to-load # forwarding by preventing store forwarding between privilege domains, # by inserting a barrier in kernel entry and exit paths. # # This is known to be the case on at least Power7, Power8 and Power9 # powerpc CPUs. # # Barriers must be inserted generally before the first load after moving # to a higher privilege, and after the last store before moving to a # lower privilege, HV and PR privilege transitions must be protected. # # Barriers are added as patch sections, with all kernel/hypervisor entry # points patched, and the exit points to lower privilge levels patched # similarly to the RFI flush patching. # # Firmware advertisement is not implemented yet, so CPU flush types # are hard coded. # # Thanks to Michal Suchánek for bug fixes and review. # # Signed-off-by: Nicholas Piggin # Signed-off-by: Mauricio Faria de Oliveira # Signed-off-by: Michael Neuling # Signed-off-by: Michal Suchánek # Signed-off-by: Michael Ellerman # Signed-off-by: Linus Torvalds # (cherry picked from commit a048a07d7f4535baa4cbad6bc024f175317ab938) # < /opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 2e2e7910e6eccaed0c3bce8125e60e16d19dfc29 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/mpe_ppc40x_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc40x_defconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/mpe_ppc40x_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- INFO: Uncompressed kernel (size 0x53506c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x53506c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x53506c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x52498c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x53506c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:22:58 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2526062 Bytes = 2466.86 kB = 2.41 MB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:22:58 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2554853 Bytes = 2494.97 kB = 2.44 MB Load Address: 00600000 Entry Point: 0060153c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:22:58 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2553700 Bytes = 2493.85 kB = 2.44 MB Load Address: 00600000 Entry Point: 0060135c Completed OK # rm -rf /kisskb/build/mpe_ppc40x_defconfig_powerpc-5.3 # Build took: 0:00:40.887696