Re: [RFC PATCH v5 01/13] ptrace: Use regset_size() for dynamic regset

From: Oleg Nesterov
Date: Thu May 28 2020 - 08:36:55 EST


On 05/28, Greentime Hu wrote:
>
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -888,7 +888,7 @@ static int ptrace_regset(struct task_struct *task, int req, unsigned int type,
>
> regset_no = regset - view->regsets;
> kiov->iov_len = min(kiov->iov_len,
> - (__kernel_size_t) (regset->n * regset->size));
> + (__kernel_size_t) regset_size(task, regset));

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>