OpenCloudOS-Kernel/arch/powerpc/platforms/pseries
Mauricio Faria de Oliveira 6232774f15 powerpc/pseries: Restore default security feature flags on setup
After migration the security feature flags might have changed (e.g.,
destination system with unpatched firmware), but some flags are not
set/clear again in init_cpu_char_feature_flags() because it assumes
the security flags to be the defaults.

Additionally, if the H_GET_CPU_CHARACTERISTICS hypercall fails then
init_cpu_char_feature_flags() does not run again, which potentially
might leave the system in an insecure or sub-optimal configuration.

So, just restore the security feature flags to the defaults assumed
by init_cpu_char_feature_flags() so it can set/clear them correctly,
and to ensure safe settings are in place in case the hypercall fail.

Fixes: f636c14790 ("powerpc/pseries: Set or clear security feature flags")
Depends-on: 19887d6a28e2 ("powerpc: Move default security feature flags")
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-04-03 21:50:09 +10: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/pseries: Restore default security feature flags on setup 2018-04-03 21:50:09 +10: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