49 Commits

Author SHA1 Message Date
Theodore Dubois
e96882c07a Get rid of idiotic fork_task function that broke threads 2019-05-05 22:09:37 -07:00
Theodore Dubois
894c3d2af5 Make the whole boot system thing happen 2019-05-04 23:32:24 -07:00
Theodore Dubois
5aeb536d61 Copy all the fields of struct mm 2019-01-10 19:12:12 -05:00
Theodore Dubois
5cfec48854 Separate out some components of struct mem into struct mm 2019-01-04 15:17:37 -08:00
Theodore Dubois
bbf1eb46f5 Clear task->vfork before sys_clone returns 2019-01-01 15:08:04 -08:00
Theodore Dubois
8478bf5b53 Implement stopping processes with signals 2019-01-01 12:54:26 -08:00
Theodore Dubois
09d3885c70 Remove useless has_timer field 2018-12-31 18:03:29 -08:00
Theodore Dubois
14d30a35df Fix potential UAF when handling CLONE_VFORK 2018-12-31 17:29:36 -08:00
Theodore Dubois
2e83bbe9fb Fix some lock ordering issues 2018-12-26 12:11:07 -08:00
Theodore Dubois
aa47e74092 Use the exit signal passed to clone() 2018-12-20 19:19:56 -08:00
Theodore Dubois
493b0e88fe Fix crash when forking with no tty 2018-12-14 09:01:51 -08:00
Theodore Dubois
2adc56625c Make process group and session membership per-thread-group 2018-12-06 14:17:46 -08:00
Theodore Dubois
3e82469a27 Copy important things like brk and start_brk in fork 2018-12-05 14:32:19 -08:00
Ryan Hileman
277dd12e49 implement futex timeouts 2018-11-14 12:13:35 -08:00
Theodore Dubois
12e405817d Ignore signals when waiting for vfork completion 2018-11-12 10:43:23 -08:00
Theodore Dubois
8b6d4ddef3 Fix a couple memory-related races 2018-11-10 15:05:24 -08:00
Theodore Dubois
e265949196 Fix a couple of race UAFs 2018-11-09 18:59:30 -08:00
Theodore Dubois
12ed53a493 Introduce a replacement for pthread conditions and use that to make exit_group work 2018-11-08 18:57:06 -08:00
Theodore Dubois
4a8efe8d01 Make various memory management things shared between threads 2018-10-07 13:02:15 -07:00
Theodore Dubois
62a699603b Add half-finished files app integration 2018-09-22 15:18:45 -07:00
Theodore Dubois
601ed99dc3 Make sure different processes have different pids 2018-06-17 15:15:42 -07:00
Theodore Dubois
8a04545386 Enable creating threads 2018-02-02 16:57:36 -08:00
Theodore Dubois
8304fe0d2d Mark CLONE_THREAD as implemented 2018-02-01 17:25:49 -08:00
Theodore Dubois
428f414d48 Don't inherit the vfork_done flag 2018-02-01 17:23:18 -08:00
Theodore Dubois
76124c1933 First pass at implementing exit_group 2018-02-01 17:23:00 -08:00
Theodore Dubois
7e5e9e5c1f First pass at implementing thread groups
It builds and will give you a shell. Gonna call it a day.
2018-01-28 15:42:42 -08:00
Theodore Dubois
b07a0f6de8 Implement CLONE_CHILD_CLEARTID 2018-01-22 13:48:24 -08:00
Theodore Dubois
d6a44b6458 Require CLONE_VM for CLONE_SIGHAND and CLONE_SIGHAND for CLONE_THREAD 2018-01-22 13:08:19 -08:00
Theodore Dubois
56f7d13e47 Fix cleanup in copy_task 2018-01-22 13:06:17 -08:00
Theodore Dubois
a5fb79920c Split signal handlers into a separate structure and clone flag 2018-01-21 20:52:16 -08:00
Theodore Dubois
0b155737fb Ignore CLONE_SYSVSEM 2018-01-21 18:04:59 -08:00
Theodore Dubois
1dae2830e3 Implement CLONE_PARENT_SETTID 2018-01-21 18:02:49 -08:00
Theodore Dubois
f419eddfff Implement CLONE_SETTLS 2018-01-21 17:57:53 -08:00
Theodore Dubois
dbe0acb120 Implement CLONE_FS 2018-01-21 17:40:45 -08:00
Theodore Dubois
eddf023669 Move pwd, root, uname out into its own struct 2018-01-21 17:24:32 -08:00
Theodore Dubois
45e3fb1eec Reshuffle some of the code for clone 2018-01-21 12:54:50 -08:00
Theodore Dubois
6a907425e6 Rename process to task 2018-01-21 12:44:55 -08:00
Theodore Dubois
728ca235c0 Replace files array with fdtable structure 2018-01-15 19:18:38 -08:00
Theodore Dubois
77f9c73be9 Remove magic from locking macros 2018-01-14 18:18:12 -08:00
Theodore Dubois
bf3b711cdd Implement tracking of process cpu usage 2018-01-10 15:33:11 -08:00
Theodore Dubois
2b5374c21b Rename start_thread and remove cpu parameter to handle_interrupt 2017-12-24 12:15:14 -08:00
Theodore Dubois
5211b1e101 Improve sanity of process locking 2017-12-20 00:33:56 -08:00
Theodore Dubois
5d2fdd3e18 Reduce magic in locking macros 2017-12-19 22:48:43 -08:00
Theodore Dubois
1be9d13811 Pass 0 to sys_clone from sys_fork and sys_vfork 2017-12-17 19:18:57 -08:00
Theodore Dubois
25425a1db2
Correctly check for nonzero stack, fix #8 2017-12-17 11:12:41 -08:00
Theodore Dubois
bd6ab0f1e2 Add a refcounted layer between pagetables and actual data 2017-12-14 14:35:00 -08:00
Theodore Dubois
f59d419c0e Duplicate fds on fork and close them on exit 2017-12-06 16:47:56 -08:00
Theodore Dubois
a39d1fbd3d Add a TODO message for when I'll need to implement threads 2017-11-29 16:58:26 -08:00
Theodore Dubois
f1e63c43e0 Rename sys directory to kernel
A number of the headers in it were conflicting with macOS system
headers.
2017-10-13 16:54:11 -07:00