bisecting fixing commit since fd1f297b794c77e52412dc621b5884210291eeee building syzkaller on 3361bde5773da39c293045c578c844ddc89291e6 testing commit fd1f297b794c77e52412dc621b5884210291eeee with gcc (GCC) 8.1.0 kernel signature: 1899c8199d56efb9f53240261594c6a008a0758e all runs: crashed: WARNING in arch_install_hw_breakpoint testing current HEAD 9455d25f4e3b3d009fa1b810862e5b06229530e4 testing commit 9455d25f4e3b3d009fa1b810862e5b06229530e4 with gcc (GCC) 8.1.0 kernel signature: 4d738c32c69902b280a7c41732a4a42e7fea5e88 all runs: OK # git bisect start 9455d25f4e3b3d009fa1b810862e5b06229530e4 fd1f297b794c77e52412dc621b5884210291eeee Bisecting: 30995 revisions left to test after this (roughly 15 steps) [9749b90e566ca1a235fc8e2118f99c5690969342] perf tools: Rename struct thread_map to struct perf_thread_map testing commit 9749b90e566ca1a235fc8e2118f99c5690969342 with gcc (GCC) 8.1.0 kernel signature: 06b78e916b946f03085373fba882ad8477f098e6 all runs: OK # git bisect bad 9749b90e566ca1a235fc8e2118f99c5690969342 Bisecting: 15497 revisions left to test after this (roughly 14 steps) [a1ccca0e84243c8aa39f4700cecc200b36c6b50f] media: dt-bindings: media: add Amlogic Video Decoder Bindings testing commit a1ccca0e84243c8aa39f4700cecc200b36c6b50f with gcc (GCC) 8.1.0 kernel signature: e5814fd4728a28ef4a6bc5ed50d5d273664f091d all runs: OK # git bisect bad a1ccca0e84243c8aa39f4700cecc200b36c6b50f Bisecting: 7729 revisions left to test after this (roughly 13 steps) [b3a5e648f5917ea508ecab9a629028b186d38eae] Merge tag 'tty-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty testing commit b3a5e648f5917ea508ecab9a629028b186d38eae with gcc (GCC) 8.1.0 kernel signature: d2d4382f030af0ba0a205fd04936caf51f4227b2 all runs: OK # git bisect bad b3a5e648f5917ea508ecab9a629028b186d38eae Bisecting: 3883 revisions left to test after this (roughly 12 steps) [4974f9b7e0c90a751e9ec306701c49487e81625a] net: dsa: support of_get_mac_address new ERR_PTR error testing commit 4974f9b7e0c90a751e9ec306701c49487e81625a with gcc (GCC) 8.1.0 kernel signature: c1236768040972c5da09e5f45c3e042afdb029c2 all runs: crashed: WARNING in arch_install_hw_breakpoint # git bisect good 4974f9b7e0c90a751e9ec306701c49487e81625a Bisecting: 1885 revisions left to test after this (roughly 11 steps) [9f2e3a53f7ec9ef55e9d01bc29a6285d291c151e] Merge tag 'for-5.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux testing commit 9f2e3a53f7ec9ef55e9d01bc29a6285d291c151e with gcc (GCC) 8.1.0 kernel signature: 97700f8c036691b482aa1ed2997da9e893d5370d all runs: crashed: WARNING in arch_install_hw_breakpoint # git bisect good 9f2e3a53f7ec9ef55e9d01bc29a6285d291c151e Bisecting: 967 revisions left to test after this (roughly 10 steps) [2310673c3c12e4b7f8a31c41f67f701d24b0de86] Merge tag 'char-misc-5.2-rc1-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc testing commit 2310673c3c12e4b7f8a31c41f67f701d24b0de86 with gcc (GCC) 8.1.0 kernel signature: 9f43bd5ee857a23ff5dc85af2c171579dab39f21 all runs: OK # git bisect bad 2310673c3c12e4b7f8a31c41f67f701d24b0de86 Bisecting: 441 revisions left to test after this (roughly 9 steps) [932f98922f6fca9f8c45274346b49058dd50d51a] Merge tag 'iio-for-5.2a-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next testing commit 932f98922f6fca9f8c45274346b49058dd50d51a with gcc (GCC) 8.1.0 kernel signature: dcccf52ca1239af60d2ad2592a06b46fb9210d23 all runs: crashed: WARNING in arch_install_hw_breakpoint # git bisect good 932f98922f6fca9f8c45274346b49058dd50d51a Bisecting: 212 revisions left to test after this (roughly 8 steps) [cf482a49af564a3044de3178ea28f10ad5921b38] Merge tag 'driver-core-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core testing commit cf482a49af564a3044de3178ea28f10ad5921b38 with gcc (GCC) 8.1.0 kernel signature: 6ccf836b2fcf75f8e7fc13538bf20799216a3953 all runs: OK # git bisect bad cf482a49af564a3044de3178ea28f10ad5921b38 Bisecting: 135 revisions left to test after this (roughly 7 steps) [b4b52b881cf08e13d110eac811d4becc0775abbf] Merge tag 'Wimplicit-fallthrough-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux testing commit b4b52b881cf08e13d110eac811d4becc0775abbf with gcc (GCC) 8.1.0 kernel signature: ddfa20e88515de4caf24d67341d8e7fd99f534f1 all runs: OK # git bisect bad b4b52b881cf08e13d110eac811d4becc0775abbf Bisecting: 40 revisions left to test after this (roughly 6 steps) [aa26690fab1380735442e027ce4b17849a24493f] Merge tag 'xfs-5.2-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux testing commit aa26690fab1380735442e027ce4b17849a24493f with gcc (GCC) 8.1.0 kernel signature: 0eb5f92445e84216e82181396cfd318fec7f9f70 run #0: crashed: WARNING in arch_install_hw_breakpoint run #1: crashed: WARNING in arch_install_hw_breakpoint run #2: crashed: WARNING in arch_install_hw_breakpoint run #3: crashed: WARNING in arch_install_hw_breakpoint run #4: crashed: WARNING in arch_install_hw_breakpoint run #5: crashed: WARNING in arch_install_hw_breakpoint run #6: crashed: WARNING in arch_install_hw_breakpoint run #7: crashed: WARNING in arch_install_hw_breakpoint run #8: crashed: WARNING in arch_install_hw_breakpoint run #9: OK # git bisect good aa26690fab1380735442e027ce4b17849a24493f Bisecting: 20 revisions left to test after this (roughly 4 steps) [224b44d46ffe9ad7785cc45c7a18934d492e66ec] lib: zstd: Mark expected switch fall-throughs testing commit 224b44d46ffe9ad7785cc45c7a18934d492e66ec with gcc (GCC) 8.1.0 kernel signature: c8217a707c978a68f34e2460779677cb7d175df5 all runs: crashed: WARNING in arch_install_hw_breakpoint # git bisect good 224b44d46ffe9ad7785cc45c7a18934d492e66ec Bisecting: 11 revisions left to test after this (roughly 3 steps) [eac7078a0fff1e72cf2b641721e3f55ec7e5e21e] Merge tag 'pidfd-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux testing commit eac7078a0fff1e72cf2b641721e3f55ec7e5e21e with gcc (GCC) 8.1.0 kernel signature: e3324dcb7e64e01b27fd67a66469f14332983665 all runs: OK # git bisect bad eac7078a0fff1e72cf2b641721e3f55ec7e5e21e Bisecting: 4 revisions left to test after this (roughly 2 steps) [43c6afee48d4d866d5eb984d3a5dbbc7d9b4e7bf] samples: show race-free pidfd metadata access testing commit 43c6afee48d4d866d5eb984d3a5dbbc7d9b4e7bf with gcc (GCC) 8.1.0 kernel signature: e4ed7a974d00c6489a72292b86c37867d98b1855 all runs: OK # git bisect bad 43c6afee48d4d866d5eb984d3a5dbbc7d9b4e7bf Bisecting: 1 revision left to test after this (roughly 1 step) [b3e5838252665ee4cfa76b82bdf1198dca81e5be] clone: add CLONE_PIDFD testing commit b3e5838252665ee4cfa76b82bdf1198dca81e5be with gcc (GCC) 8.1.0 kernel signature: 034d530a920c7bf7c55127a37ce2e05e2c5e3963 all runs: OK # git bisect bad b3e5838252665ee4cfa76b82bdf1198dca81e5be Bisecting: 0 revisions left to test after this (roughly 0 steps) [5dd50aaeb1853ee0953b60fa6d1143d95429ae7b] Make anon_inodes unconditional testing commit 5dd50aaeb1853ee0953b60fa6d1143d95429ae7b with gcc (GCC) 8.1.0 kernel signature: 1ec3d1c3e99f096a6a134c49faecb07c6d0dcbd3 all runs: crashed: WARNING in arch_install_hw_breakpoint # git bisect good 5dd50aaeb1853ee0953b60fa6d1143d95429ae7b b3e5838252665ee4cfa76b82bdf1198dca81e5be is the first bad commit commit b3e5838252665ee4cfa76b82bdf1198dca81e5be Author: Christian Brauner Date: Wed Mar 27 13:04:15 2019 +0100 clone: add CLONE_PIDFD This patchset makes it possible to retrieve pid file descriptors at process creation time by introducing the new flag CLONE_PIDFD to the clone() system call. Linus originally suggested to implement this as a new flag to clone() instead of making it a separate system call. As spotted by Linus, there is exactly one bit for clone() left. CLONE_PIDFD creates file descriptors based on the anonymous inode implementation in the kernel that will also be used to implement the new mount api. They serve as a simple opaque handle on pids. Logically, this makes it possible to interpret a pidfd differently, narrowing or widening the scope of various operations (e.g. signal sending). Thus, a pidfd cannot just refer to a tgid, but also a tid, or in theory - given appropriate flag arguments in relevant syscalls - a process group or session. A pidfd does not represent a privilege. This does not imply it cannot ever be that way but for now this is not the case. A pidfd comes with additional information in fdinfo if the kernel supports procfs. The fdinfo file contains the pid of the process in the callers pid namespace in the same format as the procfs status file, i.e. "Pid:\t%d". As suggested by Oleg, with CLONE_PIDFD the pidfd is returned in the parent_tidptr argument of clone. This has the advantage that we can give back the associated pid and the pidfd at the same time. To remove worries about missing metadata access this patchset comes with a sample program that illustrates how a combination of CLONE_PIDFD, and pidfd_send_signal() can be used to gain race-free access to process metadata through /proc/. The sample program can easily be translated into a helper that would be suitable for inclusion in libc so that users don't have to worry about writing it themselves. Suggested-by: Linus Torvalds Signed-off-by: Christian Brauner Co-developed-by: Jann Horn Signed-off-by: Jann Horn Reviewed-by: Oleg Nesterov Cc: Arnd Bergmann Cc: "Eric W. Biederman" Cc: Kees Cook Cc: Thomas Gleixner Cc: David Howells Cc: "Michael Kerrisk (man-pages)" Cc: Andy Lutomirsky Cc: Andrew Morton Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro include/linux/pid.h | 2 + include/uapi/linux/sched.h | 1 + kernel/fork.c | 107 +++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 106 insertions(+), 4 deletions(-) kernel signature: 034d530a920c7bf7c55127a37ce2e05e2c5e3963 previous signature: 1ec3d1c3e99f096a6a134c49faecb07c6d0dcbd3 revisions tested: 17, total time: 4h16m27.198552337s (build: 1h38m59.253664261s, test: 2h35m17.188227624s) first good commit: b3e5838252665ee4cfa76b82bdf1198dca81e5be clone: add CLONE_PIDFD cc: ["akpm@linux-foundation.org" "arnd@arndb.de" "christian@brauner.io" "cyphar@cyphar.com" "dhowells@redhat.com" "ebiederm@xmission.com" "jannh@google.com" "keescook@chromium.org" "luto@kernel.org" "mtk.manpages@gmail.com" "oleg@redhat.com" "tglx@linutronix.de" "torvalds@linux-foundation.org" "viro@zeniv.linux.org.uk"]