From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Sargun Dhillon <sargun@sargun.me>,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, linux-api@vger.kernel.org,
linux-fsdevel@vger.kernel.org, tycho@tycho.ws, jannh@google.com,
cyphar@cyphar.com, luto@amacapital.net, viro@zeniv.linux.org.uk
Subject: Re: [PATCH v2 4/4] samples: Add example of using PTRACE_GETFD in conjunction with user trap
Date: Mon, 9 Dec 2019 21:46:35 +0100 [thread overview]
Message-ID: <20191209204635.GC10721@redhat.com> (raw)
In-Reply-To: <BE3E056F-0147-4A00-8FF7-6CC9DE02A30C@ubuntu.com>
On 12/09, Christian Brauner wrote:
>
> >We can
> >add PTRACE_DETACH_ASYNC, but this makes me think that PTRACE_GETFD has
> >nothing
> >to do with ptrace.
> >
> >May be a new syscall which does ptrace_may_access() + get_task_file()
> >will make
> >more sense?
> >
> >Oleg.
>
> Once more since this annoying app uses html by default...
>
> But we can already do this right now and this is just an improvement.
> That's a bit rich for a new syscall imho...
I agree, and I won't really argue...
but the changelog in 2/4 says
The requirement that the tracer has attached to the tracee prior to the
capture of the file descriptor may be lifted at a later point.
so may be we should do this right now?
plus this part
@@ -1265,7 +1295,8 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
}
ret = ptrace_check_attach(child, request == PTRACE_KILL ||
- request == PTRACE_INTERRUPT);
+ request == PTRACE_INTERRUPT ||
+ request == PTRACE_GETFD);
actually means "we do not need ptrace, but we do not know where else we
can add this fd_install(get_task_file()).
Oleg.
next prev parent reply other threads:[~2019-12-09 20:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 7:06 [PATCH v2 4/4] samples: Add example of using PTRACE_GETFD in conjunction with user trap Sargun Dhillon
2019-12-09 19:30 ` Oleg Nesterov
2019-12-09 19:49 ` Christian Brauner
2019-12-09 20:46 ` Oleg Nesterov [this message]
2019-12-10 11:10 ` Christian Brauner
2019-12-10 15:35 ` Tycho Andersen
2019-12-10 16:07 ` Sargun Dhillon
2019-12-10 16:13 ` Tycho Andersen
2019-12-10 16:38 ` Christian Brauner
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=20191209204635.GC10721@redhat.com \
--to=oleg@redhat.com \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--cc=cyphar@cyphar.com \
--cc=jannh@google.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=sargun@sargun.me \
--cc=tycho@tycho.ws \
--cc=viro@zeniv.linux.org.uk \
/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).