]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix: diskfs kfree-on-static-root, mount syscall, user addr space 8MiB->1GiB
authorTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 06:50:42 +0000 (03:50 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 06:50:42 +0000 (03:50 -0300)
commit5e0e159916de9ecb99cc114f7f08cc9f24c3a777
tree218684007ca1f06738284e72cf3452e5f7468ace
parentd3761c8b74cec8928f0ad2e58fa1af7c58db4f12
fix: diskfs kfree-on-static-root, mount syscall, user addr space 8MiB->1GiB

Bug 1: ls /disk heap corruption — diskfs_close_impl called kfree on
static g_root BSS variable. Added guard: skip kfree when node == g_root.

Bug 2: mount command only displayed mounts. Added SYSCALL_MOUNT (126)
with support for tmpfs and disk-based filesystems (diskfs/fat/ext2/persistfs).
Updated userspace mount to call the syscall with device, mountpoint, and
-t fstype args.

Bug 3: doom 'Unable to allocate 5 MiB' — user address space was capped
at 8 MiB (USER_STACK_BASE=0x00800000). Raised to 1 GiB (0x40000000) in
elf.c, usermode.c, and syscall_brk_impl.
include/syscall.h
src/arch/x86/elf.c
src/arch/x86/usermode.c
src/kernel/diskfs.c
src/kernel/syscall.c
user/mount.c
user/ulibc/include/syscall.h