SchOS/kernel/core
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 15331d4399 Fix two bugs the Fedora move exposed
Neither is Fedora-specific. A different host and a freshly built
userland simply drove code that Windows never reached.

tools/mkfs.c did not compile at all. The DT_UNKNOWN/DT_DIR/DT_REG
fallbacks sat above <dirent.h>, so on glibc -- which spells them as
enumerators -- the #ifndef asked before the header was read, always
answered "missing", and then the header's own enum expanded to
`enum { 0 = 0, ... }`. Move the fallbacks below the include. The
include cannot move up instead: it has to follow the #undef that ends
the `#define dirent schfs_dirent` block.

getstackpcs() page-faulted. It dereferenced rbp[1] without validating
rbp, and the guard rejected 0xffffffff -- dead code on x86-64, already
caught by the KERNBASE test -- while the value that actually turns up
is all-ones, which is above KERNBASE. rbp[1] then wrapped to 0x7 and
took trap 14. `cp` panicked the kernel every time. Bound rbp from
above and require 8-byte alignment.

That second one masks other bugs: getcallerpcs() runs on every lock
acquisition and again from the trap handler, so a walker that can
fault replaces a real diagnosis with a bogus one.

Baseline on the Fedora laptop is now green: make ports, make,
make schfs-check including the round-trip that had never run, and
bootcheck at 27/27 plus 108 [ok] across the extended suites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 19:29:21 +02:00
..
console.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
dma.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
kalloc.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
main.c boot: separate BIOS from UEFI 2026-08-09 16:00:03 +02:00
panic.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
qr.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
sleeplock.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
spinlock.c Fix two bugs the Fedora move exposed 2026-08-09 19:29:21 +02:00
string.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
time.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
uaccess.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00