OpenCloudOS-Kernel/arch/powerpc/platforms/pseries
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
..
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmm.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
dlpar.c powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ 2018-01-08 14:54:32 +11:00
dtl.c powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there 2017-04-11 07:46:03 +10:00
eeh_pseries.c powerpc/eeh: Add EEH operations to notify resume 2018-01-27 20:02:52 +11:00
event_sources.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
firmware.c powerpc/firmware: Add definitions for new drc-info firmware feature 2018-01-21 16:21:40 +11:00
hotplug-cpu.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
hotplug-memory.c powerpc: Move of_drconf_cell struct to asm/drmem.h 2018-01-16 23:26:29 +11:00
hvCall.S powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
hvCall_inst.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
hvconsole.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
hvcserver.c powerpc/pseries/hvcserver: don't memset pi_buff if it is null 2015-10-09 08:03:03 +11:00
ibmebus.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
io_event_irq.c powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
iommu.c powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
kexec.c powerpc/64s: Allocate LPPACAs individually 2018-03-30 23:34:24 +11:00
lpar.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
lparcfg.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
mobility.c powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration 2018-03-27 19:25:14 +11:00
msi.c powerpc/pci: Remove OF node back pointer from pci_dn 2017-08-31 14:26:12 +10:00
nvram.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
of_helpers.c pseries/drc-info: Search DRC properties for CPU indexes 2018-01-21 16:21:46 +11:00
of_helpers.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
offline_states.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci.c powerpc/pseries/pci: Associate PEs to VFs in configure SR-IOV 2018-01-27 20:02:53 +11:00
pci_dlpar.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
power.c powerpc/sparse: Include headers containing prototypes 2016-06-16 22:40:19 +10:00
pseries.h powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration 2018-03-27 19:25:14 +11:00
pseries_energy.c pseries/drc-info: Search DRC properties for CPU indexes 2018-01-21 16:21:46 +11:00
ras.c powerpc/pseries: Enable RAS hotplug events later 2018-02-13 22:37:46 +11:00
reconfig.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
rng.c powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* 2015-07-23 19:52:03 +10:00
scanlog.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
setup.c powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit 2018-05-21 20:45:31 -07:00
smp.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
suspend.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
vio.c powerpc: rename dma_direct_ to dma_nommu_ 2018-01-10 16:41:14 +01:00