530 Commits

Author SHA1 Message Date
Theodore Dubois
b2dc56fcd8 Waste a weekend fixing other people's broken code
This commit is sponsored by Linode. You can use code ish2020 get $20
off your new account. That could be 4 months free on the $5/month plan!
2020-03-08 16:50:03 -07:00
Saagar Jha
ab850b9768 This was unstaged and I think it fixes something 2020-03-08 16:48:15 -07:00
Saagar Jha
cd2cff1c04 Prevent NUM_SIGS from touching sig_set_ 2020-03-08 23:02:09 +00:00
Saagar Jha
0e642a0995 Prevent signed overflow by using qword_t 2020-03-08 23:02:09 +00:00
Saagar Jha
b33cbacb59 Fix pread/pwrite; make read/write be optional
pread and pwrite have been fixed to return the correct (unchanged) offset. In
addition, both functions have been added to fd_ops and sys_read and sys_write
will use these if they are available; making them (fd_ops's read/write)
effectively optional if there is an implementation of pread and pwrite
available. lseek is no longer optional.
2020-03-08 23:02:09 +00:00
Brian Almeida
910bbc398c Fix lockfile flag checks 2020-02-26 06:52:42 -05:00
Theodore Dubois
dcb19ff33a Don't remove a zombie from its pgroup or session before it's reaped 2020-02-17 13:11:06 -08:00
Theodore Dubois
823647b5a4 Implement read parts of tmpfs 2020-02-17 13:10:03 -08:00
Christopher Albert
4b0c89699c Correct return type for sys_personality 2020-02-17 20:59:41 +01:00
Christopher Albert
e223d8ef50 Correct error code for sys_personality 2020-02-17 20:55:01 +01:00
Christopher Albert
dfb9f66611 Add syscall 136 personality 2020-02-17 15:45:27 +01:00
Theodore Dubois
e17b822519 Make most fs_ops optional, and mark the required ones 2020-02-03 00:43:54 -08:00
Theodore Dubois
6b5a14850c Implement mknodat 2020-02-02 22:35:58 -08:00
Theodore Dubois
0a01c66563 Implement FIONREAD for real files and sockets
Fixes #607
2020-01-20 11:26:12 -08:00
Theodore Dubois
804e38705d Hide noisy EPOLLET log
Issue #608 had so many of those that it was impossible to see anything
else.
2020-01-19 21:51:07 -08:00
Saagar Jha
955d653b19 Replace read lock with write lock in mm_copy 2020-01-09 23:59:37 -08:00
Theodore Dubois
8d005b114c Stub readahead
Fix #605
2020-01-05 11:13:28 -08:00
Theodore Dubois
8ff84f2ae3 Handle different clock IDs in timerfd_create
Also handle TFD_TIMER_ABSTIME in timerfd_settime.

Fix #591
2020-01-03 20:13:17 -08:00
Theodore Dubois
b9e249b73f Unbreak heap shrink case of brk
Apparently this line of code has never been executed before, because if
it ever were to be executed, you'd get memory corruption.
2020-01-03 19:28:25 -08:00
Theodore Dubois
dd8d3fb9d1 Fix race condition in mem_segv_reason
There's a brief delay between the page fault and calling
mem_segv_reason, and in that window the access could become valid.
2020-01-01 19:36:28 -08:00
Theodore Dubois
7442f2327b Remove obsolete TODO for utime 2019-12-30 00:10:26 -08:00
Theodore Dubois
dbc77285b8 Remove follow_links argument of fd_ops.stat
Only realfs was using it, and it wasn't really necessary there since
path_normalize already followed the last symlink if needed.
2019-12-29 14:18:26 -08:00
Theodore Dubois
1dfb9eba78 Log the select() timeout 2019-12-28 16:57:46 -08:00
Theodore Dubois
be0312e7d8 Reduce overhead in user_read and user_write
Now memcpys an entire page at a time instead of just one byte at time,
skipping most of the calls to mem_ptr. This significantly speeds up
x11vnc because it sends a lot of big buffers over sockets.
2019-12-24 17:55:31 -08:00
Theodore Dubois
7d922884f6 Implement sched_get_priority_max
Close #436
2019-12-22 20:28:14 -08:00
Theodore Dubois
4056571cec Print return of clock_gettime in strace 2019-12-22 19:43:07 -08:00
Theodore Dubois
8579c95a5a Actually use the specified timeout in futex_wait
Fixes #573
2019-12-22 19:22:32 -08:00
Theodore Dubois
4b72c9cb05 Fix kill with process groups 2019-12-22 13:02:01 -08:00
Theodore Dubois
ec756ea38d Don't use the altstack if we're already on the altstack
Fix #583
2019-12-22 11:16:37 -08:00
Theodore Dubois
757f0a6b9d Stub io_setup 2019-12-15 19:12:58 -08:00
Theodore Dubois
3cc5ca1d45 Separate args and env in execve logging 2019-11-26 13:38:45 -08:00
Theodore Dubois
996a4b6cbf Add locking around mapping changes in mem_ptr
Fixed #104
2019-11-26 13:05:28 -08:00
Theodore Dubois
07997dc952 Include the version and build numbers in uname -v
Fixed #250
2019-11-25 20:31:13 -08:00
Theodore Dubois
780eeb5489 Allow any negative timeout for epoll and poll to mean infinite
Fixed #571
2019-11-25 17:49:55 -08:00
Theodore Dubois
3eaedbb935 Add some scheduler API stubs
#461
2019-11-25 15:51:12 -08:00
Theodore Dubois
d05e0455bf Increase limit on getrandom() length
Fixed #567
2019-11-24 15:37:21 -08:00
Theodore Dubois
d57b6d26fa Fix race between inode_release and generic_open
https://gist.github.com/tbodt/e92b86d8ddf0b79114703a24d7e99e68
2019-11-24 15:27:51 -08:00
Theodore Dubois
c88d945fc4 Add logging on sched_yield 2019-11-18 09:11:30 -08:00
Theodore Dubois
dd8e656e98 Refactor execve again to allow empty arguments
Fixed #559
2019-11-17 19:58:10 -08:00
Theodore Dubois
7ce44d0536 Implement kill(-1)
Fixed #413
2019-11-17 17:36:17 -08:00
Theodore Dubois
fa2dd142b8 Include starting value of stack in /proc/pid/stat
Helps with #306
2019-11-16 19:57:03 -08:00
Theodore Dubois
2b750f60ac Implement /proc/pid/maps 2019-11-11 01:28:26 -08:00
Theodore Dubois
64576c8bf9 Merge pull request #545 from tbodt/multiwindow 2019-11-03 21:47:09 -08:00
Theodore Dubois
3925a40201 Increase argv length limit
Fixed #375
2019-11-02 18:00:48 -07:00
Theodore Dubois
51102d7cab Reset signal mask when creating a new init child 2019-11-02 16:31:50 -07:00
Theodore Dubois
6791a15348 Support multiple windows
Co-authored-by: Noah Peeters <noah.peeters@icloud.com>
2019-10-27 19:29:03 -07:00
Theodore Dubois
6c906ac5b4 Make the iOS terminal look like a pty
Also make the terminal and session owned by TerminalViewController.

This is in preparation for scene support.

Co-authored-by: Noah Peeters <noah.peeters@icloud.com>
2019-10-27 19:29:03 -07:00
Theodore Dubois
22b624628c Fix possible buffer overflow in PRCTL_SET_NAME 2019-10-19 14:54:18 -07:00
Theodore Dubois
389bd5ebe9 Make statfs return the correct answer
Fixes #509
2019-10-13 21:26:33 -07:00
Theodore Dubois
a9e4aa41c6 Add logging for llseek and rmdir 2019-10-13 20:14:48 -07:00