Commit Graph

448 Commits

Author SHA1 Message Date
Matthew Leach
ebd893bcaa Merge pull request #246 from hexagonal-sun/virtio-rng
virtio rng
2026-03-07 07:37:08 +00:00
Matthew Leach
4a98779020 Add virtio-rng driver and ProbeError::NoMatch for silent probe skipping
Add a virtio-rng entropy source driver that registers with the kernel
RNG subsystem. Introduce `ProbeError::NoMatch` so virtio drivers can
silently reject empty or wrong-type MMIO slots without spamming the boot
log with fatal errors or leaving devices stuck in the deferred queue.
2026-03-07 07:33:31 +00:00
Matthew Leach
70ce893daf rand: add EntropySource
Add an `EntropySource` trait which allows the `EntropyPool` to pull
entropy from various sources.
2026-03-07 07:33:18 +00:00
Matthew Leach
79b2df5bf4 tty: add entropy
Add entropy to the entropy pool when processing input on TTYs.
2026-03-07 07:33:18 +00:00
Matthew Leach
65517c6641 Add BLAKE2s entropy pool with per-CPU ChaCha20 CSPRNG
Replace the single `SmallRng` with a proper two-layer RNG architecture:

- Global BLAKE2s-256 entropy pool that accumulates entropy and gates
  seed extraction behind a 256-bit threshold.
- Per-CPU ChaCha20Rng instances that are lazily seeded from the pool on
  first use and periodically reseed every 1 MB by XOR-ing a fresh BLAKE2
  extract with 32 bytes of their own output.

The /dev/random chardev uses fill_random_bytes directly instead of
routing through the syscall layer.
2026-03-07 07:33:15 +00:00
Matthew Leach
0e7b342d0a Merge pull request #250 from arihant2math/fix-clippy-again
Fix clippy again
2026-03-07 07:27:06 +00:00
Ashwin Naren
64f320c7c7 fix clippy again 2026-03-06 19:46:38 -08:00
Ashwin Naren
a3a324148e Socket implementation (#127) 2026-03-06 18:54:36 -08:00
Matthew Leach
594a1287ea only enable core_intrinsics when testing 2026-03-06 13:13:31 -08:00
Ashwin Naren
1523b9ccef switch to crates.io ext4plus 2026-03-04 15:48:18 -08:00
Ashwin Naren
f7757325ca fix panic if no display exists 2026-03-04 12:13:01 -08:00
Ashwin Naren
697254d7a9 address review 2026-03-04 12:13:01 -08:00
Ashwin Naren
4588e61aef GPU support with virtio driver 2026-03-04 12:13:01 -08:00
Matthew Leach
172ac28126 Merge pull request #244 from arihant2math/fix-arch-ls
Distinguish between file permissions and file mode
2026-03-03 07:33:21 +00:00
Matthew Leach
7c007b7c9f Merge pull request #243 from arihant2math/fix-justfile
Fix justfile
2026-03-03 07:31:24 +00:00
Ashwin Naren
edca499714 distinguish between file permissions and file mode 2026-03-02 11:53:06 -08:00
Ashwin Naren
28c1ca3fa3 fix justfile 2026-03-02 09:48:28 -08:00
Matthew Leach
d164e06558 Merge pull request #241 from TroyNeubauer/handle-sigsev 2026-03-02 06:17:23 +00:00
Troy Neubauer
15605b11ef no pub on location 2026-03-01 04:26:49 -08:00
Troy Neubauer
5cdeb82dfa clippy 2026-03-01 04:23:47 -08:00
Troy Neubauer
c180f1ca24 stack overflow test 2026-03-01 03:59:38 -08:00
Troy Neubauer
1bcd8b90ae Merge remote-tracking branch 'upstream/master' into handle-sigsev 2026-03-01 03:32:47 -08:00
Matthew Leach
912dc0f713 Merge pull request #239 from arihant2math/get-process-api 2026-03-01 05:55:17 +00:00
Matthew Leach
0105caf8dc Merge pull request #238 from TroyNeubauer/add-nix-shell 2026-03-01 05:53:27 +00:00
Ashwin Naren
ce27c4bc36 add find_process_by_tgid 2026-02-28 17:09:07 -08:00
Troy Neubauer
fc3e39fb54 Merge branch 'add-nix-shell' of github.com:TroyNeubauer/moss-kernel into add-nix-shell 2026-02-28 16:34:15 -08:00
Troy Neubauer
d28959937f update to 2-24 toolchain to avoid rust-analyzer #21715 2026-02-28 16:32:10 -08:00
Troy Neubauer
17769108dd Update flake.nix
Co-authored-by: Ashwin Naren <arihant2math@gmail.com>
2026-02-28 13:16:41 -08:00
Troy Neubauer
6a0fb71cb6 Update flake.nix
Co-authored-by: Ashwin Naren <arihant2math@gmail.com>
2026-02-28 13:16:25 -08:00
Troy Neubauer
07044d1c4c add nix shell 2026-02-28 12:11:59 -08:00
Troy Neubauer
6a7c40c545 un-register rust's SIGSEV handler in test 2026-02-28 11:53:08 -08:00
Matthew Leach
e114a64a82 Merge pull request #237 from arihant2math/sigsev
Handle SIGSEVs correctly
2026-02-28 19:19:46 +00:00
Troy Neubauer
704f4e05f0 segfault properly 2026-02-28 10:32:05 -08:00
Ashwin Naren
c35982c9ea deliver signal to process on sig sev instead of panicking 2026-02-27 17:24:24 -08:00
Matthew Leach
7ab93dc0c1 Merge pull request #232 from arihant2math/dep-bump
Bump dependencies + more ext4 writing
2026-02-27 21:35:22 +00:00
Matthew Leach
5dda21c14a Merge pull request #235 from arihant2math/python-qemu-runner
Replace `qemu-runner.sh` with python script
2026-02-27 21:33:10 +00:00
Ashwin Naren
bd5235fc71 fix rename semantics 2026-02-26 23:14:31 -08:00
Ashwin Naren
2ecfda3cb9 fix unneeded inode cloning 2026-02-26 23:14:31 -08:00
Ashwin Naren
93e540bc5c support symlink creation 2026-02-26 23:14:31 -08:00
Ashwin Naren
f354fa7eaf implement rename_from 2026-02-26 23:14:31 -08:00
Ashwin Naren
1d5fb030b4 support directory creation 2026-02-26 23:14:31 -08:00
Ashwin Naren
357707fdb9 flock noop 2026-02-26 23:14:31 -08:00
Ashwin Naren
c77ea09264 support file writing beyond block boundaries 2026-02-26 23:14:31 -08:00
Ashwin Naren
d21c449b5c support file creation 2026-02-26 23:14:31 -08:00
Ashwin Naren
28e3f4ab02 support linking and unlinking 2026-02-26 23:14:31 -08:00
Ashwin Naren
b28d2baa7f bump dependencies and use workspace dependencies when possible 2026-02-26 23:14:31 -08:00
Ashwin Naren
2667a47aac fix CI 2026-02-26 22:01:39 -08:00
Ashwin Naren
162c0d9335 use python script to run qemu instead of shell script 2026-02-26 22:01:39 -08:00
Matthew Leach
6b8469b02f Merge pull request #236 from arihant2math/fix-clippy 2026-02-27 05:55:04 +00:00
Ashwin Naren
de358db4c4 fix clippy 2026-02-26 17:11:10 -08:00