From: Gregory Price <gregory.price@memverge.com>
To: Andrei Vagin <avagin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Gregory Price <gourry.memverge@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Gabriel Krisman Bertazi <krisman@collabora.com>,
Thomas Gleixner <tglx@linutronix.de>,
Jonathan Corbet <corbet@lwn.net>, Shuah Khan <shuah@kernel.org>,
Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH v6 1/2] ptrace,syscall_user_dispatch: Implement Syscall User Dispatch Suspension
Date: Thu, 26 Jan 2023 14:01:36 -0500 [thread overview]
Message-ID: <Y9LOEN3u/jYqPujS@memverge.com> (raw)
In-Reply-To: <CANaxB-xO1fgMGRzk1Ovs2nNx0sU8wJcdpF4jGVv6nj2ErUVEAA@mail.gmail.com>
On Thu, Jan 26, 2023 at 10:53:49AM -0800, Andrei Vagin wrote:
> On Thu, Jan 26, 2023 at 10:30 AM Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > On 01/26, Andrei Vagin wrote:
> > >
> > > On Thu, Jan 26, 2023 at 7:07 AM Oleg Nesterov <oleg@redhat.com> wrote:
> > > >
> > > > IIUC, PTRACE_O_SUSPEND_SYSCALL_USER_DISPATCH is needed to run the injected
> > > > code, and this also needs to change the state of the traced process. If
> > > > the tracer (CRIU) dies while the tracee runs this code, I guess the tracee
> > > > will have other problems?
> > >
> > > Our injected code can reheal itself if something goes wrong. The hack
> > > here is that we inject
> > > the code with a signal frame and it calls rt_segreturn to resume the process.
> >
> > What will happen if CRIU dies and clears ->ptrace right before
> > syscall_user_dispatch() checks PT_SUSPEND_SYSCALL_USER_DISPATCH ?
> >
> > How the tracee will react to SIGSYS with unexpected .si_syscall ?
>
> I got it. PTRACE_O_SUSPEND_SUD doesn't help us here, because we rely
> on sigreturn
> that is called after ptrace_detach. Thanks.
>
> >
> > > I don't expect that
> > > the syscall user dispatch
> > > is used by many applications,
> >
> > Agreed, so the case when CRIU will need to do the additional
> > PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG twice to disable and then re-enable
> > syscall_user_dispatch is unlikely.
> >
> > > so I don't strongly insist on
> > > PTRACE_O_SUSPEND_SYSCALL_USER_DISPATCH.
> >
> > I too won't argue too much. but so far I do not feel there is enough
> > justification for this feature ...
>
> Agree
>
> >
> > Oleg.
> >
Seems that's consensus, I will drop it.
next prev parent reply other threads:[~2023-01-26 19:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 2:51 [PATCH v6 0/2] Gregory Price
2023-01-25 2:51 ` [PATCH v6 1/2] ptrace,syscall_user_dispatch: Implement Syscall User Dispatch Suspension Gregory Price
2023-01-26 0:30 ` Oleg Nesterov
2023-01-26 1:30 ` Gregory Price
2023-01-26 4:43 ` Gregory Price
[not found] ` <CANaxB-xn0wW5xA_CT7bA5=jig+td__EDKPBWSpZdfgMgVOezCg@mail.gmail.com>
2023-01-26 5:26 ` Gregory Price
2023-01-26 15:10 ` Oleg Nesterov
2023-01-26 18:09 ` Andrei Vagin
2023-01-26 15:07 ` Oleg Nesterov
2023-01-26 17:45 ` Andrei Vagin
2023-01-26 17:52 ` Gregory Price
2023-01-26 18:30 ` Andrei Vagin
2023-01-26 18:30 ` Oleg Nesterov
2023-01-26 18:46 ` Gregory Price
2023-01-26 18:53 ` Andrei Vagin
2023-01-26 19:01 ` Gregory Price [this message]
2023-01-25 2:51 ` [PATCH v6 2/2] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration Gregory Price
2023-01-25 7:14 ` kernel test robot
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=Y9LOEN3u/jYqPujS@memverge.com \
--to=gregory.price@memverge.com \
--cc=avagin@gmail.com \
--cc=corbet@lwn.net \
--cc=gourry.memverge@gmail.com \
--cc=krisman@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).