Thread (2 messages) flat view 2 messages, 2 authors, 2026-08-03

Re: [PATCH] powerpc: rtas: use get_user to simplify manage_flash_write

From: Madhavan Srinivasan <maddy@linux.ibm.com>
Date: 2026-08-03 06:58:53
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help