Theodore Dubois
a3f58a23ae
Move emu/memory.[ch] to kernel/
...
A long time ago, for linux, emu and kernel were separated into separate
library targets, but for some reason memory.c was kept in emu/ despite
only being linked into kernel. Now's a good time to move it where it
belongs.
2024-11-07 21:38:17 -08:00
Theodore Dubois
6856314381
Make sure new threads start with a clear TLB
...
Previously tlb_refresh would compare the specified MMU with the
uninitialized garbage value. If a new process is started and reuses
enough things (host stack, memory pointer) it will also reuse the old
garbage TLB entries and thus summon nasal demons.
2021-06-14 22:13:55 -07:00
Theodore Dubois
9bc2afb30e
Refactor for linux
2020-12-20 16:35:22 -08:00
Saagar Jha
1d16949fae
Implement ptrace
2020-10-11 19:36:01 -07:00
Saagar Jha
bf1603ef2b
Put the task pid in the thread name
2020-10-11 12:21:37 -07:00
Theodore Dubois
3fee07f618
Make sure the tlb doesn't have an outdated mem pointer
2020-10-10 14:13:05 -07:00
Theodore Dubois
640017278e
Fix locking issues with CPU refactor
...
There was a deadlock when cpu_run called cpu_step_to_interrupt with mem
read-locked, and it would write-lock mem to clean up jetsam.
2020-06-09 00:35:53 -07:00
Theodore Dubois
fcb0599aa5
Squash some warnings
...
arch_prctl was never useful for anything, _GNU_SOURCE is needed for
pthread_setname_np, no one uses vdso-transplant so it's cool with being
exploited through argv, I'll get to tmpfs_umount one day
2020-05-30 14:41:11 -07:00
Saagar Jha
a7ba808a76
Name forked tasks
2020-05-26 21:06:46 -07:00
Theodore Dubois
c88d945fc4
Add logging on sched_yield
2019-11-18 09:11:30 -08:00
Theodore Dubois
71284af633
Implement a queue for pending signals
2019-06-22 22:58:06 -07:00
Theodore Dubois
a39027c499
Eliminate the need for a "queued" signal set
2019-06-22 22:01:48 -07:00
Theodore Dubois
894c3d2af5
Make the whole boot system thing happen
2019-05-04 23:32:24 -07:00
Theodore Dubois
93bc13d924
Fix tsan warnings
2019-02-04 18:53:42 -08:00
Theodore Dubois
2f8c0afcbf
Add sockrestart infrastructure
2019-01-26 17:39:22 -08:00
Theodore Dubois
1265ff32c3
Fix zsh sometimes hanging in sigsuspend
2019-01-06 11:09:26 -08:00
Theodore Dubois
8478bf5b53
Implement stopping processes with signals
2019-01-01 12:54:26 -08:00
Theodore Dubois
14d30a35df
Fix potential UAF when handling CLONE_VFORK
2018-12-31 17:29:36 -08:00
Theodore Dubois
3b7c92d141
Implement sigsuspend
...
Fixes zsh (#103 )
2018-12-30 21:19:46 -08:00
Theodore Dubois
9019f9c5aa
Start pids at 1 again
2018-12-24 23:11:38 -08:00
Theodore Dubois
725ec6daf6
Autoincrementing pids
2018-12-24 18:38:47 -08:00
Theodore Dubois
2adc56625c
Make process group and session membership per-thread-group
2018-12-06 14:17:46 -08:00
Theodore Dubois
cfaef9d0b4
Add stub for sched_yield
2018-12-01 14:59:38 -08:00
Theodore Dubois
f45ad6b50a
fuk
2018-11-30 14:39:22 -08:00
Theodore Dubois
7d0e083098
Don't freeze the main thread when tapping the screen
2018-11-30 12:32:51 -08:00
Theodore Dubois
3b4c71f662
Add function to report error and crash
2018-11-29 16:18:18 -08:00
Theodore Dubois
3444cc121d
Don't segfault when looking up a ridiculous PID
2018-11-25 17:50:33 -08:00
Theodore Dubois
6a035e9186
Fix "function declaration is not a prototype" warnings
2018-11-14 17:13:22 -08:00
Theodore Dubois
9a3a89252d
Fully implement setpgid
2018-11-11 14:40:05 -08:00
Theodore Dubois
e265949196
Fix a couple of race UAFs
2018-11-09 18:59:30 -08:00
Theodore Dubois
7a91160b30
Try a completely different implementation of interrupting waits
2018-11-09 13:56:08 -08:00
Theodore Dubois
3d52f2d01a
Make new condition implementation work on Darwin
2018-11-08 19:28:11 -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
e6a4f88bef
Add child processes to the parent’s process group and session
2018-10-05 10:37:57 -07:00
Theodore Dubois
62a699603b
Add half-finished files app integration
2018-09-22 15:18:45 -07: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
a5fb79920c
Split signal handlers into a separate structure and clone flag
2018-01-21 20:52:16 -08:00
Theodore Dubois
eddf023669
Move pwd, root, uname out into its own struct
2018-01-21 17:24:32 -08:00
Theodore Dubois
6a907425e6
Rename process to task
2018-01-21 12:44:55 -08:00