Commit Graph

3521 Commits

Author SHA1 Message Date
Ariel Abreu
23aacf047a
Add CREATE_LINK polyfill for older CMakes 2021-01-13 23:26:27 -05:00
Ariel Abreu
2beda36721
Pass along SIGTTOU actions to Linux as well
This fixes `zsh` because Linux allows `tcsetpgrp` to succeed when ignoring `SIGTTOU`.
2021-01-12 16:19:44 -05:00
Ariel Abreu
7af86abf75
Update file_cmds 2021-01-11 10:33:20 -05:00
Ariel Abreu
c48605014d
Update CommonCrypto, CoreTLS, and corecrypto 2021-01-10 15:37:17 -05:00
Ariel Abreu
77523ef0e1
Update Foundation 2021-01-07 09:07:25 -05:00
Ariel Abreu
f34b642426
Update XPC header symlink paths 2021-01-07 00:25:02 -05:00
Ariel Abreu
b9c637fba1
Update various submodules 2021-01-07 00:24:47 -05:00
Ariel Abreu
4606b14bf2
Fix _set_user_dir_suffix return value 2021-01-07 00:23:53 -05:00
Ariel Abreu
91bed0c9d4
Implement F_{GET,SET,SETW}LK in fcntl 2021-01-07 00:23:35 -05:00
Ariel Abreu
489c310885
Add sys_csops_audittoken
Also fix sys_csops's return code for unsupported operations
2021-01-04 11:52:16 -05:00
Ariel Abreu
cba96acc90
Use sys_kevent64 instead of kevent64 in kevent_qos
I'm not sure how/why the previous code was working (I guess we weren't running into error codes very often), but I found that it wouldn't work properly when errors (such as EINTR) occurred. The issue was that `kevent64` is the libc wrapped version of the call that returns its error codes in `errno`, so we were only getting `-1` for all errors, and then our own libc wrapper was translating that into EPERM in our errno return. What we actually want is the raw error value, so we have to use `sys_kevent64` directly.
2021-01-03 19:01:19 -05:00
Ariel Abreu
7240f852a8
Forgot to disable xtrace lock debugging 2021-01-03 18:57:36 -05:00
Ariel Abreu
806c9f86ee
Update lkm 2020-12-23 22:07:11 -05:00
Ariel Abreu
cdf48cddf3
Update libdispatch 2020-12-15 19:16:28 -05:00
Ariel Abreu
bd16c8cd3b
Update bsm and bash 2020-12-15 17:40:12 -05:00
Ariel Abreu
82c202e6a4
Stub {get,set}audit_addr 2020-12-15 17:39:06 -05:00
Ariel Abreu
971a2d472a
Update cocotron 2020-12-14 13:03:16 -05:00
Thomas A
15b5738737 Fix Building For 64bit Only
There might be more CMakeLists that need to be fixed, but for now, Darling seems to build fine with the following changes made.
2020-12-13 14:15:08 -08:00
Ariel Abreu
8fdd5403bd
Fix locking primitives in xtrace 2020-12-12 11:37:05 -05:00
Ariel Abreu
d394cd3127
Get xtrace working again (for multithreaded programs)
We basically have to reimplement locking, memory allocation, and TLS for xtrace directly on top of Linux syscalls because it can't use almost anything external (it can pretty much only use libsystem_kernel).

The one exception is that we use `pthread_key`s from libpthread to make TLS easier to implement. The only side effect that has is that it's one less available key for the application we're tracing to use, but we shouldn't ever see that cause problems (and if we do see it cause problems later on, then we can revise that).
2020-12-11 20:48:19 -05:00
Ariel Abreu
1bc3ffd6b3
Update LKM 2020-12-06 09:19:23 -05:00
Ariel Abreu
55ca8317ec
Update perl 2020-12-04 12:09:49 -05:00
Sergey Bugaev
93f9e4ef5f Avoid duplicating XtraceMig.c files
Fixes a build issue with Ninja.

