The region exposed to user space for use as work areas passed to sys_rtas() can be incorrectly allocated on radix, leading to failures in users of librtas. Correct this and clean up some of the code visited along the way.
I think the cleanups should be unobjectionable and I've placed them first in the series. Please check my work on the rtas_rmo_buf allocation changes; they are only lightly tested so far (slot add on Power9 PowerVM, and comparison of /memory@0/reg with the contents of /proc/powerpc/rtas/rmo_buf on qemu Power9 w/radix). I suspect the per-cpu RTAS argument structures for reentrant calls need similar measures, but I can add that to the series once there is consensus on the approach. Nathan Lynch (6): powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX powerpc/rtas: remove ibm_suspend_me_token powerpc/rtas: move syscall filter setup into separate function powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE powerpc/rtas: constrain user region allocation to RMA arch/powerpc/include/asm/rtas.h | 9 ++- arch/powerpc/kernel/rtas-proc.c | 15 +++-- arch/powerpc/kernel/rtas.c | 108 ++++++++++++++++++++++++-------- 3 files changed, 98 insertions(+), 34 deletions(-) -- 2.29.2
