diff options
author | Dave Martin <Dave.Martin@arm.com> | 2017-06-29 16:25:48 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-06-29 18:44:08 +0200 |
commit | 16d38acb12d065ebe3494e4e31e8b4438f3214da (patch) | |
tree | ae2413f6cdbf4e8fffc4e4a93f521a1265d8a1bb /arch/arm64 | |
parent | arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails (diff) | |
download | linux-16d38acb12d065ebe3494e4e31e8b4438f3214da.tar.xz linux-16d38acb12d065ebe3494e4e31e8b4438f3214da.zip |
arm64: ptrace: Remove redundant overrun check from compat_vfp_set()
compat_vfp_set() checks for userspace trying to write an excessive
amount of data to the regset. However this check is conspicuous
for its absence from every other _set() in the arm64 ptrace
implementation. In fact, the core ptrace_regset() already clamps
userspace's iov_len to the regset size before the individual regset
.{get,set}() methods get called.
This patch removes the redundant check.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/ptrace.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 4c068dcf1977..949ab6bdfbad 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -937,9 +937,6 @@ static int compat_vfp_set(struct task_struct *target, compat_ulong_t fpscr; int ret; - if (pos + count > VFP_STATE_SIZE) - return -EIO; - uregs = &target->thread.fpsimd_state.user_fpsimd; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, |