Skip to content

Commit de0f734

Browse files
nathanlynchmpe
authored andcommitted
powerpc/rtas: prevent suspend-related sys_rtas use on LE
While drmgr has had work in some areas to make its RTAS syscall interactions endian-neutral, its code for performing partition migration via the syscall has never worked on LE. While it is able to complete ibm,suspend-me successfully, it crashes when attempting the subsequent ibm,update-nodes call. drmgr is the only known (or plausible) user of ibm,suspend-me, ibm,update-nodes, and ibm,update-properties, so allow them only in big-endian configurations. Signed-off-by: Nathan Lynch <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 475c874 commit de0f734

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/kernel/rtas.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,9 +1050,11 @@ static struct rtas_filter rtas_filters[] __ro_after_init = {
10501050
{ "set-time-for-power-on", -1, -1, -1, -1, -1 },
10511051
{ "ibm,set-system-parameter", -1, 1, -1, -1, -1 },
10521052
{ "set-time-of-day", -1, -1, -1, -1, -1 },
1053+
#ifdef CONFIG_CPU_BIG_ENDIAN
10531054
{ "ibm,suspend-me", -1, -1, -1, -1, -1 },
10541055
{ "ibm,update-nodes", -1, 0, -1, -1, -1, 4096 },
10551056
{ "ibm,update-properties", -1, 0, -1, -1, -1, 4096 },
1057+
#endif
10561058
{ "ibm,physical-attestation", -1, 0, 1, -1, -1 },
10571059
};
10581060

0 commit comments

Comments
 (0)