summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/ptrace.c
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2017-01-18 16:25:22 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2017-01-18 18:05:08 +0000
commita672401c00f82e4e19704aff361d9bad18003714 (patch)
tree9c3f17a8057785d063b1e6c4b55112b44997deb9 /arch/arm64/kernel/ptrace.c
parent9dd73f72f218320c6c90da5f834996e7360dc227 (diff)
downloadop-kernel-dev-a672401c00f82e4e19704aff361d9bad18003714.zip
op-kernel-dev-a672401c00f82e4e19704aff361d9bad18003714.tar.gz
arm64/ptrace: Preserve previous registers for short regset write
Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill all the registers, the thread's old registers are preserved. Cc: <stable@vger.kernel.org> # 4.3.x- Fixes: 5d220ff9420f ("arm64: Better native ptrace support for compat tasks") Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Will Deacon <Will.Deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/ptrace.c')
-rw-r--r--arch/arm64/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index ead36d5..91c4719 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -950,7 +950,7 @@ static int compat_tls_set(struct task_struct *target,
const void __user *ubuf)
{
int ret;
- compat_ulong_t tls;
+ compat_ulong_t tls = target->thread.tp_value;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1);
if (ret)
OpenPOWER on IntegriCloud