linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2019-07-01 10:35 Stephen Rothwell
  2019-07-09  0:19 ` Stephen Rothwell
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2019-07-01 10:35 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Dmitry V. Levin, Al Viro

[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  kernel/fork.c

between commits:

  9014143bab2f ("fork: don't check parent_tidptr with CLONE_PIDFD")
  6fd2fe494b17 ("copy_process(): don't use ksys_close() on cleanups")

from Linus' tree and commit:

  7f192e3cd316 ("fork: add clone3")

from the pidfd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/fork.c
index 947bc0161f9c,4114a044822c..000000000000
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -1755,7 -1794,7 +1776,8 @@@ static __latent_entropy struct task_str
  	int pidfd = -1, retval;
  	struct task_struct *p;
  	struct multiprocess_signals delayed;
 +	struct file *pidfile = NULL;
+ 	u64 clone_flags = args->flags;
  
  	/*
  	 * Don't allow sharing the root directory with processes in a different
@@@ -2030,16 -2070,7 +2050,16 @@@
  			goto bad_fork_free_pid;
  
  		pidfd = retval;
 +
 +		pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
 +					      O_RDWR | O_CLOEXEC);
 +		if (IS_ERR(pidfile)) {
 +			put_unused_fd(pidfd);
 +			goto bad_fork_free_pid;
 +		}
 +		get_pid(pid);	/* held by pidfile now */
 +
- 		retval = put_user(pidfd, parent_tidptr);
+ 		retval = put_user(pidfd, args->pidfd);
  		if (retval)
  			goto bad_fork_put_pidfd;
  	}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2023-07-02 23:42 Stephen Rothwell
  2023-07-03  7:50 ` Christian Brauner
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2023-07-02 23:42 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Kees Cook, Linus Torvalds, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got conflicts in:

  kernel/pid.c
  kernel/pid_namespace.c

between commits:

  b69f0aeb0689 ("pid: Replace struct pid 1-element array with flex-array")
  dd546618ba70 ("pid: use struct_size_t() helper")

from Linus' tree and commit:

  757777eef55b ("pid: Replace struct pid 1-element array with flex-array")

from the pidfd tree.

