]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
authorAndrew Donnellan <ajd@linux.ibm.com>
Tue, 14 Jun 2022 13:49:52 +0000 (23:49 +1000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:54:00 +0000 (10:54 +0200)
commit3e70fe05f5da2c2a5d80c6d6044f550f77da90c8
tree83548617bf418e4bf2cff5a1011ee929a3ee2a28
parent7b3cd1eea7feaa9c28c8d870181ce6151f9aa812
powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address

BugLink: https://bugs.launchpad.net/bugs/1986718
commit 7bc08056a6dabc3a1442216daf527edf61ac24b6 upstream.

Add a special case to block_rtas_call() to allow the ibm,platform-dump RTAS
call through the RTAS filter if the buffer address is 0.

According to PAPR, ibm,platform-dump is called with a null buffer address
to notify the platform firmware that processing of a particular dump is
finished.

Without this, on a pseries machine with CONFIG_PPC_RTAS_FILTER enabled, an
application such as rtas_errd that is attempting to retrieve a dump will
encounter an error at the end of the retrieval process.

Fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace")
Cc: stable@vger.kernel.org
Reported-by: Sathvika Vasireddy <sathvika@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220614134952.156010-1-ajd@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/powerpc/kernel/rtas.c