On Thu, 28 May 2026 22:12:27 +0200, Thorsten Blum wrote:
Drop the local 10-byte buffer. The old code copied at most 9 bytes from
the user buffer, but only the first byte was used to select the RTAS
operation.
Use get_user() to read the command byte instead and compare it directly
with '0' and '1'. Drop the explicit user buffer check, since get_user()
will fail on a NULL pointer and correctly return -EFAULT instead of
-EINVAL. Remove the now-obsolete string constants as well as any
strncmp() and strlen() calls.
[...]
Applied to powerpc/next.
[1/1] powerpc: rtas: use get_user to simplify manage_flash_write
https://git.kernel.org/powerpc/c/c7b7cea42cd4977f95ce520400c9740712b909a2
cheers