All of lore.kernel.org
 help / color / mirror / Atom feed
From: Renzo Davoli <renzo@cs.unibo.it>
To: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>, Alexey Gladkov <legion@kernel.org>,
	Eugene Syromyatnikov <evgsyr@gmail.com>,
	Davide Berardi <berardi.dav@gmail.com>,
	strace-devel@lists.strace.io, "Dmitry V . Levin" <ldv@strace.io>
Subject: Re: [PATCH 1/2] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support
Date: Sat, 4 Jul 2026 16:25:20 +0200	[thread overview]
Message-ID: <akkX0AmPacHkY9S4@cs.unibo.it> (raw)
In-Reply-To: <akjr3HZoLOdBOj1a@redhat.com>

You are right, fixing in v2.
renzo

On Sat, Jul 04, 2026 at 01:17:48PM +0200, Oleg Nesterov wrote:
> On 07/04, Renzo Davoli wrote:
> >
> > -	/* Changing the type of the system call stop is not supported yet. */
> > -	if (ptrace_get_syscall_info_op(child) != info.op)
> > -		return -EINVAL;
> > +	/*
> > +	 * Changing the type of the system call stop is not allowed, with the
> > +	 * following exception:
> > +	 * PTRACE_SYSCALL_INFO_SECCOMP or PTRACE_SYSCALL_INFO_ENTRY can be changed
> > +	 * to PTRACE_SYSCALL_INFO_EXIT to skip the system call
> > +	 */
> > +
> > +	if (ptrace_get_syscall_info_op(child) != info.op) {
> > +		if (info.op != PTRACE_SYSCALL_INFO_EXIT)
> > +			return -EINVAL;
> > +		skip_syscall = true;
> > +	}
> 
> Ah... I forgot that ptrace_get_syscall_info_op() can return _NONE.
> 
> We should not allow _NONE -> _EXIT transition.
> 
> Oleg.

  reply	other threads:[~2026-07-04 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04  8:33 [PATCH 0/2] ptrace_set_syscall_info: add support for seccomp syscall skipping Renzo Davoli
2026-07-04  8:33 ` [PATCH 1/2] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support Renzo Davoli
2026-07-04 11:17   ` Oleg Nesterov
2026-07-04 14:25     ` Renzo Davoli [this message]
2026-07-04  8:33 ` [PATCH 2/2] selftests/ptrace: add a test case for PTRACE_SYSCALL_INFO syscall skipping Renzo Davoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=akkX0AmPacHkY9S4@cs.unibo.it \
    --to=renzo@cs.unibo.it \
    --cc=akpm@linux-foundation.org \
    --cc=berardi.dav@gmail.com \
    --cc=evgsyr@gmail.com \
    --cc=ldv@strace.io \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=shuah@kernel.org \
    --cc=strace-devel@lists.strace.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.