Re: [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration

From: Oleg Nesterov
Date: Mon Jan 23 2023 - 10:42:09 EST


On 01/22, Gregory Price wrote:
>
> +int syscall_user_dispatch_get_config(struct task_struct *task, unsigned long size,
> + void __user *data)
> +{
> + struct syscall_user_dispatch *sd = &task->syscall_dispatch;
> + struct syscall_user_dispatch_config config;
> +
> + if (size != sizeof(struct syscall_user_dispatch_config))
> + return -EINVAL;
> +
> + if (test_syscall_work(SYSCALL_USER_DISPATCH))
> + config.mode = PR_SYS_DISPATCH_ON;
> + else
> + config.mode = PR_SYS_DISPATCH_OFF;

Stupid question...

Why do we need 2/3 (which reports SYSCALL_USER_DISPATCH in proc/pid/status) then?

Oleg.