Commit Graph

415 Commits

Author SHA1 Message Date
Troy Neubauer
704f4e05f0 segfault properly 2026-02-28 10:32:05 -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
Matthew Leach
95dbf4f4f2 drviers: chrdev: random: new
Add a new chardev which implements /dev/random.
2026-02-25 15:23:18 -08:00
Matthew Leach
d85293f5a7 Merge pull request #231 from hexagonal-sun/fix-miri-smalloc-errors 2026-02-23 06:05:46 +00:00
Matthew Leach
91cde85422 libkernel: smalloc: fix Miri errors
Miri is failing the smalloc tests due to poorly written tests, mainly
due to the fact that raw pointers were derived from mutable refs.  Fixup
the tests to use the global allocator funcitons directly.
2026-02-23 05:34:03 +00:00
Matthew Leach
39a5ef331d libkernel/slab: fix UB and accounting bugs identified by Miri
Fix several issues in the slab allocator identified by the heap stress
tests (intermittent) and running the tests under Miri.

1. Fix Undefined Behavior. Previously, the allocator created temporary
   `&mut Frame` references while raw pointers to that frame existed in the
   intrusive `partial` or `free` lists. Under Miri's strict aliasing rules,
   creating a unique reference to the whole struct invalidated the list
   pointers.

   The fix implements "split borrowing": we now maintain raw pointers to
   the frame and only create mutable references to the `.state` field
   when needed, ensuring the `.link` field remains valid for the
   intrusive list.

2. Fix `free_list_sz` accounting. In `try_alloc`, the `free_list_sz`
   counter was not being decremented when a slab was successfully popped
   from the free list. This caused the allocator to believe it had free
   slabs when the list was actually empty, leading to panics during
   batch-free operations.

3. Increase heap stress tests. The test suite now runs the stress test
   in a loop to catch state persistence bugs and ensures the allocator is
   fully torn down and reset between iterations.

Fixes: #220
2026-02-21 14:38:18 -08:00
Matthew Leach
e60cede2ba Merge pull request #228 from arihant2math/proc-macros
Make `ktest` a proc macro and remove docker from CI
2026-02-21 21:55:07 +00:00
Ashwin Naren
1974b04c1c fix some ump warnings and disable -Dwarnings in testing CI 2026-02-20 14:33:58 -08:00
Ashwin Naren
9f5311e788 post-rebase fixes 2026-02-20 14:31:19 -08:00
Ashwin Naren
076c17edaa remove docker from gh actions 2026-02-20 14:27:40 -08:00
Ashwin Naren
d188bff87e add to justfile 2026-02-20 14:27:40 -08:00
Ashwin Naren
c6ba98decf initial macro system 2026-02-20 14:27:39 -08:00
Andrew Mackenzie
b142fb74ec Merge pull request #227 from andrewdavidmackenzie/master
Rework uname to avoid hardcoded datetime and add unit tests

Restructure `uname` so that:
- there is an internal function that does the main logic and can be tested by unit tests
- Generate an env var in build.rs that is the actual build datetime timestamp
- Avoid hardcoded date in the version string
- Use the timestamp in the building of `uname` response, so the data is the actual build time
- add a simple unit test for the sysname field
- add more complex test for the version field that checks the date formatting (not exhaustively)

NOTE: The build timestamp can be used by any other function, syscall or part of the code if required.
2026-02-20 14:23:59 -08:00
Ashwin Naren
94018295da use sh instead of bash to fix CI 2026-02-19 22:42:40 -08:00
Matthew Leach
ad83ece9da Merge pull request #225 from arihant2math/new-image-scripts 2026-02-20 04:53:06 +00:00
Matthew Leach
2ee681ef02 Merge pull request #223 from arihant2math/unit-testing 2026-02-20 04:52:31 +00:00
Ashwin Naren
637c7a8495 Revert "redo the build system"
This reverts commit 39eb5842d1.
2026-02-19 12:55:10 -08:00
Ashwin Naren
39eb5842d1 redo the build system
- use alpine for default image
- use just to run commands
2026-02-19 12:53:07 -08:00
Ashwin Naren
37def9264e implement copy_file_range 2026-02-19 12:51:20 -08:00
Ashwin Naren
600f228d69 address review 2026-02-19 12:51:11 -08:00
Ashwin Naren
2fa3b490d3 implement rwlock 2026-02-19 12:51:11 -08:00
Ashwin Naren
df6b32fbf8 partial proc fd file support 2026-02-19 12:50:31 -08:00
Ashwin Naren
303041553a ensure pass on CI 2026-02-19 10:15:30 -08:00
Ashwin Naren
d2d1ba2cbf async unit testing 2026-02-19 09:56:59 -08:00
Ashwin Naren
a7e8f07686 unit testing 2026-02-18 22:23:40 -08:00
Ashwin Naren
a120732564 Merge pull request #219 from arihant2math/settime
Implement `clock_settime` syscall
2026-02-17 21:18:48 -08:00
Ashwin Naren
b087928ef5 redo the build system
- use alpine for default image
- use just to run commands
2026-02-16 09:54:31 -08:00
Ashwin Naren
6e0d5ef43a implement clock_settime 2026-02-15 22:05:10 -08:00
Matthew Leach
ba0ff25b20 Merge pull request #203 from arihant2math/statfs
Implement `sys_statfs` and `sys_fstatfs`
2026-02-15 20:05:13 +00:00
Matthew Leach
d85fe47374 Merge pull request #209 from arihant2math/update-ext4
Update ext4-view fork
2026-02-15 19:52:07 +00:00
Matthew Leach
a1a15c70b2 Merge pull request #212 from arihant2math/lint-libkernel
Enable clippy lints for libkernel that were only enabled for moss
2026-02-15 19:50:26 +00:00
Ashwin Naren
ba88aa9d0a Merge pull request #214 from FeltMacaroon389/FeltMacaroon389-patch-1
minor changes in consistency and formatting of terms
2026-02-15 11:42:46 -08:00
Ashwin Naren
7567d148d8 Merge pull request #216 from andrewdavidmackenzie/fix-macos-scripts
Fix macos scripts
2026-02-15 11:08:27 -08:00
Andrew Mackenzie
f8a6c0c3d5 Small typo fix 2026-02-15 16:17:50 +01:00
Andrew Mackenzie
b4bdbc387e Add additional markup for command lines. This allows some editors/IDEs to be able to invoke it with a click on a run button beside the text 2026-02-15 16:17:03 +01:00