freebsd-dev/sys/compat/linux
Conrad Meyer f8f74aaa84 linux(4) clone(2): Correctly handle CLONE_FS and CLONE_FILES
The two flags are distinct and it is impossible to correctly handle clone(2)
without the assistance of fork1().  This change depends on the pwddesc split
introduced in r367777.

I've added a fork_req flag, FR2_SHARE_PATHS, which indicates that p_pd
should be treated the opposite way p_fd is (based on RFFDG flag).  This is a
little ugly, but the benefit is that existing RFFDG API is preserved.
Holding FR2_SHARE_PATHS disabled, RFFDG indicates both p_fd and p_pd are
copied, while !RFFDG indicates both should be cloned.

In Chrome, clone(2) is used with CLONE_FS, without CLONE_FILES, and expects
independent fd tables.

The previous conflation of CLONE_FS and CLONE_FILES was introduced in
r163371 (2006).

Discussed with:	markj, trasz (earlier version)
Differential Revision:	https://reviews.freebsd.org/D27016
2020-11-17 21:20:11 +00:00
..
check_error.d
check_internal_locks.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux_common.c linux(4): Fix loadable modules after r367395 2020-11-06 22:04:57 +00:00
linux_common.h Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions 2019-05-13 17:48:16 +00:00
linux_dtrace.h
linux_dummy.c linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_emul.c Set default stack size for Linux apps to 8MB. This matches Linux' 2020-10-16 11:23:30 +00:00
linux_emul.h Make linux_errtbl[] static. 2020-11-03 19:12:33 +00:00
linux_errno.c Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_errno.h Unbreak buildworld after r367339. 2020-11-04 21:39:04 +00:00
linux_errno.inc Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_event.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_event.h Linux epoll: Register events with zero event mask 2019-11-24 20:47:40 +00:00
linux_file.c linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_file.h linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_fork.c linux(4) clone(2): Correctly handle CLONE_FS and CLONE_FILES 2020-11-17 21:20:11 +00:00
linux_futex.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_futex.h linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
linux_getcwd.c cache: drop the always curthread argument from reverse lookup routines 2020-08-24 08:57:02 +00:00
linux_ioctl.c linux(4): Quiesce unrecognized ioctl warning for F2FS query 2020-11-02 18:45:43 +00:00
linux_ioctl.h linux(4): Quiesce unrecognized ioctl warning for F2FS query 2020-11-02 18:45:43 +00:00
linux_ipc64.h Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux_ipc.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_ipc.h Update syscall.master to 5.0. 2019-03-24 14:50:02 +00:00
linux_mib.c - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_mib.h Add compat.linux.dummy_rlimits, and disable by default. 2020-10-18 15:58:16 +00:00
linux_misc.c linux(4): Fix loadable modules after r367395 2020-11-06 22:04:57 +00:00
linux_misc.h linux(4) prctl(2): Implement PR_[GS]ET_DUMPABLE 2020-11-03 02:10:54 +00:00
linux_mmap.c linux(4): Quiesce warning about madvise(..., -1) 2020-10-30 19:02:59 +00:00
linux_mmap.h Add linux_madvise(2) instead of having Linux apps call the native 2020-06-20 18:29:22 +00:00
linux_persona.h Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux_signal.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_signal.h Rationalize license text on Linuxolator files 2018-03-23 14:39:34 +00:00
linux_socket.c unix(4): Enhance LOCAL_CREDS_PERSISTENT ABI 2020-11-17 20:01:21 +00:00
linux_socket.h - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_stats.c Fix potential race condition in linux stat(2). 2020-10-20 17:19:10 +00:00
linux_sysctl.c Quiet unused fn warning for linuxulator w/o legacy syscalls 2018-06-25 19:24:50 +00:00
linux_sysproto.h
linux_time.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_timer.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_timer.h Centralize compatability translation macros. 2020-04-14 20:30:48 +00:00
linux_uid16.c linux: add sysctl compat.linux.use_emul_path 2020-08-18 22:04:22 +00:00
linux_util.c - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_util.h - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_vdso.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_vdso.h
linux_videodev2_compat.h
linux_videodev_compat.h
linux.c linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
linux.h linux(4): Improve netlink diagnostics 2020-11-03 19:50:42 +00:00
stats_timing.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
trace_futexes.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00