vasilito
ae03a7e60b
kernel: Linux-compatible /proc/[pid]/stat format
...
Implements proper /proc/[pid]/stat output matching Linux fs/proc/array.c format:
- utime/stime: separate user/kernel CPU time accounting in context switch
- pgrp/session/start_time: process group, session, boot-time start
- proc_rss(): Resident Set Size from page table grant walker
- num_threads: thread-group counting via owner_proc_id filter
- nice: derived from priority (prio/2 - 20)
- proc_stat_line(): proper 52-field /proc/[pid]/stat format
- proc_status_text(): VmSize/VmRSS in kB
Infrastructure:
- require_zero_offset(): EINVAL for non-zero read/write offsets
- validate_kfmap_flags(): KFMAP flag validation (MAP_SHARED/PRIVATE)
- ContextHandle::Ctx: atomic FullContextRegs save/restore
- kwriteoff: offset parameter for regs/ctx/attr/start writes
- try_stop_context: preserve HardBlocked::NotYetStarted status on restore
2026-07-08 17:47:20 +03:00
vasilito
eba85456c1
kernel: expose proc process info
2026-07-08 15:04:42 +03:00
vasilito
9360e493db
kernel: add sys mem resource
2026-07-08 13:59:25 +03:00
vasilito
5aeb2e8631
Fix kernel syscall compile errors
2026-07-08 00:58:19 +03:00
vasilito
d1ddac0e2c
kernel: add openat_into + dup_into for upstream 0.9.0 syscall API
2026-07-08 00:49:03 +03:00
vasilito
e896c0e08b
kernel: add real MSR scheme access
2026-07-08 00:29:43 +03:00
vasilito
a240e73e44
0.3.0: refresh Cargo.lock for latest compatible dependencies
2026-07-06 20:41:35 +03:00
vasilito
ec8e88c364
0.3.0: kernel build fixes - syscall aliases and FADT length type cast
...
- Add SYS_OPENAT/SYS_DUP aliases in local syscall fork for upstream 0.9.0 renamed constants.
- Cast FADT_MIN_SIZE_ACPI_2_0 to u32 to match sdt.length() return type.
- Keep Cargo.lock based on upstream master with only redox_syscall sourced from local fork.
2026-07-06 18:57:41 +03:00
vasilito
ca67b1da37
0.3.0: converge kernel onto upstream master
...
- Rebase all Red Bear kernel changes onto upstream master (4d5d36d4 ).
- Update version to 0.5.12+rb0.3.0 and add Red Bear author attribution.
- Switch redox_syscall direct dependency to local fork path (../syscall).
- Bump rust-toolchain.toml to nightly-2026-05-24.
- Regenerate Cargo.lock for +rb0.3.0 suffixes and path deps.
2026-07-06 18:43:52 +03:00
R Aadarsh
4d5d36d44e
Extract code that is common to both x86 and ARM to srat::init
2026-07-05 20:16:00 +05:30
R Aadarsh
35340a80c4
* Add ACPI-NUMA parsing code for ARM
...
* Fix bug in the x86 code that caused incorrect cpu-node mapping
* Remove the usage of page mappers. Instead use the already existing
linear mapping
2026-07-05 15:01:48 +05:30
R Aadarsh
cb88ed59a2
Parse ACPI tables for NUMA information without allocating from the heap
2026-07-03 20:19:46 +05:30
Wildan M
372cd19b6f
Remove irq from handles on close
2026-07-02 08:41:11 +07:00
R Aadarsh
aa7e7d2f44
Fix the bug in RxsdtIter that caused u32 pointers to be used regardless of ACPI table kind
2026-07-01 10:36:07 -06:00
R Aadarsh
a03c545f3c
Fix build failure for ARM
2026-07-01 10:36:07 -06:00
R Aadarsh
a2a3df33c6
Split acpi::init to perform two stage initialisation
2026-07-01 10:36:07 -06:00
Ibuki Omatsu
6c3d5d28c6
refactor: Move fd allocation logic into userspace
2026-07-01 08:02:47 -06:00
R Aadarsh
8171dc616b
Fix panic due to using uninitialised NUMA_NODES
2026-06-21 14:30:07 +05:30
R Aadarsh
2ad76496c4
* Store addresses as pointers
...
* Remove lots of unsafe code by initialising in the closure passed to
`call_once`
* Remove `NUMBER_OF_DOMAINS` as size can always be inferred from the
hashmap's len
2026-06-21 14:03:49 +05:30
R Aadarsh
4106dcbbfa
Gate behind a feature flag
2026-06-21 14:03:49 +05:30
R Aadarsh
969c905d8e
Account for the case when distance information is not available
2026-06-21 14:03:49 +05:30
R Aadarsh
9ecc75029c
* Correctly put cpus and memories for adoption
...
* Test on x86_64 (works)
2026-06-21 14:03:49 +05:30
R Aadarsh
16c59588b0
* Fix endianness
...
* Remove ITS affinity and numa
2026-06-21 14:03:49 +05:30
R Aadarsh
ee2a61088e
* Parse SLIT for distance information
...
* Order by distance, reorganise domains into nodes
2026-06-21 14:03:49 +05:30
R Aadarsh
63d1171ffb
Initial commit
2026-06-21 14:03:49 +05:30
Wildan M
002fff546d
Clear cloexec flag on Dup2
2026-06-20 06:35:01 +07:00
Wildan M
ed31b800c4
Revert "Use weak context for Proc"
2026-06-19 17:36:41 +07:00
Wildan M
622a4fb3cd
Solve context leak when switching
2026-06-19 17:33:46 +07:00
Wildan M
101f090ef9
Fmt
2026-06-19 16:50:14 +07:00
Akshit Gaur
b93260ed2d
Migrating run_queue to BTreeMap
2026-06-18 10:39:33 +05:30
4lDO2
56947e1a0f
Revert drop of kstack in exit_this_context.
2026-06-04 13:37:57 +02:00
4lDO2
bd6d9acd3c
Compile on other arches.
2026-06-03 19:06:12 +02:00
4lDO2
c27568e1fe
profiling: allow walking across syscall boundaries
2026-06-03 19:01:35 +02:00
4lDO2
42613ddc06
WIP: simultaneous NMI-based user+kernel profiling.
2026-06-03 19:01:35 +02:00
R Aadarsh
f8bc19747a
Make necessary changes to the kernel in order for relibc to support posix_spawn and posix_spawnp
...
* `syscall::sendfd`, now, when called with a `ContextHandle::FileTable` adds the fd to the filetable removing it from the calling process's filetable
* Files can now be added to, removed from another process, and can be duplicated using `ProcScheme::kcall`
* Files of another process with the flag O_CLOEXEC can now be closed by using `kcall`
2026-06-03 15:29:02 +05:30
4lDO2
8011f3f648
Simplify acpi scheme.
2026-06-02 16:23:08 +02:00
4lDO2
6fc2d32497
Remove redundant methods from KernelScheme.
2026-06-02 11:24:37 +02:00
4lDO2
da3d235af5
remove syscall debug for removed syscalls
2026-06-02 11:24:37 +02:00
4lDO2
3e210ff169
Remove 5 obsolete syscalls.
2026-06-02 11:24:37 +02:00
Wildan M
8701e8165b
Fix compilation for aarch64 after rust update
2026-05-31 06:55:02 +07:00
4lDO2
cee451af38
Use ArrayVec for kcall fd nums, 8% better perf!
2026-05-31 20:24:57 +02:00
Wildan M
973ac667e3
Use syscall time helper functions
2026-05-30 12:29:38 +07:00
Wildan M
a47b3a8d57
Add timeout for events
2026-05-30 13:44:31 -06:00
Wildan M
ec1395b554
Wrap unmap loop with handle_notify_files
2026-05-30 08:40:49 -06:00
Akshit Gaur
58283f63fe
EEVDF
2026-05-30 08:39:48 -06:00
Ibuki Omatsu
e847768f2b
feat: Implement multiple fds variant for call and std_fs_call
2026-05-29 13:07:36 +02:00
bjorn3
91ab8301f2
Fix warnings after updating rustc
...
Couple of features got stabilized, cpuid was made safe and there is a
new lint for function item to integer casts.
2026-05-27 20:53:10 +02:00
Jeremy Soller
d254309fdb
Support nightly 2026-05-24
2026-05-25 17:41:48 -06:00
Wildan M
f70905d439
Resolve warnings
2026-05-23 00:04:34 +07:00
Wildan M
40e76875d7
Prevent kstack from leaking
2026-05-20 13:35:47 +07:00