summaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-06-06 18:46:45 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2020-06-26 01:01:53 -0400
commit6bc4f16c6c9bed6ce5c3ab77b95397c8c88bdb66 (patch)
treef82d0895ced3126742dd544978747b7eba301b01 /arch/ia64
parenta79ca8e7b9d56c762c3cd53465fde62f8ca41acf (diff)
downloadlinux-6bc4f16c6c9bed6ce5c3ab77b95397c8c88bdb66.tar.gz
linux-6bc4f16c6c9bed6ce5c3ab77b95397c8c88bdb66.tar.xz
[ia64] access_uarea(): stop bothering with gpregs_[gs]et()
We know this won't be called for child == current, so we don't need to bother with callbacks, etc. - just do unw_init_from_blocked_task(), unw_unwind_to_user() and do the payload of gpregs_[gs]et(). For one register. Which is to say, access_elf_reg(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/ptrace.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index be635f6f93c9..e0813c8e4b47 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1936,15 +1936,14 @@ access_uarea(struct task_struct *child, unsigned long addr,
}
if (pos != -1) {
- if (write_access)
- ret = gpregs_set(child, NULL, pos,
- sizeof(unsigned long), data, NULL);
- else
- ret = gpregs_get(child, NULL, pos,
- sizeof(unsigned long), data, NULL);
- if (ret != 0)
- return -1;
- return 0;
+ struct unw_frame_info info;
+
+ memset(&info, 0, sizeof(info));
+ unw_init_from_blocked_task(&info, child);
+ if (unw_unwind_to_user(&info) < 0)
+ return 0;
+
+ return access_elf_reg(child, &info, pos, data, write_access);
}
/* access debug registers */