kernel: all string parameters now take a corresponding length parameter

This commit is contained in:
2026-02-19 19:07:55 +00:00
parent 291a5f677e
commit 2f413c603d
5 changed files with 56 additions and 32 deletions

View File

@@ -58,6 +58,7 @@ kern_status_t bsp_load(struct bsp *bsp, const struct boot_module *mod)
bsp->bsp_vmo = vm_object_create_in_place(
"bsp",
3,
mod->mod_base,
mod->mod_size,
VM_PROT_READ | VM_PROT_EXEC | VM_PROT_USER);
@@ -87,6 +88,7 @@ static kern_status_t map_executable(
status = vm_region_create(
task->t_address_space,
"exec",
4,
VM_REGION_ANY_OFFSET,
exec_size,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXEC | VM_PROT_USER,
@@ -97,6 +99,7 @@ static kern_status_t map_executable(
struct vm_object *data = vm_object_create(
".data",
5,
bsp->bsp_trailer.bsp_data_size,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_USER);
/* TODO copy .data from executable to memory */
@@ -160,6 +163,7 @@ kern_status_t bsp_launch_async(struct bsp *bsp, struct task *task)
struct vm_object *user_stack = vm_object_create(
"stack",
5,
BOOTSTRAP_STACK_SIZE,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_USER);
if (!user_stack) {