See https://github.com/darlinghq/darling/pull/898
2020-12-03 10:29:53 +03:00
Ariel Abreu
c9dcc0138a
Update LKM and system_cmds 2020-12-02 17:08:35 -05:00
Ariel Abreu
26795b99c7
Update LKM with some fixes for 5.9.0+ 2020-12-02 16:40:30 -05:00
Ariel Abreu
a69361a9bc
Update LKM 2020-12-02 13:44:25 -05:00
Ariel Abreu
11f024aaf2
Fixes for Clang 11+ 2020-12-01 23:49:29 -05:00
Ariel Abreu
9c8396e268
Update LKM 2020-11-30 23:00:02 -05:00
Ariel Abreu
05d806c2b3
Implement ATTR_CMN_OBJTAG and ATTR_DIR_ENTRYCOUNT for getattrlist 2020-11-30 22:59:17 -05:00
Ariel Abreu
fd1c7149a7
Remove Clang workarounds from dkms.conf
...since the LKM builds with GCC again (since a few commits ago)
2020-11-30 17:21:22 -05:00
Ariel Abreu
617d552eb8
Stop leaking fds in pthread_chdir
This was causing EMFILE in applications that frequently use pthread_chdir.
2020-11-27 09:10:58 -05:00
Ariel Abreu
d8702a85de
Add some build flags from Libsyscall.xcconfig
This fixes the symbol linking issue for `_os_alloc_once_table`, allowing us to remove our workaround (this hopefully fixes an issue with Bash freezing up when forking).
2020-11-26 13:33:55 -05:00
Ariel Abreu
489bb0ee38
Fix jumpy usec values for kern.boottime
This was causing issues with Homebrew due to Ruby using `_mach_boottime_usec` (indirectly), which repeatedly does `kern.boottime` sysctls until two results match.
2020-11-25 22:48:31 -05:00
Ariel Abreu
cde91bc46a
Revert part of an LKM update
See darlinghq/darling-newlkm@de0b2756a7
2020-11-20 11:09:26 -05:00
Ariel Abreu
d83d98945a
Update LKM 2020-11-18 11:45:34 -05:00
Ariel Abreu
29ec91879b
Update a few submodules 2020-11-17 23:25:41 -05:00
Ariel Abreu
8a8ba48586
Unexpand vchroot paths returned by get{sock,peer}name 2020-11-17 23:25:20 -05:00
Ariel Abreu
42abab04aa
Use given kqueue in kevent_qos
I'm not quite sure why we used to always create our own kqueue, but that could cause all sorts of issues. For example, if the user decided to add events via a different kevent call and then use kevent_qos to poll, they wouldn't get any events because we're actually listening to a different kqueue. Another example: since the kqueue was always shared between kevent_qos calls, different kqueue fds called on kevent_qos would all operate on the same kqueue.

Of course, in the `kq=-1` case, we still perform the correct behavior of using our default kqueue. But if the user gave us a kqueue, let's use it.
2020-11-17 23:24:04 -05:00
Ariel Abreu
5f4253cd18
Apply Unix socket name fix to connect
See commit 2882e9b1e5
2020-11-16 17:55:18 -05:00
Ariel Abreu
04cde1ce11
Fix O_NONBLOCK for accepted sockets
macOS and BSD make sockets created from `accept` inherit the listening socket's O_NONBLOCK flag (and maybe some others, but that requires further testing).
2020-11-16 13:44:57 -05:00
Ariel Abreu
796582b3e3
Update LKM
This also includes necessary updates to certain functions in the syscall emulation layer that need to be changed due to changes in the LKM.
2020-11-16 13:39:01 -05:00
Ariel Abreu
65f3538d3c
Merge remote-tracking branch 'origin/master' into update-sources 2020-11-10 12:19:22 -05:00
Ariel Abreu
2882e9b1e5
FIx crash with Unix socket in bind
The comment pretty much explains it: we need to make sure we have enough space for the vchroot path fixup. This was causing segfaults when trying to use Unix sockets sometimes (consistently reproducible with the Mio test suite's Unix socket tests).
2020-11-10 10:14:40 -05:00
Ariel Abreu
1f53dcba60
Update ruby
Homebrew now installs again on the update-sources branch!
2020-11-10 00:03:32 -05:00
Ariel Abreu
60be04eddf
Update the LKM 2020-11-09 18:13:57 -05:00
Ariel Abreu
f95484fbf5
Update libxpc 2020-11-07 00:15:42 -05:00
Ariel Abreu
6a41d531eb
Update libxpc and security 2020-11-06 14:48:07 -05:00
Ariel Abreu
4674479e88
Update LKM 2020-11-05 10:43:31 -05:00
Ariel Abreu
767b4082c6
Use our LKM's generated syscall.h in SDK 2020-11-05 10:43:04 -05:00
Ariel Abreu
2eb37cde92
Update security 2020-11-03 11:54:59 -05:00