提交 16d38acb 编写于 作者: D Dave Martin 提交者: Will Deacon

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: NDave Martin <Dave.Martin@arm.com>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 53b1a742
...@@ -937,9 +937,6 @@ static int compat_vfp_set(struct task_struct *target, ...@@ -937,9 +937,6 @@ static int compat_vfp_set(struct task_struct *target,
compat_ulong_t fpscr; compat_ulong_t fpscr;
int ret; int ret;
if (pos + count > VFP_STATE_SIZE)
return -EIO;
uregs = &target->thread.fpsimd_state.user_fpsimd; uregs = &target->thread.fpsimd_state.user_fpsimd;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册