linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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.


  reply	other threads:[~2024-10-04 19:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241002142516.110567-1-luca.boccassi@gmail.com>
2024-10-04  9:29 ` [PATCH] pidfd: add ioctl to retrieve pid info 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
     [not found] ` <CAHC9VhRV3KcNGRw6_c-97G6w=HKNuEQoUGrfKhsQdWywzDDnBQ@mail.gmail.com>
     [not found]   ` <CAMw=ZnSkm1U-gBEy9MBbjo2gP2+WHV2LyCsKmwYu2cUJqSUeXg@mail.gmail.com>
     [not found]     ` <CAHC9VhRY81Wp-=jC6-G=6y4e=TSe-dznO=j87i-i+t6GVq4m3w@mail.gmail.com>
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

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 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).