From 2e3deb539001789d41e14acfd363bea70c68bfc4 Mon Sep 17 00:00:00 2001 From: Nexoniarz Date: Mon, 26 Oct 2026 18:06:38 +0100 Subject: [PATCH] Name the process behind 'permission denied'; record what is unfinished Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01EVRhxi9zpdW2uDUN4FVcao --- docs/plan/roadmap.md | 29 +++++++++++++++++++++++++++++ kernel/fs/file.c | 9 +++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/plan/roadmap.md b/docs/plan/roadmap.md index 9f3da6f..15eae1e 100644 --- a/docs/plan/roadmap.md +++ b/docs/plan/roadmap.md @@ -164,3 +164,32 @@ Not phases, and each one improves everything above it: - TrueType hinting. - DRM/KMS as a *kernel* subsystem; the GPU plan serves `/dev/dri` from a process. + +## Unfinished, as of 2026-10-26 + +Left where it stood; none of it is hidden by the code. + +- **`startx` as root fails.** The image now has only root, and in QEMU `startx` + ends with `xinit: unable to connect to X server: Bad file descriptor` and + writes `/var/log/Xorg.0.log` (not `~/.local/share/xorg/`). It worked as the + old `schos` user. The cause has not been looked at; start with that log. +- **Window Maker on the laptop hung** (no cursor movement, no exit, no VT + switch) while Xorg was using `xf86-input-libinput`. That package is out of the + image again; whether Xorg's own evdev driver is enough on that machine is not + confirmed. If it still hangs, the `Xorg.0.log` from the machine is what is + needed. +- **ldlsd's crash on real hardware** was a misaligned `movaps` in a variadic + function; LDLS guest code is now built with `-mstackrealign`. Not run on the + laptop since. Two `SchOS: permission denied (write)` lines appear just before + it; the message now names the process and inode so the next log says who. +- **Boot manager pointer**: the cursor is drawn whenever a pointer device + exists, but no click or movement has been seen from a real device (QEMU's USB + mouse never reached the loader). A laptop touchpad is usually not exposed to + UEFI at all. +- **Kernel-side splash**: the loader's splash is in the new style; what vgpud + draws once the kernel is up is still the old mark. +- **USB**: no `/dev/bus/usb` (usbfs), so libusb tools such as plain `lsusb` do + not work (`lsusb -t` does); `uname -r` says `0.1.0`, which libusb refuses; hub + port counts and string descriptors are missing. +- **Terminals**: all twelve ask for a login. There is no longer a login-free + root shell to fall back on if `login` itself breaks. diff --git a/kernel/fs/file.c b/kernel/fs/file.c index d35feaa..a8d9210 100644 --- a/kernel/fs/file.c +++ b/kernel/fs/file.c @@ -2,6 +2,7 @@ #include "core/defs.h" #include "uapi/stat.h" #include "core/param.h" +#include "core/proc.h" #include "fs/fs.h" #include "core/spinlock.h" #include "core/sleeplock.h" @@ -278,7 +279,9 @@ fileread(struct file *f, char *addr, int n) } if((f->ip->rwmode & 2) == 0){ - cprintf("SchOS: permission denied (read)\n"); + cprintf("SchOS: %s (pid %d): permission denied (read) on inode %d:%ld, rwmode %d\n", + myproc()->name, myproc()->pid, (int)f->ip->dev, (long)f->ip->inum, + (int)f->ip->rwmode); iunlock(f->ip); return -1; } @@ -344,7 +347,9 @@ filewrite(struct file *f, char *addr, int n) } if((f->ip->rwmode & 1) == 0){ - cprintf("SchOS: permission denied (write)\n"); + cprintf("SchOS: %s (pid %d): permission denied (write) on inode %d:%ld, rwmode %d\n", + myproc()->name, myproc()->pid, (int)f->ip->dev, (long)f->ip->inum, + (int)f->ip->rwmode); iunlock(f->ip); return -1; }