[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250117144556.GB21203@redhat.com>
Date: Fri, 17 Jan 2025 15:45:57 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Dmitry V. Levin" <ldv@...ace.io>
Cc: Eugene Syromyatnikov <evgsyr@...il.com>,
Mike Frysinger <vapier@...too.org>,
Renzo Davoli <renzo@...unibo.it>,
Davide Berardi <berardi.dav@...il.com>,
strace-devel@...ts.strace.io, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org
Subject: Re: [PATCH v2 6/7] ptrace: introduce PTRACE_SET_SYSCALL_INFO request
On 01/16, Dmitry V. Levin wrote:
>
> The idea is to use "op" to specify the operation, and "flags" to specify
> future extensions to the operation.
OK,
> That is, the zero check implied by copy_struct_from_user() is not really
> needed here since the compatibility is tracked by "op" and "flags":
OK, but then why this patch uses copy_struct_from_user() ?
Why can't we simply do
if (user_size != PTRACE_SYSCALL_INFO_SIZE_VER0)
return -EINVAL;
if (copy_from_user(..., user_size))
return EFAULT;
now, until we add the extensions ?
Oleg.
Powered by blists - more mailing lists