diff mbox series

[4/4] powerpc/64s: Sanitise user registers on interrupt in pseries

Message ID 20221102224528.639894-4-rmclure@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series [1/4] powerpc/64: Add INTERRUPT_SANITIZE_REGISTERS Kconfig | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_sparse fail sparse (ppc64le, ppc64le, ubuntu-21.10) failed at step Build.
snowpatch_ozlabs/github-powerpc_kernel_qemu fail kernel (ppc64le_defconfig, korg-5.5.0, ppc64le) failed at step build.
snowpatch_ozlabs/github-powerpc_clang fail kernel (ppc64le, ppc64le, ubuntu-21.10) failed at step build.

Commit Message

Rohan McLure Nov. 2, 2022, 10:45 p.m. UTC
Cause pseries platforms to default to zeroising all potentially user-defined
registers when entering the kernel by means of any interrupt source,
reducing user-influence of the kernel and the likelihood or producing
speculation gadgets. Interrupt sources include syscalls.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
Resubmitting patches as their own series after v6 partially merged:
Link: https://lore.kernel.org/all/166488988686.779920.13794870102696416283.b4-ty@ellerman.id.au/t/
Standalone series: new patch
---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9d3d20c6f365..2eb328b25e49 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -532,7 +532,7 @@  config HOTPLUG_CPU
 config INTERRUPT_SANITIZE_REGISTERS
 	bool "Clear gprs on interrupt arrival"
 	depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER
-	default PPC_BOOK3E_64
+	default PPC_BOOK3E_64 || PPC_PSERIES
 	help
 	  Reduce the influence of user register state on interrupt handlers and
 	  syscalls through clearing user state from registers before handling