Commit Graph

1378 Commits

Author SHA1 Message Date
K. Lange
cb3432ebcf kernel: fix swapped LCUC conversion in tty 2022-12-07 13:40:55 +09:00
K. Lange
d52d502f5c kernel: brute-force locking around unmap syscall, should make thread stuff more stable? 2022-11-08 10:35:45 +09:00
K. Lange
bf2c51426d kernel: proc->group may have exited
Handling of thread parents needs to be better... the initial thread
of a process can disappear, and with pid reuse it could even be
replaced by a different process... this needs to be cleaned up more.
2022-10-29 17:27:05 +09:00
K. Lange
5ef5d4c6b6 kernel: Update version codename 2022-10-22 12:02:50 +09:00
K. Lange
d5d8941a2d kernel: we have more than 31 signals... 2022-10-10 16:04:13 +09:00
K. Lange
3743ee8e4d kernel: enable -Wstrict-prototypes 2022-09-17 13:37:02 +09:00
K. Lange
e80d2da3f3 net: Cleanup headers 2022-09-17 13:35:31 +09:00
K. Lange
5815adca7d procfs: RUNNING processes should have state R 2022-09-02 13:15:24 +09:00
K. Lange
ce625f2137 aarch64: enable userspace access to timer physical counter 2022-08-30 17:12:49 +09:00
K. Lange
1960006ec7 aarch64: dump regs on unknown fatal exceptions 2022-08-30 17:12:18 +09:00
K. Lange
ecbe7f6cbb aarch64: don't be so intent on running driver bringup on cpu0 2022-08-30 17:11:42 +09:00
K. Lange
d2f3644430 kernel: fixup ptrace signal delivery, again 2022-08-18 19:42:17 +09:00
K. Lange
5aa2b32101 kernel: Return signal number that caused process to stop 2022-08-18 19:20:43 +09:00
K. Lange
88a1df00a6 tty: do not print line feed after ^C, et al. 2022-08-18 18:34:21 +09:00
K. Lange
dd33c722c5 kernel: fix waitpid() with WSTOPPED; only return on state change? 2022-08-18 18:19:15 +09:00
K. Lange
745bc29a26 kernel: rudimentary sigwait 2022-08-18 16:56:43 +09:00
K. Lange
37bd4e08cb kernel: add sigsuspend 2022-08-18 15:09:23 +09:00
K. Lange
ab4c474768 kernel: Handle some invalid arguments in signal syscalls 2022-08-18 15:08:56 +09:00
K. Lange
5f643d7034 kernel: don't SUID traced processes 2022-08-18 05:42:48 +09:00
K. Lange
ebd55bc204 tmpfs: Don't completely bomb on trying to unlink a directory 2022-08-17 19:30:17 +09:00
K. Lange
fff099c598 kernel: add missing PTRCHECK to sys_readline; fixes #250 2022-08-17 08:49:12 +09:00
K. Lange
c554bf581c kernel: Support SA_NODEFER 2022-08-06 18:24:06 +09:00
K. Lange
083ab387f3 kernel: more signal functions 2022-08-06 18:19:27 +09:00
K. Lange
2906476825 kernel: Add sigaction 2022-08-06 18:03:39 +09:00
K. Lange
eed45cbba9 i965: cleanup, clear screen on initial mode set 2022-07-25 09:51:04 +09:00
K. Lange
0d23a04c6c aarch64: add ext2, iso9660 modules; JUMP26 reloc 2022-04-18 20:37:26 -04:00
K. Lange
5ed3dc0640 virtio: Remove unused PCI cap parsing 2022-04-18 10:03:19 -04:00
K. Lange
2639c786da procfs: fill on open for consistent reads 2022-04-17 22:23:14 -04:00
K. Lange
083587733a procfs: times are reported in microseconds 2022-04-17 21:05:59 -04:00
K. Lange
f44a6bbe9a aarch64: read rtc time again on qemu 2022-04-17 18:22:53 -04:00
K. Lange
9ecad97b64 virtio: these F keys should work too 2022-04-13 22:20:12 -04:00
K. Lange
71ce811a65 virtio: map command to left super 2022-04-13 18:18:13 -07:00
K. Lange
8019a59632 kernel: disable some printfs 2022-04-13 16:19:56 -07:00
K. Lange
f144266bc5 aarch64: ac97 driver as module 2022-04-13 16:19:56 -07:00
K. Lange
7fbb7d64d7 aarch64: e1000 driver as module 2022-04-13 16:19:56 -07:00
K. Lange
3b1327464f aarch64: basic relocations, enough for test.ko 2022-04-13 16:19:56 -07:00
K. Lange
bea3854b00 aarch64: (wip) support kernel modules 2022-04-13 16:19:56 -07:00
K. Lange
18b802d7ee net: Support recvfrom on udp sockets 2022-03-22 15:40:25 +09:00
K. Lange
f6ea45f60e net: Make ICMP sockets more normal 2022-03-22 15:33:59 +09:00
K. Lange
de09abf2dd x86-64: fixup serial receive loop as this one was kinda bad 2022-03-22 14:13:21 +09:00
K. Lange
6ceb9392cd tty: fix permanently set EOF status on tty 2022-03-22 14:10:30 +09:00
K. Lange
5caf43d90a kernel: x86-64: copy over unmap improvements from aarch64 2022-03-16 08:39:33 +09:00
K. Lange
00075494e6 kernel: aarch64: initial pass at clearing upper page structures on unmap
This still has thread issues, but a lot of other things need to be
redesigned to correct them.

