diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-03-19 11:06:58 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-04-03 21:22:19 +1100 |
commit | 887f3ceb51cd34109ac17bfc98695162e299e657 (patch) | |
tree | fc3b7922ff22c24d09ac628b1bea4b6523fd76fc /arch/powerpc/kernel/signal.h | |
parent | 627b72bee84d6652e0af26617e71ce2b3c18fcd5 (diff) | |
download | linux-887f3ceb51cd34109ac17bfc98695162e299e657.tar.gz linux-887f3ceb51cd34109ac17bfc98695162e299e657.tar.bz2 linux-887f3ceb51cd34109ac17bfc98695162e299e657.zip |
powerpc/signal32: Convert do_setcontext[_tm]() to user access block
Add unsafe_get_user_sigset() and transform PPC32 get_sigset_t()
into an unsafe version unsafe_get_sigset_t().
Then convert do_setcontext() and do_setcontext_tm() to use
user_read_access_begin/end.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9273ba664db769b8d9c7540ae91395e346e4945e.1616151715.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/signal.h')
-rw-r--r-- | arch/powerpc/kernel/signal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h index a5152ff3c52f..f4aafa337c2e 100644 --- a/arch/powerpc/kernel/signal.h +++ b/arch/powerpc/kernel/signal.h @@ -25,6 +25,8 @@ static inline int __get_user_sigset(sigset_t *dst, const sigset_t __user *src) return __get_user(dst->sig[0], (u64 __user *)&src->sig[0]); } +#define unsafe_get_user_sigset(dst, src, label) \ + unsafe_get_user((dst)->sig[0], (u64 __user *)&(src)->sig[0], label) #ifdef CONFIG_VSX extern unsigned long copy_vsx_to_user(void __user *to, |