Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 117 additions & 133 deletions KNOWLEDGE_BASE.md

Large diffs are not rendered by default.

29 changes: 18 additions & 11 deletions issues/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@

| Metric | Value |
|--------|-------|
| Stars | 1 |
| Clones (last 14 days) | 528 |
| Open Issues | 0 |
| Total Issues | 0 |
| Dependabot Open Alerts | 1 |
| CodeScan Open Alerts | 1 |
| Stars | 2 |
| Clones (last 14 days) | 1888 |
| Open Issues | 4 |
| Total Issues | 3 |
| Dependabot Open Alerts | 0 |
| CodeScan Open Alerts | 8 |

## Issues

## Dependabot Alerts
- [Dependabot #0](./dependabot/alert_0.md) - unknown (N/A) - unknown
- [#22](./issue_22.md) - Isolation: full namespaces beyond seccomp/rlimit/nice (open)
- [#21](./issue_21.md) - SMP: per-AP LAPIC timer calibration (remove BSP tick dependency) (open)
- [#20](./issue_20.md) - MiniFS: crash consistency (journaling or ordered-write guarantees) (open)

## Code Scanning Alerts
- [CodeScan #0](./codescan/alert_0.md) - N/A (N/A) - unknown
- [CodeScan #24](./codescan/alert_24.md) - cpp/wrong-type-format-argument (error) - open
- [CodeScan #23](./codescan/alert_23.md) - cpp/wrong-type-format-argument (error) - open
- [CodeScan #22](./codescan/alert_22.md) - cpp/wrong-type-format-argument (error) - open
- [CodeScan #21](./codescan/alert_21.md) - cpp/integer-multiplication-cast-to-long (warning) - open
- [CodeScan #20](./codescan/alert_20.md) - cpp/integer-multiplication-cast-to-long (warning) - open
- [CodeScan #19](./codescan/alert_19.md) - cpp/integer-multiplication-cast-to-long (warning) - open
- [CodeScan #18](./codescan/alert_18.md) - cpp/toctou-race-condition (warning) - open
- [CodeScan #17](./codescan/alert_17.md) - cpp/command-line-injection (error) - open

Total issues downloaded: 0
Total issues downloaded: 3
10 changes: 0 additions & 10 deletions issues/codescan/alert_0.md

This file was deleted.

10 changes: 10 additions & 0 deletions issues/codescan/alert_17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #17: cpp/command-line-injection

- **State:** open
- **Severity:** error
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/17

## Description
Uncontrolled data used in OS command
10 changes: 10 additions & 0 deletions issues/codescan/alert_18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #18: cpp/toctou-race-condition

- **State:** open
- **Severity:** warning
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/18

## Description
Time-of-check time-of-use filesystem race condition
10 changes: 10 additions & 0 deletions issues/codescan/alert_19.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #19: cpp/integer-multiplication-cast-to-long

- **State:** open
- **Severity:** warning
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/19

## Description
Multiplication result converted to larger type
10 changes: 10 additions & 0 deletions issues/codescan/alert_20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #20: cpp/integer-multiplication-cast-to-long

- **State:** open
- **Severity:** warning
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/20

## Description
Multiplication result converted to larger type
10 changes: 10 additions & 0 deletions issues/codescan/alert_21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #21: cpp/integer-multiplication-cast-to-long

- **State:** open
- **Severity:** warning
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/21

## Description
Multiplication result converted to larger type
10 changes: 10 additions & 0 deletions issues/codescan/alert_22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #22: cpp/wrong-type-format-argument

- **State:** open
- **Severity:** error
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/22

## Description
Wrong type of arguments to formatting function
10 changes: 10 additions & 0 deletions issues/codescan/alert_23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #23: cpp/wrong-type-format-argument

- **State:** open
- **Severity:** error
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/23

## Description
Wrong type of arguments to formatting function
10 changes: 10 additions & 0 deletions issues/codescan/alert_24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Scanning Alert #24: cpp/wrong-type-format-argument

- **State:** open
- **Severity:** error
- **Tool:** CodeQL
- **Created:** 2026-09-09T21:03:30Z
- **URL:** https://github.com/grisuno/miniOS/security/code-scanning/24

## Description
Wrong type of arguments to formatting function
13 changes: 0 additions & 13 deletions issues/dependabot/alert_0.md

This file was deleted.

10 changes: 10 additions & 0 deletions issues/issue_20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Issue #20: MiniFS: crash consistency (journaling or ordered-write guarantees)

- **State:** open
- **Created:** 2026-09-10T03:54:42Z
- **Updated:** 2026-09-10T03:54:42Z
- **Labels:** enhancement,filesystem

---

MiniFS has no journal. A power loss / QEMU kill between a data-block write and the block/inode bitmap sync in kfclose (minifs_sync) can leave allocated blocks unreferenced or a directory entry pointing at a partially written inode.\n\nScope: define the smallest crash-consistency contract worth having for a teaching FS (ordered writes + sync-on-close audit vs full WAL), then implement + add a host fault-injection test.\n\nContext: fs/minifs.c, kfclose path, docs/adr/ (new ADR when decided).
10 changes: 10 additions & 0 deletions issues/issue_21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Issue #21: SMP: per-AP LAPIC timer calibration (remove BSP tick dependency)

- **State:** open
- **Created:** 2026-09-10T03:54:52Z
- **Updated:** 2026-09-10T05:00:13Z
- **Labels:** enhancement,smp

---

APs have no timer of their own by design: the only AP tick is the BSP 100 Hz IPI broadcast (smp.c). A per-AP LAPIC timer would allow decentralized scheduling, but a LAPIC count derived from PIT_HZ fires ~84 kHz under QEMU and wedges the machine (measured 2.6x slowdown + 176 percent host CPU on idle guest) — see CLAUDE.md SMP section.\n\nScope: proper per-AP calibration (divide-by + initial-count from PIT or TSC-deadline), storm guard, BDD proof (smp counters per CPU). Do NOT just divide PIT_HZ into the LAPIC.
10 changes: 10 additions & 0 deletions issues/issue_22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Issue #22: Isolation: full namespaces beyond seccomp/rlimit/nice

- **State:** open
- **Created:** 2026-09-10T03:54:52Z
- **Updated:** 2026-09-10T03:54:52Z
- **Labels:** enhancement,isolation

---

ABI v4 already ships SECCOMP (238, deny/allow per-syscall), RLIMIT (240: AS bytes, CPU ticks, NOFILE) and NICE (239, fair-share) — see docs/ABI.md and kernel/syscalls.c dispatch. What is missing vs Linux: mount/pid/net namespaces, i.e. a compromised ring-3 process still sees the single shared filesystem and process table.\n\nScope: decide the namespace subset that fits the single-address-space model (per-process CR3 is the documented Phase 5 prerequisite in CLAUDE.md); implement incrementally behind ABI version bump + _Static_asserts in kernel.c.
57 changes: 36 additions & 21 deletions readmenator-agent/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -25435,43 +25435,43 @@ Z_DumpHeap
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### init_env (function) `static Env *init_env(Runtime *rt)`
- Defined: `progs/lisp/lisp.c:2005`
- Defined: `progs/lisp/lisp.c:2004`
- Doc: Build the global environment with arithmetic, strings, files and MiniOS.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### bind_argv (function) `static void bind_argv(Runtime *rt, Env *env, int argc, char **argv, int first)`
- Defined: `progs/lisp/lisp.c:2018`
- Defined: `progs/lisp/lisp.c:2017`
- Doc: Expose the script argument vector as a proper list of strings.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### read_all_file (function) `static char *read_all_file(const char *filename, size_t max_bytes)`
- Defined: `progs/lisp/lisp.c:2030`
- Defined: `progs/lisp/lisp.c:2029`
- Doc: Read a whole file into memory with a hard size cap.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### process_source (function) `static int process_source(Runtime *rt, const char *source,
const char *source_name, bool echo)`
- Defined: `progs/lisp/lisp.c:2088`
- Defined: `progs/lisp/lisp.c:2087`
- Doc: Evaluate every form in a source buffer and report the first failure.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### process_inline (function) `static int process_inline(Runtime *rt, const char *code)`
- Defined: `progs/lisp/lisp.c:2130`
- Defined: `progs/lisp/lisp.c:2129`
- Doc: Evaluate one inline expression from the -e flag.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### print_usage (function) `static void print_usage(Runtime *rt)`
- Defined: `progs/lisp/lisp.c:2137`
- Defined: `progs/lisp/lisp.c:2136`
- Doc: Print usage for the command line interface.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### repl (function) `static int repl(Runtime *rt)`
- Defined: `progs/lisp/lisp.c:2144`
- Defined: `progs/lisp/lisp.c:2143`
- Doc: Run the interactive read-eval loop on the runtime input stream.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

### main (function) `int main(int argc, char **argv)`
- Defined: `progs/lisp/lisp.c:2191`
- Defined: `progs/lisp/lisp.c:2190`
- Doc: Entry point with -e, script and REPL modes plus bounded arguments.
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

Expand Down Expand Up @@ -25527,6 +25527,11 @@ Z_DumpHeap
- Defined: `progs/lisp/lisp.c:1852`
- Depends on: `kernel/string.c`, `progs/minios_abi.h`

## progs/lisp/tin.c

### main (function) `int main()`
- Defined: `progs/lisp/tin.c:1`

## progs/lua/lua_main.c

### luaL_require_global (function) `static void luaL_require_global(lua_State *L, const char *name,
Expand Down Expand Up @@ -32708,6 +32713,12 @@ Z_DumpHeap
### mutant (function)
- Defined: `tools/lisp_scoped.sh:20`

### lisp_mut (function)
- Defined: `tools/lisp_scoped.sh:41`

### mut_usage (function)
- Defined: `tools/lisp_scoped.sh:63`

## tools/minifs_saves.py

### u16 (function) `def u16(d, o)`
Expand Down Expand Up @@ -33199,54 +33210,58 @@ Z_DumpHeap
## tools/test_lisp.py

### build_binary (method) `def build_binary(source, output)`
- Defined: `tools/test_lisp.py:182`
- Defined: `tools/test_lisp.py:308`
- Doc: Compile the interpreter with warnings promoted to errors.

### main (method) `def main()`
- Defined: `tools/test_lisp.py:195`
- Defined: `tools/test_lisp.py:321`
- Doc: Parse arguments, build the binary and drive the suite.

### __init__ (method) `def __init__(self, binary, suite)`
- Defined: `tools/test_lisp.py:38`
- Defined: `tools/test_lisp.py:40`

### check (method) `def check(self, name, actual, expected)`
- Defined: `tools/test_lisp.py:45`
- Defined: `tools/test_lisp.py:47`
- Doc: Assert one observed value equals the expectation.

### run_expr (method) `def run_expr(self, code)`
- Defined: `tools/test_lisp.py:56`
- Defined: `tools/test_lisp.py:58`
- Doc: Evaluate one inline expression and capture output.

### check_eval (method) `def check_eval(self, name, code, stdout)`
- Defined: `tools/test_lisp.py:63`
- Defined: `tools/test_lisp.py:65`
- Doc: Assert an inline expression prints exactly the expectation.

### check_error (method) `def check_error(self, name, code, fragment)`
- Defined: `tools/test_lisp.py:68`
- Defined: `tools/test_lisp.py:70`
- Doc: Assert an inline expression fails closed with a diagnostic.

### run_all (method) `def run_all(self)`
- Defined: `tools/test_lisp.py:74`
- Defined: `tools/test_lisp.py:76`
- Doc: Drive every assertion vector in sequence.

### check_file_roundtrip (method) `def check_file_roundtrip(self)`
- Defined: `tools/test_lisp.py:118`
- Defined: `tools/test_lisp.py:121`
- Doc: Assert a file write and read roundtrip through the interpreter.

### check_exit_code (method) `def check_exit_code(self)`
- Defined: `tools/test_lisp.py:132`
- Defined: `tools/test_lisp.py:135`
- Doc: Assert a nonzero exit status survives the cleanup path.

### check_cli (method) `def check_cli(self)`
- Defined: `tools/test_lisp.py:139`
- Defined: `tools/test_lisp.py:142`
- Doc: Assert version, help, unknown flag and missing file behaviors.

### check_suite_language_only (method) `def check_suite_language_only(self)`
- Defined: `tools/test_lisp.py:156`
- Defined: `tools/test_lisp.py:159`
- Doc: Assert the shipped in-OS suite passes its language section.

### check_minigcc_subset (method) `def check_minigcc_subset(self)`
- Defined: `tools/test_lisp.py:177`
- Doc: Assert the Lisp subset compiler covers expr codegen end to end.

### report (method) `def report(self)`
- Defined: `tools/test_lisp.py:174`
- Defined: `tools/test_lisp.py:300`
- Doc: Print the totals and return the process exit status.

## tools/test_sb16.sh
Expand Down
1 change: 1 addition & 0 deletions readmenator-agent/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2963,6 +2963,7 @@
- `tools/test_gui_zoom.py` -> `time`
- `tools/test_lisp.py` -> `argparse`
- `tools/test_lisp.py` -> `os`
- `tools/test_lisp.py` -> `shutil`
- `tools/test_lisp.py` -> `subprocess`
- `tools/test_lisp.py` -> `sys`
- `tools/test_lisp.py` -> `tempfile`
Expand Down
7 changes: 4 additions & 3 deletions readmenator-agent/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@
| `progs/doomgeneric/z_zone.h` | Copyright(C) 1993-1996 Id Software, Inc. Copyright(C) 2005-2014 Simon Howard Th | doomgeneric | 13 |
| `progs/file/file.c` | Docstring: MiniOS file browser (Nuklear ring-3 app, MiniFS: file/file.elf). | misc | 73 |
| `progs/freedomui/freedomui_minios.c` | freedomui_minios - Real FreeDom browser on MiniOS, DOOM/Q2G pattern. | misc | 47 |
| `progs/lisp/lisp.c` | - | misc | 116 |
| `progs/lisp/lisp.c` | - | lisp | 116 |
| `progs/lisp/tin.c` | - | lisp | 1 |
| `progs/lua/lua_main.c` | - | lua | 25 |
| `progs/lua/minios.c` | - | lua | 27 |
| `progs/micropython/variants/minios/lib/__init__.py` | MiniOS frozen library package. | lib | 0 |
Expand Down Expand Up @@ -446,7 +447,7 @@
| `tools/gen_icons.py` | - | tools | 3 |
| `tools/gen_zip_fixtures.py` | - | tools | 2 |
| `tools/kernel_feature_survey.py` | - | tools | 8 |
| `tools/lisp_scoped.sh` | Docstring: Scoped Lisp validation for the MiniOS interpreter contract. Builds th | tools | 3 |
| `tools/lisp_scoped.sh` | Docstring: Scoped Lisp validation for the MiniOS interpreter contract. Builds th | tools | 5 |
| `tools/minifs_saves.py` | - | tools | 21 |
| `tools/minios_cli.py` | - | tools | 6 |
| `tools/minios_gui.py` | - | tools | 9 |
Expand All @@ -463,7 +464,7 @@
| `tools/test_gui_menu.py` | - | tools | 1 |
| `tools/test_gui_wm.py` | - | tools | 17 |
| `tools/test_gui_zoom.py` | - | tools | 1 |
| `tools/test_lisp.py` | - | tools | 15 |
| `tools/test_lisp.py` | - | tools | 16 |
| `tools/test_sb16.sh` | test_sb16.sh — targeted BDD harness for the SB16 audio path. Boots the disk ima | tools | 1 |
| `tools/wm_layout_sync.py` | - | tools | 17 |
| `tools/wm_scoped.sh` | Docstring: Scoped WM validation for Alt-Tab and tile across all windows. Runs ho | tools | 2 |
Expand Down
Loading
Loading