I fixed it up (I used the former version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2019-11-15  5:32 Stephen Rothwell
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2019-11-15  5:32 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Adrian Reber

[-- Attachment #1: Type: text/plain, Size: 4488 bytes --]

Hi all,

Thanks, Christian, for the heads up about this.

Today's linux-next merge of the pidfd tree got a conflict in:

  include/uapi/linux/sched.h

between commit:

  fa729c4df558 ("clone3: validate stack arguments")

from Linus' tree and commit:

  fef0d8e4c7a1 ("fork: extend clone3() to support setting a PID")

from the pidfd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/uapi/linux/sched.h
index 25b4fa00bad1,2e649cfa07f4..000000000000
--- a/include/uapi/linux/sched.h
+++ b/include/uapi/linux/sched.h
@@@ -36,28 -39,38 +39,42 @@@
  #ifndef __ASSEMBLY__
  /**
   * struct clone_args - arguments for the clone3 syscall
-  * @flags:       Flags for the new process as listed above.
-  *               All flags are valid except for CSIGNAL and
-  *               CLONE_DETACHED.
-  * @pidfd:       If CLONE_PIDFD is set, a pidfd will be
-  *               returned in this argument.
-  * @child_tid:   If CLONE_CHILD_SETTID is set, the TID of the
-  *               child process will be returned in the child's
-  *               memory.
-  * @parent_tid:  If CLONE_PARENT_SETTID is set, the TID of
-  *               the child process will be returned in the
-  *               parent's memory.
-  * @exit_signal: The exit_signal the parent process will be
-  *               sent when the child exits.
-  * @stack:       Specify the location of the stack for the
-  *               child process.
-  *               Note, @stack is expected to point to the
-  *               lowest address. The stack direction will be
-  *               determined by the kernel and set up
-  *               appropriately based on @stack_size.
-  * @stack_size:  The size of the stack for the child process.
-  * @tls:         If CLONE_SETTLS is set, the tls descriptor
-  *               is set to tls.
+  * @flags:        Flags for the new process as listed above.
+  *                All flags are valid except for CSIGNAL and
+  *                CLONE_DETACHED.
+  * @pidfd:        If CLONE_PIDFD is set, a pidfd will be
+  *                returned in this argument.
+  * @child_tid:    If CLONE_CHILD_SETTID is set, the TID of the
+  *                child process will be returned in the child's
+  *                memory.
+  * @parent_tid:   If CLONE_PARENT_SETTID is set, the TID of
+  *                the child process will be returned in the
+  *                parent's memory.
+  * @exit_signal:  The exit_signal the parent process will be
+  *                sent when the child exits.
+  * @stack:        Specify the location of the stack for the
+  *                child process.
++ *                Note, @stack is expected to point to the
++ *                lowest address. The stack direction will be
++ *                determined by the kernel and set up
++ *                appropriately based on @stack_size.
+  * @stack_size:   The size of the stack for the child process.
+  * @tls:          If CLONE_SETTLS is set, the tls descriptor
+  *                is set to tls.
+  * @set_tid:      Pointer to an array of type *pid_t. The size
+  *                of the array is defined using @set_tid_size.
+  *                This array is used select PIDs/TIDs for newly
+  *                created processes. The first element in this
+  *                defines the PID in the most nested PID
+  *                namespace. Each additional element in the array
+  *                defines the PID in the parent PID namespace of
+  *                the original PID namespace. If the array has
+  *                less entries than the number of currently
+  *                nested PID namespaces only the PIDs in the
+  *                corresponding namespaces are set.
+  * @set_tid_size: This defines the size of the array referenced
+  *                in @set_tid. This cannot be larger than the
+  *                kernel's limit of nested PID namespaces.
   *
   * The structure is versioned by size and thus extensible.
   * New struct members must go at the end of the struct and

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2019-07-04  8:44 Stephen Rothwell
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2019-07-04  8:44 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Al Viro

[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  kernel/fork.c

between commits:

  6fd2fe494b17 ("copy_process(): don't use ksys_close() on cleanups")
  28dd29c06d0d ("fork: return proper negative error code")

from Linus' tree and commit:

  7f192e3cd316 ("fork: add clone3")

from the pidfd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/fork.c
index 847dd147b068,4114a044822c..000000000000
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -1755,7 -1794,7 +1776,8 @@@ static __latent_entropy struct task_str
  	int pidfd = -1, retval;
  	struct task_struct *p;
  	struct multiprocess_signals delayed;
 +	struct file *pidfile = NULL;
+ 	u64 clone_flags = args->flags;
  
  	/*
  	 * Don't allow sharing the root directory with processes in a different
@@@ -2030,17 -2070,7 +2050,17 @@@
  			goto bad_fork_free_pid;
  
  		pidfd = retval;
 +
 +		pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
 +					      O_RDWR | O_CLOEXEC);
 +		if (IS_ERR(pidfile)) {
 +			put_unused_fd(pidfd);
 +			retval = PTR_ERR(pidfile);
 +			goto bad_fork_free_pid;
 +		}
 +		get_pid(pid);	/* held by pidfile now */
 +
- 		retval = put_user(pidfd, parent_tidptr);
+ 		retval = put_user(pidfd, args->pidfd);
  		if (retval)
  			goto bad_fork_put_pidfd;
  	}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2019-06-06  5:40 Stephen Rothwell
  2019-07-08 23:17 ` Stephen Rothwell
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2019-06-06  5:40 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Joel Fernandes (Google)

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  tools/testing/selftests/pidfd/pidfd_test.c

between commit:

  1fcd0eb356ad ("tests: fix pidfd-test compilation")

from Linus' tree and commit:

  233ad92edbea ("pidfd: add polling selftests")

from the pidfd tree.

I fixed it up (I just used the latter) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.



-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the pidfd tree with Linus' tree
@ 2019-05-22  1:01 Stephen Rothwell
  2019-05-22  5:52 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2019-05-22  1:01 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Thomas Gleixner, Greg Kroah-Hartman, Joel Fernandes (Google)

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

Hi all,

Today's linux-next merge of the pidfd tree got a conflict in:

  tools/testing/selftests/pidfd/Makefile

between commit:

  ec8f24b7faaf ("treewide: Add SPDX license identifier - Makefile/Kconfig")

from Linus' tree and commit:

  233ad92edbea ("pidfd: add polling selftests")

from the pidfd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/pidfd/Makefile
index 443fedbd6231,8d97cb35fca4..000000000000
--- a/tools/testing/selftests/pidfd/Makefile
+++ b/tools/testing/selftests/pidfd/Makefile
@@@ -1,7 -1,6 +1,7 @@@
 +# SPDX-License-Identifier: GPL-2.0-only
- CFLAGS += -g -I../../../../usr/include/
+ CFLAGS += -g -I../../../../usr/include/ -lpthread
  
- TEST_GEN_PROGS := pidfd_test
+ TEST_GEN_PROGS := pidfd_test pidfd_open_test
  
  include ../lib.mk
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-03  7:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 10:35 linux-next: manual merge of the pidfd tree with Linus' tree Stephen Rothwell
2019-07-09  0:19 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2023-07-02 23:42 Stephen Rothwell
2023-07-03  7:50 ` Christian Brauner
2019-11-15  5:32 Stephen Rothwell
2019-07-04  8:44 Stephen Rothwell
2019-06-06  5:40 Stephen Rothwell
2019-07-08 23:17 ` Stephen Rothwell
2019-05-22  1:01 Stephen Rothwell
2019-05-22  5:52 ` Greg Kroah-Hartman
2019-05-22  7:48   ` Stephen Rothwell
2019-05-22  7:55     ` Christian Brauner
2019-05-22  8:05       ` Stephen Rothwell

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