Commit Graph

571 Commits

Author SHA1 Message Date
Matheus ac6addd527 dbg: map addresses to file+function+offset
Add support for mapping kernel .text addresses into file + function +
offset for debugging purposes. Make the backtrace use this new feature.
2026-10-09 01:46:15 -03:00
Matheus 91ec85d8ca panic: print backtrace on panic
Panics currently lack backtraces, which are a very useful thing to
have. Make the profiling backtrace function generic and print backtraces
using it.
2026-10-08 22:14:46 -03:00
Matheus 9a9740469f kcov: move thread attach from open to start
The current kcov code attaches a kcov object to the thread which opened
it. This is not desirable, as syzkaller opens /dev/kcov in a parent
process and passes it down to the child.

Move the thread attachment from open() time to start time.
2026-10-08 18:42:25 -03:00
Matheus e25008b80b Merge pull request #36 from jvbronzeado/rewrite
Optimize page fault handling by caching last accessed range
2026-10-08 15:39:12 -03:00
jvbronzeado 185b33e719 mm: added page fault range caching for each mm_space_t
mm: added last_pagefault handling when mm_space_t is unmapped

mm: fixed styling inconsistencies, fixed last pagefault range removal

mm: fix unitialized last_pagefault member in slab data
2026-10-08 15:28:56 -03:00
wnstngs 5180e693d9 list: add list definition and drain operation 2026-10-07 21:33:49 +03:00
wnstngs 91491d825b kernel: remove the list_t alias since it's just a typedef for node 2026-10-07 14:08:36 +03:00
wnstngs 513faa92c7 kernel: use list.h for scheduling run queues 2026-10-07 10:24:50 +03:00
wnstngs 3894be1a15 kernel: use list.h for DPC queues 2026-10-07 10:23:18 +03:00
wnstngs 90cbe1d6aa list: switch lists to circular lists 2026-10-07 10:21:50 +03:00
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 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 1c65a2c891 devfs: add anonymous variants to register/remove
The current devfs code requires registered devices to have a name on
creation. This makes temporary/hidden devices like pty master ends
appear for a split second on the devfs tree.

Add a way of registering/removing devfs nodes which do not have a name
on the tree.
2026-10-06 11:50:59 -03:00
Matheus cc069554ae vfs: fix UAF on VOP_RELEASE 2026-10-06 11:50:59 -03:00
Matheus efe699bd2f x86_64 cpu: always inline asm helpers 2026-10-06 11:50:57 -03:00
Matheus 6ac80173b4 Merge pull request #44 from wnsntgs/Kernel/Lib/EventDetachFix
Detach all event listener attachments
2026-09-23 15:07:41 -03:00
wnstngs 3ecfb0ffb9 kernel: detach all event listener attachments 2026-09-23 20:48:29 +03:00
Matheus 8d82a8fdf1 time: fix diffus 2026-09-19 12:50:23 -03:00
Matheus 7a533242ad scheduler: make idle cpus steal work 2026-09-16 00:22:05 -03:00
Matheus b9a5ead597 mm: add full page in flag for get physical 2026-09-15 14:45:56 -03:00
Matheus cdee765643 raw sockets: make creating them a privileged operation 2026-09-14 14:03:39 -03:00
Matheus 3eaca91ff1 vfs: properly sync metadata 2026-09-14 10:11:31 -03:00
Matheus f0dc54e027 netdev: cleanup and abstraction 2026-09-14 09:47:07 -03:00
Matheus d9ea361caf ipv4: fix receival of different sized headers 2026-09-10 23:58:25 -03:00
Matheus 5aca46e22c socket: SIOCGIFINDEX 2026-09-10 23:58:25 -03:00
Matheus 66b0cb9076 sockets: expose raw sockets to userspace 2026-09-10 17:56:54 -03:00
Matheus e17ba000e2 raw sockets: finish implementation 2026-09-10 17:19:35 -03:00
Matheus 1a8fe895b0 netdev: netdev_from_minor 2026-09-10 16:41:49 -03:00
Matheus 79752fb5e0 sock: pass protocol to sockets 2026-09-10 16:41:21 -03:00
Matheus 894d9bdaf9 raw: raw sockets 2026-09-10 15:59:53 -03:00
Matheus 895c6d9345 eth: take size_t size in eth_process 2026-09-10 15:38:50 -03:00
Matheus 2c73b64e3f wlan: set_key and del_key 2026-09-10 14:11:12 -03:00
Matheus d3ff861386 wlan: association/disasssociation api and ioctls 2026-09-10 12:43:27 -03:00
Matheus 9b0f202bdb wlan: expose scan, scan wait and bss cache get to userspace 2026-09-10 12:12:50 -03:00
Matheus 6a8ed4a99c wlan: finish glue between u80211 and u80211_drv 2026-09-10 10:41:52 -03:00
Matheus daebfd89b5 net: consume descriptor on tx 2026-09-09 22:39:34 -03:00
Matheus 8134c00b69 wlan: registration of devices 2026-09-09 22:06:20 -03:00
Matheus 84ad92b475 u80211_drv: port over rtl8188eu driver 2026-09-09 19:08:14 -03:00
Matheus 2328f889ef kernel: firmware loading 2026-09-09 18:06:17 -03:00
Matheus de0d5cb8f9 vfs: root event signaling 2026-09-09 16:26:10 -03:00
Matheus 1b4e257793 work: initial implementation 2026-09-08 23:37:19 -03:00
Matheus 017a08a793 ports: bump mlibc/frigg 2026-08-19 19:46:44 -03:00
Matheus 65358e6705 sysctl: SYS_CTL_HW_CPUS_ONLINE 2026-08-13 00:43:15 -03:00
Matheus c194569d65 audio: mode selection 2026-08-07 08:27:17 -03:00
Matheus c75b45436a audio: allocate streams separately from devices 2026-08-05 22:44:36 -03:00
Matheus 6e5e9ecdc5 mm: add flags argument to mm_cache_get_page 2026-07-18 15:24:31 -03:00
Matheus 02ba3e3939 slab: fix smp false sharing 2026-07-17 18:06:25 -03:00
Matheus babc6f3e06 cpu: cpu_cache_line_size 2026-07-17 18:06:03 -03:00
Matheus 7ab18babf4 abc: use pushlocks directly 2026-07-17 15:59:15 -03:00
Matheus fd443a211d pushlock: rewrite implementation 2026-07-17 15:58:59 -03:00