[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191209204635.GC10721@redhat.com>
Date: Mon, 9 Dec 2019 21:46:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Christian Brauner <christian.brauner@...ntu.com>
Cc: Sargun Dhillon <sargun@...gun.me>, linux-kernel@...r.kernel.org,
containers@...ts.linux-foundation.org, linux-api@...r.kernel.org,
linux-fsdevel@...r.kernel.org, tycho@...ho.ws, jannh@...gle.com,
cyphar@...har.com, luto@...capital.net, viro@...iv.linux.org.uk
Subject: Re: [PATCH v2 4/4] samples: Add example of using PTRACE_GETFD in
conjunction with user trap
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.
Powered by blists - more mailing lists