Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 03:00:55PM +0200, Christian Brauner wrote: > On Fri, Oct 11, 2024 at 12:05:55PM +0100, Lorenzo Stoakes wrote: > > The means by which a pid is determined from a pidfd is duplicated, with > > some callers holding a reference to the (pid)fd, and others explicitly > > pinning th

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Christian Brauner
On Fri, Oct 11, 2024 at 12:05:55PM +0100, Lorenzo Stoakes wrote: > The means by which a pid is determined from a pidfd is duplicated, with > some callers holding a reference to the (pid)fd, and others explicitly > pinning the pid. > > Introduce __pidfd_get_pid() which abstracts both approaches and

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Lorenzo Stoakes
.git > next > patch link: > https://lore.kernel.org/all/8e7edaf2f648fb01a71def749f17f76c0502dee1.1728643714.git.lorenzo.stoa...@oracle.com/ > patch subject: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate > pid lookup > > in testcase: trinity > version: tr

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Suren Baghdasaryan
On Wed, Oct 16, 2024 at 1:22 AM Lorenzo Stoakes wrote: > > On Wed, Oct 16, 2024 at 01:16:15AM -0700, Suren Baghdasaryan wrote: > > On Tue, Oct 15, 2024 at 11:05 PM Lorenzo Stoakes > > wrote: > > > > > > On Tue, Oct 15, 2024 at 12:40:41PM -0700, Suren Baghdasaryan wrote: > > > [snip] > > > > > -st

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread kernel test robot
Hello, kernel test robot noticed "BUG:unable_to_handle_page_fault_for_address" on: commit: e65dbb5c9051a4da2305787fd558e1d60de2275a ("[PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup") url: https://github.com/intel-lab-lkp/linux/commits/Lorenzo-

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 01:16:15AM -0700, Suren Baghdasaryan wrote: > On Tue, Oct 15, 2024 at 11:05 PM Lorenzo Stoakes > wrote: > > > > On Tue, Oct 15, 2024 at 12:40:41PM -0700, Suren Baghdasaryan wrote: > > [snip] > > > > -struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags) > > > > +s

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-16 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 11:05 PM Lorenzo Stoakes wrote: > > On Tue, Oct 15, 2024 at 12:40:41PM -0700, Suren Baghdasaryan wrote: > [snip] > > > -struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags) > > > +struct pid *__pidfd_get_pid(unsigned int pidfd, bool pin_pid, > > > +

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-15 Thread Lorenzo Stoakes
On Tue, Oct 15, 2024 at 12:40:41PM -0700, Suren Baghdasaryan wrote: [snip] > > -struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags) > > +struct pid *__pidfd_get_pid(unsigned int pidfd, bool pin_pid, > > + bool allow_proc, unsigned int *flags, > > +

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-15 Thread Suren Baghdasaryan
On Fri, Oct 11, 2024 at 4:06 AM Lorenzo Stoakes wrote: > > The means by which a pid is determined from a pidfd is duplicated, with > some callers holding a reference to the (pid)fd, and others explicitly > pinning the pid. > > Introduce __pidfd_get_pid() which abstracts both approaches and provide

[PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-11 Thread Lorenzo Stoakes
The means by which a pid is determined from a pidfd is duplicated, with some callers holding a reference to the (pid)fd, and others explicitly pinning the pid. Introduce __pidfd_get_pid() which abstracts both approaches and provide optional output parameters for file->f_flags and the fd (the latte