Ashwin Naren
2d34ebcef9
procfs refactor
2026-01-25 10:50:02 -08:00
Ashwin Naren
aa5a9c7b79
fix typos
2026-01-23 01:26:04 -08:00
Ashwin Naren
8df12a027c
implement truncation
2026-01-18 01:17:19 -08:00
Matthew Leach
3ba7f668d6
libkernel: error: add Interrupted
...
Add the `Interrupted` discriminant for the `KernelError` enum. Also map
it to Linux's `EINTR` error value.
2026-01-17 10:21:17 +00:00
Matthew Leach
4bb3158812
Merge pull request #153 from arihant2math/prctl-updates
...
Implement more of prctl
2026-01-15 12:24:27 +00:00
Matthew Leach
2b55e1d972
sycalls: name_to_handle_at: stub
...
Return EOPNOTSUPP for `sys_name_to_handle_at`.
2026-01-14 14:24:35 -08:00
Ashwin Naren
3e60a57d67
implement xattr syscalls
2026-01-14 10:51:48 -08:00
Ashwin Naren
82993b05d3
implement PR_CAPBSET_DROP, PR_GET_SECUREBITS, PR_GET_NO_NEW_PRIVS, and PR_CAP_AMBIENT
2026-01-13 23:52:36 -08:00
Ashwin Naren
ff13b392f1
some support for ext4 writing
2026-01-13 16:47:51 -08:00
Ashwin Naren
cff5005c06
execute scripts
...
checks for shebang and executes the specified program
2026-01-12 14:23:49 -08:00
Matthew Leach
64bc004cdb
process: sys_wait4: return ECHILD with no children
...
If the calling process has no children and no pending exit events to
handle, return ECHILD instead of waiting forever.
2026-01-11 19:23:47 -08:00
Ashwin Naren
15c70a1aea
ext4 timestamps
2026-01-10 10:11:52 -08:00
Matthew Leach
bb8b3fec29
libkernel: ext4: add inode id to metadata
...
Add the proper inode and fs id to the `FileAttr` struct returned by
`getattr`. This prevents the dynamic loader from skipping files which it
considers to be hard-links (share the same inode ID).
2026-01-06 08:52:52 -08:00
Ashwin Naren
f0771dde4f
exec with interpreter
2026-01-06 08:52:52 -08:00
Matthew Leach
957e3f04cf
libkernel: waker_set: allow data to be associted
...
Allow data to be associated with a waker set. This allows discriminating
upon which wakes should be woken up via the new `wake_if` function.
2026-01-03 14:36:06 -08:00
Matthew Leach
d8bcc015de
arch: arm64: detect kernel stack overflow condition
...
Currently, when a kernel stack overflow occures, the exception handler
blindly attempts to write the current context to the stack. If the SP
isn't valid this causes another fault, and so on - locking up the
system.
This commit re-arranges the stack layout, performs SP validation before
usage and switches to an emergency stack when SP isn't valid. This
allows the handler to run and panic gracefully.
Fixes : #98
2026-01-03 14:33:51 -08:00
Ashwin Naren
477215e641
optimize lookup
2026-01-02 17:01:02 -08:00
Ashwin Naren
8677d7a404
support readlink
2026-01-02 17:01:02 -08:00
Ashwin Naren
9d8379c311
fix readdir
2026-01-02 17:01:02 -08:00
Ashwin Naren
d14d2ff355
add note about lookup being suboptimal
2026-01-02 17:01:02 -08:00
Ashwin Naren
dcd74e4e73
optimize read_at
2026-01-02 17:01:02 -08:00
Ashwin Naren
b5138c30f9
working ext4
2026-01-02 17:01:02 -08:00
ootinnyoo
fe4f3103dc
implement linux-like process capabilities
2025-12-29 13:53:02 -08:00
Ashwin Naren
74bc44a317
update dependencies
2025-12-29 12:03:32 -08:00
Matthew Leach
9c8571c2f7
per_cpu: make reentrant-safe
...
Disable interrupts on per_cpu guards, ensuring that critical-sections
are reentrant-safe.
2025-12-28 23:38:24 -08:00
ootinnyoo
caf1d923c8
implement sys_syncfs, sys_fsync, and sys_fdatasync
2025-12-28 15:55:12 -05:00
ootinnyoo
d2723b716c
implement sys_statx
2025-12-28 10:41:15 -08:00
ootinnyoo
e31d1a05e8
move emptiness check to fs
2025-12-26 16:52:08 -08:00
ootinnyoo
aa29951c2d
implement sys_renameat and sys_renameat2
2025-12-26 16:52:08 -08:00
ootinnyoo
70e81b39f4
add support for symlinks
2025-12-25 00:46:40 -08:00
someone
2a1bb1cdde
implement hardlinking ( #88 )
2025-12-24 09:43:12 -08:00
Matthew Leach
efe34026fa
Merge pull request #81 from arihant2math/mutex-timeouts
2025-12-24 08:08:20 +00:00
someone
3aef9a4e15
add chown/chmod ( #84 )
2025-12-23 15:19:25 -08:00
Ashwin Naren
c4f1d9acf5
support timeouts for futex
2025-12-23 13:08:37 -08:00
Matthew Leach
f7a02c6ccb
libkernel: wakerset: add contains_token
...
Add a way to check whether the wakerset contains a token.
2025-12-23 10:21:30 -08:00
Matthew Leach
ca787aa4c3
libkernel: waker_set: return whether a waker was woken
...
Make `wake_one()` return `true` indicating whether a waker was woken
from the set, `false` otherwise.
2025-12-23 10:21:30 -08:00
ootinnyoo
8f00af7587
implement sys_fchdir
2025-12-22 18:34:22 -05:00
Ashwin Naren
3fbb56098c
futex impl
...
# Conflicts:
# usertest/src/main.rs
2025-12-21 01:43:54 -08:00
Ashwin Naren
cd6d830ae9
Initial proc fs ( #70 )
2025-12-21 01:37:14 -08:00
Ashwin Naren
35a6caa541
Implement sys_sysinfo ( #71 )
2025-12-20 15:42:08 -08:00
Ashwin Naren
781b9b5c3f
implement mkdir and unlink
...
rm, mkdir and rmdir now work in tmpfs
2025-12-18 15:35:09 +00:00
Matthew Leach
9db6162414
formatting
2025-12-17 20:04:31 -08:00
Matthew Leach
8bc271c266
fs: open: pass create mode parameter
...
Pass the `mode` parameter to the open VFS call, specifying the
permissions of the file when O_CREAT is specified.
2025-12-17 20:04:31 -08:00
Matthew Leach
bebee6d8f5
libkernel: address: ensure to_pfn can only be called on PA
...
calculating a PFN from a VA makes no sense since it could be mapped to
any address. Therefore, ensure that it can *only* be called on PAs.
2025-12-17 20:04:31 -08:00
Matthew Leach
a867493fa7
page_alloc: make test fixture public
...
Having the ability to use the `FrameAlloctor`, simulating via the heap
is a very useful pattern when testing libkernel code. Make the test
fixture public for other modules to use.
2025-12-17 20:04:31 -08:00
Matthew Leach
54f2d683b8
libkernel: move ClaimedPage into libkernel crate
...
By moving `ClaimedPage` into libkernel we can utilise it in
arch-agonstic ode.
2025-12-17 20:04:31 -08:00
Matthew Leach
c1bea5ecbb
tmpfs: new
...
Add basic directory inode implementation and tmpfs filesystem
implementation.
2025-12-17 20:04:31 -08:00
Matthew Leach
ba7848fc8b
libkernel: CpuOps: add 'static trait bound
...
The CpuOps trait should never hold a reference to any other object. In
fact, it should be a singleton object which is constructed at kernel
boot and live for the entire lifetime of the system. Therefore, it's
safe to add the `'static` trait bound.
2025-12-17 20:04:31 -08:00
Matthew Leach
b8edd4af68
fat32: downcase 8.3 filenames
...
Using mtools to prepare the initrd image results in an image that
exclusively uses 8.3 filenames; as per the spec, the 8.3 filenames are
stored uppercase. However, on most UNIX systems, people are used to
dealing with down-case names; therefore convert the strings to
lower-case before passing back to the user.
2025-12-14 06:38:42 +00:00
Matthew Leach
910203e0c2
syscalls: mprotect: implement
...
Implement the `mprotect` syscall. Including a bunch of tests for
ensuring proper VMA functionality regarding splitting and merging via
`mprotect`.
2025-11-30 20:13:36 +00:00