From: Oleg Nesterov <oleg@redhat.com>
To: Luca Boccassi <luca.boccassi@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>,
Jeff Layton <jlayton@kernel.org>,
Josef Bacik <josef@toxicpanda.com>,
linux-kernel@vger.kernel.org, paul@paul-moore.com,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] pidfd: add ioctl to retrieve pid info
Date: Fri, 4 Oct 2024 21:29:59 +0200 [thread overview]
Message-ID: <20241004192958.GA28441@redhat.com> (raw)
In-Reply-To: <CAMw=ZnRt3Zvmf9Nt0sDHGPUn06HP3NE3at=x+infO=Ms4gYDGA@mail.gmail.com>
I wasn't CC'ed, so I didn't see the patch, but looking at Christian's
reply ...
On 10/04, Luca Boccassi wrote:
> On Fri, 4 Oct 2024 at 10:29, Christian Brauner <brauner@kernel.org> wrote:
> >
> > On Wed, Oct 02, 2024 at 03:24:33PM GMT, luca.boccassi@gmail.com wrote:
> > > + info.pid = pid_nr_ns(pid, task_active_pid_ns(task));
> >
> > I think this is wrong what this should return is the pid of the process
> > as seen from the caller's pid namespace.
Agreed,
> Thanks for the review, I applied the rest of the comments in v2 (I
> think at least), but for this one I can't tell, how should I do it?
I guess Christian meant you should simply use
info.pid = task_pid_vnr(task);
task_pid_vnr(task) returns the task's pid in the caller's namespace.
Oleg.
next prev parent reply other threads:[~2024-10-04 19:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 14:24 [PATCH] pidfd: add ioctl to retrieve pid info luca.boccassi
2024-10-02 14:48 ` Paul Moore
2024-10-04 18:48 ` Luca Boccassi
2024-10-05 16:05 ` Paul Moore
2024-10-22 23:45 ` luca.boccassi
2024-10-22 23:56 ` Luca Boccassi
2024-10-24 23:14 ` Paul Moore
2024-10-24 23:31 ` Luca Boccassi
2024-10-03 21:54 ` kernel test robot
2024-10-03 21:54 ` kernel test robot
2024-10-04 3:55 ` kernel test robot
2024-10-04 9:29 ` Christian Brauner
2024-10-04 14:05 ` Paul Moore
2024-10-04 18:50 ` Luca Boccassi
2024-10-04 19:29 ` Oleg Nesterov [this message]
2024-10-04 19:40 ` Luca Boccassi
2024-10-05 11:29 ` Oleg Nesterov
2024-10-06 14:59 ` Luca Boccassi
2024-10-06 19:18 ` David Laight
2024-10-07 14:54 ` Josh Triplett
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=20241004192958.GA28441@redhat.com \
--to=oleg@redhat.com \
--cc=brauner@kernel.org \
--cc=jlayton@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=paul@paul-moore.com \
/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.