f8a7a4285f
syscall: msg: validate iovec array itself as well as the buffers it points to
2026-02-26 20:55:17 +00:00
f9bf4c618a
syscall: log: add task id to log output
2026-02-26 20:54:14 +00:00
e4de3af00d
kernel: remove support for sending kernel handles via port/channel
2026-02-26 20:53:47 +00:00
b59d0d8948
syscall: msg: locking of vm-region is now handled by channel_read_msg
2026-02-26 19:43:07 +00:00
8cc877c251
kernel: port: dequeue kmsg struct once reply is received
2026-02-26 19:42:29 +00:00
2073cad97b
kernel: fix channel locking and status update issues
2026-02-26 19:42:12 +00:00
eb8758bc5e
vm: region: fix some cases where regions weren't being unlocked after use.
2026-02-26 19:41:40 +00:00
1cdde0d32e
kernel: add functions for safely (un)locking pairs of objects
...
when locking a pair of objects, the object with the lesser memory address
is always locked first. the pair is unlocked in the opposite order.
2026-02-26 19:38:49 +00:00
1c7c90ef39
kernel: channel: implement channel_read_msg and msg_read
2026-02-23 21:52:03 +00:00
11c741bd68
libmango: add nr_read output param to msg_read
2026-02-23 21:51:26 +00:00
34bd6e479c
vm: region: add nr_bytes_moved output param to memmove_v
2026-02-23 21:50:35 +00:00
5f0654430d
syscall: add task_self, task_get_address_space, and vm_region_kill
2026-02-23 18:43:49 +00:00
fd1bc0ad5f
kernel: check object refcount before performing a recursive deletion
2026-02-23 18:43:11 +00:00
b1ffdcf2bc
vm: region: improve locking rules and semantics; implement region killing
...
the rules around acquiring locks have been strictly defined and
implemented, and general lock usage has been improved, to fix and
prevent several different issues.
a vm-region is now destroyed in two separate steps:
1. it is "killed": all mappings are unmapped and deleted, the
region is removed from its parent, and the region and all of
its sub-regions are marked as "dead", preventing any
further actions from being performed with the region.
2. it is "destroyed": the vm-region object is de-allocated when
the last reference/handle is closed. the references that this
region holds to any sub-regions are also released, meaning
these regions may also be de-allocated too.
2026-02-23 18:42:47 +00:00
5690dd5b9c
kernel: add support for recursive object destruction (without recursion)
...
this system makes it possible for an object that forms part of a tree
to be safely recursively destroyed without using recursion.
2026-02-23 18:34:12 +00:00
37ae7aeef7
kernel: implement globally-unique object ids
2026-02-23 18:32:11 +00:00
dbe117135b
x86_64: implement proper user/kernel %gs base switching
...
the %gs base address is now always set to the current cpu block while
in kernel-mode, and is switched back to the userspace %gs base
when returning to user-mode.
2026-02-23 18:26:21 +00:00
273557fa9f
x86_64: lock task address space while performing a demand page-map
2026-02-23 18:25:49 +00:00
fe107fbad3
kernel: locks: add spin lock/unlock function that don't change interrupt state
2026-02-23 18:24:49 +00:00
b2d04c5983
vm: object: zero-initialise pages allocated for vm-object
2026-02-21 23:19:49 +00:00
6c2ca888ee
x86_64: remove kernel image post-build ELF32 patch
...
this patch must now be done by the wider OS build system, to avoid
interference with any bootloaders that don't support this kind of
patching (e.g GRUB i386-pc)
2026-02-21 23:18:22 +00:00
044b3688aa
vm: cache: all allocations are now zero-initialised
2026-02-21 23:18:09 +00:00
77936e3511
kernel: implement sending, receiving, and replying to message via port/channel
2026-02-21 11:32:57 +00:00
08c78bd6e7
vm: object: add vm_object_copy syscall trace output
2026-02-21 11:30:44 +00:00
2537ca46de
libmango: add macros for easily defining msg and iovec variables
2026-02-21 11:29:25 +00:00
3190035086
libmango: add temporary formatted log function
2026-02-21 11:28:58 +00:00
7f049293f4
vm: memblock: add memblock_dump to header
2026-02-21 11:27:28 +00:00
9b2c2f6b29
x86_64: start the kernel bootstrap heap above 16MiB
...
this will keep the memory area below 16MiB free for DMA memory allocations.
2026-02-21 11:24:36 +00:00
6e39dd45a4
sched: only disable/enable interrupts if schedule() is called from non-IRQ context
2026-02-21 11:23:43 +00:00
855440f584
vm: add trace output
2026-02-21 11:22:51 +00:00
e1e025ab6a
vm: region: memmove_v() now supports iovec arrays stored in userspace
2026-02-21 11:20:09 +00:00
0680b73461
kernel: iovec: implement iterating through an iovec list stored in userspace
2026-02-21 11:17:16 +00:00
aa0933be10
vm: region: implement reading from a user-space vm-region into a kernel buffer
2026-02-21 11:16:11 +00:00
8b188a0ac4
vm: region: fix iterator using wrong buffer offset when seek exceeds current buffer size
2026-02-21 11:07:53 +00:00
ed25ee6761
vm: object: fix iterator using wrong buffer offset when seek exceeds current buffer size
2026-02-21 11:07:12 +00:00
0bae39e550
vm: zone: ensure memblock region bounds are page-aligned while creating zone blocks
2026-02-21 11:01:58 +00:00
9a90662eaa
libmango: add userspace syscall call-gates
2026-02-19 19:22:06 +00:00
1d4fd4f586
syscall: add lots of syscalls
2026-02-19 19:21:50 +00:00
dbc7b8fc59
kernel: libc: add headers
2026-02-19 19:21:15 +00:00
aa9439c392
kernel: add channel/port ipc mechanism
2026-02-19 19:21:04 +00:00
8e072945d8
kernel: add functions for moving sets of handles between tasks
2026-02-19 19:20:39 +00:00
821246bc16
kernel: add functions for iterating through an array of iovecs
2026-02-19 19:19:52 +00:00
fc8cdf62d3
bsp: adjust bsp executable mapping
2026-02-19 19:18:31 +00:00
b2dbb88778
thread: move thread awaken functionality to a dedicated function
2026-02-19 19:17:38 +00:00
9424e7bcd6
thread: fix thread object data corruption
2026-02-19 19:17:18 +00:00
4c35723959
sched: add helper functions for opening and resolving handles for a task
2026-02-19 19:16:59 +00:00
2b7e5368c9
vm: implement copying data between different vm-regions
2026-02-19 19:15:15 +00:00
85006411bd
kernel: add header files
2026-02-19 19:13:44 +00:00
f2e128c57e
handle: re-arrange handle space layout
...
the lowest 2 bits of handle values are no longer unused, and 0 is
now a valid handle value.
the first 64 handles are now reserved, and will not be automatically
allocated by the kernel. however, they are still valid handles, and
other handles can be moved to this area using an as-yet-unwritten
function. this is to allow support for standard POSIX file descriptors,
which require the values 0, 1, and 2.
2026-02-19 19:11:11 +00:00
c6e1ba21dd
vm: implement direct read/write/copy access to vm-object memory
2026-02-19 19:09:38 +00:00