Commit Graph

301 Commits

Author SHA1 Message Date
Matheus e4a4896b4b kcov: initial implementation
Implement a device (/dev/kcov) that exposes coverage info for the
kernel. This will be especially useful for coverage-based fuzzing (e.g.
syzkaller).

Exclude a lot of functions which would crash/otherwise interfere in the
coverage, including only processing coverage callbacks when not handling
an irq.
2026-10-06 11:51:02 -03:00
Matheus 111a8696d8 mmu: move tlb shootdown to IPL_MAX
Currently, with IPL_IGNORE, tlb shootdown is not being treated as an
irq and thus does not contribute to the irq depth. Move it to the
highest possible IPL.
2026-10-06 11:51:02 -03:00
Matheus 011309d43d cpu: add irq depth counting
Add a way of checking if a cpu is in the middle of handling an irq and
how deep it is into it. This will allow for future code to conditionally
run only in/outside interrupts.
2026-10-06 11:51:01 -03:00
Matheus 0cdd03eba8 smp: fix race between cpu exposure and smp init
The SMP code exposes that a cpu woke up before it is properly
initialized in sched_ap_entry(). Fix this by initializing it first,
exposing it and then stopping the bootstrap thread.
2026-10-06 11:51:01 -03:00
Christopher Fandrich a6fd10c211 syscall: Properly handle a non-canonical return RIP 2026-09-22 13:11:10 -07:00
Matheus 10cd22207d smp: make cpu internal id match offset into cpu table 2026-09-15 23:40:53 -03:00
Matheus b9531c0ec7 smp: fix smp false sharing 2026-07-17 18:06:32 -03:00
Matheus babc6f3e06 cpu: cpu_cache_line_size 2026-07-17 18:06:03 -03:00
Matheus 239c267ed3 mm: rename vmm api to mm 2026-07-01 15:00:46 -03:00
Matheus d890eb5fb2 mm: vmmcache -> mm_cache 2026-07-01 12:25:18 -03:00
Matheus 4d1caa6ede mm: refactor page.c related names to snake case 2026-07-01 12:06:30 -03:00
Matheus 6f8700e678 mm: refactor pmm -> page 2026-07-01 11:56:06 -03:00
Matheus b74f36e984 kernel: implement eventfs/eventfd 2026-06-18 01:53:59 -03:00
Matheus 4b9ace6d02 syscall: fix signal returns from syscall 2026-06-17 22:40:51 -03:00
Matheus 659b29ef4e syscalls: implement sysctl and add process listing 2026-06-09 17:47:27 -03:00
Matheus 762552ed5f syscalls: setpriority 2026-05-28 23:52:07 -03:00
Matheus b3312444bf syscall log: fix logging with smap on 2026-05-28 14:19:00 -03:00
Matheus f9912b8970 kernel: fix taking smep/smap path on unsupported systems 2026-05-14 12:03:11 -03:00
Matheus 3fda97332f ps2: don't wait forever on machines with no controller 2026-05-12 22:18:42 -03:00
Matheus 9697ee777a kernel: initial xhci and usb implementation 2026-05-12 22:04:13 -03:00
Matheus 02a47c8303 context: fix copy of fs and gs 2026-04-28 21:15:21 -03:00
iretq 21ddc29be7 ps2: use the new input subsystem
Co-authored-by: Matheus <matheusuky@gmail.com>
2026-04-27 00:11:28 -03:00
Matheus 71dd6d1125 x86-64: enable smep and smap 2026-04-23 15:29:43 -03:00
Matheus b0542a165c archctl: remove unused variable 2026-04-23 12:18:22 -03:00
Matheus 06f414baaf smp: fix warning 2026-04-23 12:17:02 -03:00
Matheus a15b034aa8 syscalls: implement clock_getres 2026-04-23 12:10:26 -03:00
Matheus 804cd32fc5 ldt: validate ldt entries 2026-04-22 19:48:13 -03:00
Matheus 90a420d8bb prof: add user/kernel statistics 2026-04-22 19:44:08 -03:00
Matheus 96c8f96e7b syscall: clear more flags 2026-04-16 18:17:16 -03:00
Matheus c54d618c82 x86-64: handle some more exceptions properly 2026-04-16 18:00:33 -03:00
Matheus 3399c4570c isr: allow stack traces to cross interrupts 2026-04-12 22:38:02 -03:00
Matheus b02461e24f syscallog: add global_syscall_logging global argument 2026-04-11 22:00:51 -03:00
Matheus 9a1b23a320 syscall: clear direction flag on entry 2026-04-06 17:53:45 -03:00
Matheus 5b164793cf syscall: do not use cr2 as a scratch register 2026-04-02 01:51:06 -03:00
Matheus ea8da40128 syscalls: getsockopt 2026-04-01 17:22:22 -03:00
Matheus 774ae10e99 kernel: update limine to 11 and use base revision 6 2026-04-01 16:45:42 -03:00
Matheus f8694029ab syscalls: statvfs 2026-03-20 21:28:59 -03:00
Matheus 41f97c6c61 kernel: ldt support 2026-03-20 21:23:59 -03:00
Matheus 5b44d3557a kernel: add yield syscall 2026-03-08 14:47:18 -03:00
Matheus b3d5bf5586 vmm: some work towards page locking 2026-02-12 16:25:35 -03:00
Matheus 93fab00d1e hpet: fix print 2026-01-28 16:08:47 -03:00
Christopher Fandrich deec4678c1 apic: fix arch_ioapic_setirq 2026-01-28 01:12:35 -08:00
iretq 963d29fc90 syscall log: support for selective syscall tracing 2025-12-30 17:06:02 -03:00
Matheus c9c2471796 x86_64/context: fix check for xsave 2025-12-27 17:23:21 -03:00
Matheus 227fcb5386 context.asm: zero rbp on stack change 2025-12-07 12:06:32 -03:00
Matheus 1a7a178168 x86-64/arch_prof: fix backtrace 2025-12-07 12:06:14 -03:00
Matheus 64d078c654 archctl: boundary check 2025-12-05 18:20:09 -03:00
Matheus 40bbf217ee kernel: profiling infrastructure 2025-12-05 18:19:42 -03:00
Matheus d10295dcdf interrupt: nmi work 2025-12-05 18:09:36 -03:00
monkuous d301ec6955 kernel: add xsave support 2025-11-15 23:20:05 +01:00