|
Michal Suchanek |
cbe381 |
From de0f7349a0dd072e54b5fc04c305907b22d28a5f Mon Sep 17 00:00:00 2001
|
|
Michal Suchanek |
cbe381 |
From: Nathan Lynch <nathanl@linux.ibm.com>
|
|
Michal Suchanek |
cbe381 |
Date: Mon, 7 Dec 2020 15:51:33 -0600
|
|
Michal Suchanek |
cbe381 |
Subject: [PATCH] powerpc/rtas: prevent suspend-related sys_rtas use on LE
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
References: bsc#1181674 ltc#189159
|
|
Michal Suchanek |
cbe381 |
Patch-mainline: v5.11-rc1
|
|
Michal Suchanek |
cbe381 |
Git-commit: de0f7349a0dd072e54b5fc04c305907b22d28a5f
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
While drmgr has had work in some areas to make its RTAS syscall
|
|
Michal Suchanek |
cbe381 |
interactions endian-neutral, its code for performing partition
|
|
Michal Suchanek |
cbe381 |
migration via the syscall has never worked on LE. While it is able to
|
|
Michal Suchanek |
cbe381 |
complete ibm,suspend-me successfully, it crashes when attempting the
|
|
Michal Suchanek |
cbe381 |
subsequent ibm,update-nodes call.
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
drmgr is the only known (or plausible) user of ibm,suspend-me,
|
|
Michal Suchanek |
cbe381 |
ibm,update-nodes, and ibm,update-properties, so allow them only in
|
|
Michal Suchanek |
cbe381 |
big-endian configurations.
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
|
|
Michal Suchanek |
cbe381 |
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
|
|
Michal Suchanek |
cbe381 |
Link: https://lore.kernel.org/r/20201207215200.1785968-2-nathanl@linux.ibm.com
|
|
Michal Suchanek |
cbe381 |
Acked-by: Michal Suchanek <msuchanek@suse.de>
|
|
Michal Suchanek |
cbe381 |
---
|
|
Michal Suchanek |
cbe381 |
arch/powerpc/kernel/rtas.c | 2 ++
|
|
Michal Suchanek |
cbe381 |
1 file changed, 2 insertions(+)
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
|
|
Michal Suchanek |
cbe381 |
index 954f41676f69..4ed64aba37d6 100644
|
|
Michal Suchanek |
cbe381 |
--- a/arch/powerpc/kernel/rtas.c
|
|
Michal Suchanek |
cbe381 |
+++ b/arch/powerpc/kernel/rtas.c
|
|
Michal Suchanek |
cbe381 |
@@ -1050,9 +1050,11 @@ static struct rtas_filter rtas_filters[] __ro_after_init = {
|
|
Michal Suchanek |
cbe381 |
{ "set-time-for-power-on", -1, -1, -1, -1, -1 },
|
|
Michal Suchanek |
cbe381 |
{ "ibm,set-system-parameter", -1, 1, -1, -1, -1 },
|
|
Michal Suchanek |
cbe381 |
{ "set-time-of-day", -1, -1, -1, -1, -1 },
|
|
Michal Suchanek |
cbe381 |
+#ifdef CONFIG_CPU_BIG_ENDIAN
|
|
Michal Suchanek |
cbe381 |
{ "ibm,suspend-me", -1, -1, -1, -1, -1 },
|
|
Michal Suchanek |
cbe381 |
{ "ibm,update-nodes", -1, 0, -1, -1, -1, 4096 },
|
|
Michal Suchanek |
cbe381 |
{ "ibm,update-properties", -1, 0, -1, -1, -1, 4096 },
|
|
Michal Suchanek |
cbe381 |
+#endif
|
|
Michal Suchanek |
cbe381 |
{ "ibm,physical-attestation", -1, 0, 1, -1, -1 },
|
|
Michal Suchanek |
cbe381 |
};
|
|
Michal Suchanek |
cbe381 |
|
|
Michal Suchanek |
cbe381 |
--
|
|
Michal Suchanek |
cbe381 |
2.26.2
|
|
Michal Suchanek |
cbe381 |
|