OpenCloudOS-Kernel/arch/powerpc/platforms
Nicholas Piggin a048a07d7f 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 <npiggin@gmail.com>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michal Suchánek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-05-21 20:45:31 -07:00
..
4xx powerpc/4xx: Fix error return code in ppc4xx_msi_probe() 2018-03-31 00:10:34 +11:00
8xx powerpc/8xx: fix cpm_cascade() dual end of interrupt 2018-03-13 15:50:28 +11:00
40x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
44x powerpc/44x/fsp2: Add irq error handlers 2017-12-11 13:03:34 +11:00
52xx powerpc/mpc52xx_gpt: make use of raw_spinlock variants 2018-01-27 21:12:04 +11:00
82xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
83xx powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
85xx powerpc/64: Use array of paca pointers and allocate pacas individually 2018-03-30 23:34:23 +11:00
86xx powerpc: Use pr_warn instead of pr_warning 2017-12-04 11:54:34 +11:00
512x powerpc: Use pr_warn instead of pr_warning 2017-12-04 11:54:34 +11:00
amigaone License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cell proc: fix /proc/loadavg regression 2018-04-20 17:18:36 -07:00
chrp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
embedded6xx powerpc/wii: Don't rely on the reserved memory hack 2018-04-01 00:47:43 +11:00
maple powerpc: Set I/O port resource types correctly 2017-12-18 23:07:45 -06:00
pasemi powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
powermac powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
powernv powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit 2018-05-21 20:45:31 -07:00
ps3 powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
pseries powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit 2018-05-21 20:45:31 -07:00
Kconfig powerpc/cell: Remove axonram driver 2018-01-28 17:00:36 +11:00
Kconfig.cputype powerpc/64s: Add POWER9 CPU type selection 2018-04-01 22:15:32 +10:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00