# 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_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/mpe_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:10: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:77: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)) ^ In file included from /kisskb/src/include/linux/printk.h:7:0, from /kisskb/src/include/linux/kernel.h:14, from /kisskb/src/drivers/net/ethernet/freescale/ucc_geth.c:18: /kisskb/src/drivers/net/ethernet/freescale/ucc_geth.c: In function 'ucc_geth_probe': /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:309:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/net/ethernet/freescale/ucc_geth.c:3860:3: note: in expansion of macro 'pr_info' pr_info("UCC%1d at 0x%8x (irq = %d)\n", ^ INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbc4a00) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbb4248) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799559 Bytes = 5663.63 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5774200 Bytes = 5638.87 kB = 5.51 MB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5800412 Bytes = 5664.46 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:47 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799485 Bytes = 5663.56 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:48 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5800387 Bytes = 5664.44 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:48 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799861 Bytes = 5663.93 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:48 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5800708 Bytes = 5664.75 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799804 Bytes = 5663.87 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799804 Bytes = 5663.87 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799529 Bytes = 5663.60 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799451 Bytes = 5663.53 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5799484 Bytes = 5663.56 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5801250 Bytes = 5665.28 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5800413 Bytes = 5664.47 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5801291 Bytes = 5665.32 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.14.43-g2e2e791 Created: Thu May 24 02:39:49 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5801043 Bytes = 5665.08 kB = 5.53 MB Load Address: 00c00000 Entry Point: 00c0020c Completed OK # rm -rf /kisskb/build/mpe_mpc85xx_smp_defconfig_powerpc-5.3 # Build took: 0:01:47.682472