lkml.org 
[lkml]   [2023]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 2/3] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD
On 02/27, Dmitry Safonov wrote:
>
> > +int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long size,
> > + void __user *data)
> > +{
> > + int rc;
> > + struct ptrace_sud_config cfg;
> > +
> > + if (size != sizeof(struct ptrace_sud_config))
> > + return -EINVAL;
> > +
> > + if (copy_from_user(&cfg, data, sizeof(struct ptrace_sud_config)))
> > + return -EFAULT;
>
> It seems that the tool you want here would be copy_struct_from_user(),
> which is designed for extendable syscalls.

Hmm. Why?

In this case ksize == usize, so why do we need copy_struct_from_user ?

Oleg.

\
 
 \ /
  Last update: 2023-03-27 00:38    [W:0.086 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site