Commit 7c11f889 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/signal: Add unsafe_copy_ck{fpr/vsx}_from_user

Add unsafe_copy_ckfpr_from_user() and unsafe_copy_ckvsx_from_user()
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1040687aa27553d19f749f7fb48f0c07af98ee2d.1616151715.git.christophe.leroy@csgroup.eu
parent c1cc1570
...@@ -100,6 +100,26 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from); ...@@ -100,6 +100,26 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from);
unsafe_put_user(__t->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET], \ unsafe_put_user(__t->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET], \
&buf[i], label);\ &buf[i], label);\
} while (0) } while (0)
#define unsafe_copy_ckfpr_from_user(task, from, label) do { \
struct task_struct *__t = task; \
u64 __user *buf = (u64 __user *)from; \
int i; \
\
for (i = 0; i < ELF_NFPREG - 1 ; i++) \
unsafe_get_user(__t->thread.TS_CKFPR(i), &buf[i], label);\
unsafe_get_user(__t->thread.ckfp_state.fpscr, &buf[i], failed); \
} while (0)
#define unsafe_copy_ckvsx_from_user(task, from, label) do { \
struct task_struct *__t = task; \
u64 __user *buf = (u64 __user *)from; \
int i; \
\
for (i = 0; i < ELF_NVSRHALFREG ; i++) \
unsafe_get_user(__t->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET], \
&buf[i], label); \
} while (0)
#endif #endif
#elif defined(CONFIG_PPC_FPU_REGS) #elif defined(CONFIG_PPC_FPU_REGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment