[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJwJo6YnELNhU8RmR-z37vDZ=xb0CmUUBgrPGgHP2dqjVm=O2g@mail.gmail.com>
Date: Mon, 27 Feb 2023 16:02:54 +0000
From: Dmitry Safonov <0x7f454c46@...il.com>
To: Gregory Price <gourry.memverge@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
oleg@...hat.com, avagin@...il.com, peterz@...radead.org,
luto@...nel.org, krisman@...labora.com, tglx@...utronix.de,
corbet@....net, shuah@...nel.org,
Gregory Price <gregory.price@...verge.com>
Subject: Re: [PATCH v12 2/3] ptrace,syscall_user_dispatch: checkpoint/restore
support for SUD
Hi Gragory,
On Fri, 24 Feb 2023 at 23:40, Gregory Price <gourry.memverge@...il.com> wrote:
>
> Implement ptrace getter/setter interface for syscall user dispatch.
>
> These prctl settings are presently write-only, making it impossible to
> implement transparent checkpoint/restore via software like CRIU.
>
> 'on_dispatch' field is not exposed because it is a kernel-internal
> only field that cannot be 'true' when returning to userland.
>
> Signed-off-by: Gregory Price <gregory.price@...verge.com>
> ---
[..]
> +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.
Thanks,
Dmitry
Powered by blists - more mailing lists