]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/signal32: Add and use unsafe_put_sigset_t()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 18 Aug 2020 17:19:33 +0000 (17:19 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Dec 2020 14:01:14 +0000 (01:01 +1100)
commitc33786d9c6d9d126496692cf9b80ae5caac53e0c
treec9592674a2b48a45cfa3386ecac9d6cf9d9c9215
parent48ee9c855ccee477f1a35cba2a6c5cab34b3343e
powerpc/signal32: Add and use unsafe_put_sigset_t()

put_sigset_t() calls copy_to_user() for copying two words.

This is terribly inefficient for copying two words.

By switching to unsafe_put_user(), we end up with something as
simple as:

 3cc:   81 3d 00 00     lwz     r9,0(r29)
 3d0:   91 26 00 b4     stw     r9,180(r6)
 3d4:   81 3d 00 04     lwz     r9,4(r29)
 3d8:   91 26 00 b8     stw     r9,184(r6)

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/06def97e87ac1c4ae8e3197e0982e1fab7b3c8ae.1597770847.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/signal_32.c