Particularly, we have a lot of callers that use `mmu_get_page` without
acquiring any locks on the page directory, so in a multithreaded process
one core may be trying to acquire pages while another is unmapping. In
the normal sbrk setup, this shouldn't happen, especially with the locks
in userspace around malloc, and it shouldn't happen with shm as we avoid
dealing with shm pages in the unmap right now, but from the raw API we
provide it's possible for a crafted program to run into it.

The whole memory management API really needs a redesign, much of what we
expose comes from toaru32, and still leaks details about page size into
other code that shouldn't care.
2022-03-16 08:19:36 +09:00
K. Lange
2262c0b2bc procfs: expose heap break point in /proc/{PID}/status 2022-03-16 08:17:50 +09:00
K. Lange
b297ab3fed kernel: improve comments in sys/ptrace.c 2022-03-13 16:07:53 +09:00
K. Lange
9f7a84c0fc kernel: improve comments in sys/signal.c 2022-03-13 15:13:14 +09:00
K. Lange
58a1b6e999 pthread: Remove magic thread exit; pthread_exit() is just syscall_exit 2022-03-12 18:46:28 +09:00
K. Lange
4bcd1b4b89 aarch64: apply e1000 permission changes 2022-03-07 18:08:54 +09:00
K. Lange
2700849ca2 aarch64: clear instruction cache on new pages when forking 2022-03-07 09:20:19 +09:00
K. Lange
523a3a0159 kernel: packetfs: handle -ERESTARTSYS from underlying pipe 2022-03-06 16:22:48 +09:00
K. Lange
4c2ec1f0a0 kernel: add a temporary 'munmap' sysfunc 2022-03-06 15:58:38 +09:00
K. Lange
49fd67bf2d kernel: relocate some user virtual addresses 2022-03-06 15:58:08 +09:00
K. Lange
f778967edb aarch64: disable lock debugging 2022-03-06 15:56:53 +09:00
K. Lange
e37207828a kernel: print more details when trying to alert invalid process 2022-03-04 22:09:31 +09:00
K. Lange
cd04af0a75 aarch64: remove some debug messages 2022-03-04 22:08:05 +09:00
K. Lange
d932559d79 kernel: ensure we're saving/restoring all process state on signals 2022-03-04 22:04:11 +09:00
K. Lange
6ff1bc5195 kernel: clear signal disposition when running a handler, as we should 2022-03-04 22:03:21 +09:00
K. Lange
e07291a0b1 kernel: More lock fixes around pipes... 2022-03-04 22:01:13 +09:00
K. Lange
63fbbec928 kernel: Don't let things clear frames without holding the frame alloc lock 2022-03-04 22:00:37 +09:00
K. Lange
3852646174 kernel: Restart some signals, fix up suspend to work with new signal management 2022-03-04 18:39:38 +09:00
K. Lange
bbebc7c128 kernel: complete redesign of signal handling 2022-03-04 16:12:16 +09:00
K. Lange
b3f6728339 date: add rudimentary support for setting date/time 2022-02-25 21:16:30 +09:00
K. Lange
7d2beb443b aarch64: expose dtb as a device file 2022-02-23 20:40:53 +09:00
K. Lange
b29edb0db3 rpi400: mini uart driver 2022-02-23 16:33:30 +09:00
K. Lange
94b86558d3 aarch64: cleanup, fix warnings 2022-02-23 10:27:47 +09:00
K. Lange
c96bae5e78 aarch64: temporary device drivers until modules are ready 2022-02-23 10:24:15 +09:00
K. Lange
5a6648a869 rpi400: try to clean up rpi stuff 2022-02-23 09:49:16 +09:00
K. Lange
814f5210ae aarch64: cleanup some warnings 2022-02-22 17:30:17 +09:00
K. Lange
6c69d235cf aarch64: implement a better spinlock 2022-02-22 09:53:55 +09:00
K. Lange
4946a0bf5a aarch64: reset timer on entry into idle wait 2022-02-22 09:53:30 +09:00
K. Lange
4cc4d9520e aarch64: force task switch when idle gets wakeup signal 2022-02-22 09:53:04 +09:00
K. Lange
5019c047c5 aarch64: expose aarch64_interrupt_dispatch as a symbol 2022-02-22 09:52:37 +09:00
K. Lange
c180959f4e aarch64: idle task loops should be the same for BP and APs 2022-02-22 09:51:56 +09:00
K. Lange
2543e2ce0c aarch64: this seems to be necessary or hvf can occasionally throw a fault on syscall return? 2022-02-20 18:12:29 +09:00
K. Lange
59c92182b4 aarch64: save/restore fpu status registers 2022-02-20 18:12:02 +09:00
K. Lange
255b2296fd aarch64: implement panic halting with sgis 2022-02-20 18:11:24 +09:00
K. Lange
975b388962 rpi400: smp startup 2022-02-18 18:44:23 +09:00
K. Lange
4c13c92180 rpi400: request maximum clock speed at startup 2022-02-16 19:43:25 +09:00
K. Lange
7fc07996d1 rpi400: fbterm: only do that on arm 2022-02-16 12:38:51 +09:00
K. Lange
116ee0a803 rpi400: initial platform support 2022-02-16 12:36:03 +09:00
K. Lange
54cd122d3e aarch64: virtio: be even pickier about cache maintenance 2022-02-13 18:29:57 +09:00
K. Lange
62b0b216d6 kernel: more lock ordering shenanigans 2022-02-13 14:44:09 +09:00
K. Lange
6b35dab7da kernel: fix faulty lock around sleep nodes not capturing potential change in owner 2022-02-12 17:51:24 +09:00
K. Lange
ce4bf5162a aarch64: mmu: be more paranoid about frame allocation/clearing 2022-02-12 17:50:45 +09:00
K. Lange
1695ca6652 aarch64: traceback: fix incorrect base pointer on manual traceback 2022-02-12 17:50:21 +09:00
K. Lange
595727be1d aarch64: virtio: make sure irq handler symbols are in our table for debugging 2022-02-12 17:49:58 +09:00
K. Lange
ae28f8f832 aarch64: fixup warning about discarded volatile 2022-02-12 13:49:32 +09:00
K. Lange
33f0204c0a aarch64: mmu: fix up insufficient locking around mulitlevel page mapping 2022-02-12 13:47:22 +09:00
K. Lange
41bdb25715 aarch64: remove superfluous reload of TTBR1 2022-02-12 13:47:22 +09:00
K. Lange
f6d0206059 aarch64: interrupt mapping improvements, chained interrupt handlers 2022-02-12 13:47:21 +09:00
K. Lange
b95f27dc60 aarch64: Add a tty driver for the pl011 uart 2022-02-11 11:55:36 +09:00
K. Lange
85274e61ad aarch64: cleanup 2022-02-11 11:54:28 +09:00
K. Lange
8062fdda17 aarch64: fix mmu_first_n_frames since ram moved 2022-02-09 23:14:50 +09:00
K. Lange
a72352d163 aarch64: start work on interrupt dispatch 2022-02-09 21:02:00 +09:00
K. Lange
8c7e6209f4 aarch64: increase inital stack size for kernel startup 2022-02-09 21:01:26 +09:00
K. Lange
b55964e451 aarch64: flip smp mutex after doing init for better startup synchronization 2022-02-09 21:01:09 +09:00
K. Lange
2c5a6db126 procfs: avoid crashes on empty module, filesystem tables 2022-02-07 12:47:58 +09:00
K. Lange
1ed8ba466c aarch64: Actually reset kernel stack on exec 2022-02-07 12:46:13 +09:00
K. Lange
82090737dd aarch64: basic kernel tracebacks on el1-el1 fault 2022-02-07 12:38:30 +09:00
K. Lange
9f03252e3a aarch64: Load kernel symbol table 2022-02-06 21:23:35 +09:00