Red Bear OS
fa54b985ff
absorb: 27 orphaned relibc patches re-applied (Phase 1.0A)
...
Per local/docs/PATCH-PRESERVATION-AUDIT-2026-07-12.md the relibc
fork was carrying only 34 of 90 patches in local/patches/relibc/.
The other 56 patches' content was silently missing from the fork.
This commit re-applies 27 patches that genuinely still apply
cleanly. Recovery covers:
- eventfd implementation (sys/eventfd.h + eventfd.rs)
- signalfd implementation (sys/signalfd.h + signalfd.rs)
- timerfd implementation (sys/timerfd.h + timerfd.rs)
- bits/eventfd.h header
- spawn() function: cbindgen + stdint fix
- P3-timerfd-cbindgen-fix
- cbindgen language=C fixes for sys/{timerfd,semaphore}
- stdint include chain fixes
- strtold implementation
- dns aaaa getaddrinfo ipv6
- various stack/threading/header threading fixes
- dup3 syscalls
- waitid implementation
- bits/timespec reverse_from
- open_memstream integration
24 files changed.
2026-07-12 01:29:50 +03:00
Ibuki Omatsu
fba233467a
refactor: Move fd allocation logic into userspace
2026-07-01 08:08:23 -06:00
Wildan M
c234ace91d
Use ArrayString for Cwd
2026-06-22 22:13:24 +07:00
R Aadarsh
119f078216
* Fix bug that caused pid of the child process to be returned instead of 0 or errorno
...
* Add `same_process` field to not change the address space when `fexec_impl` is called on a different process
2026-06-15 17:08:11 +05:30
Wildan M
519bc8ebc8
Remove ld.so cache
2026-05-13 07:11:36 +07:00
Wildan M
464c840697
Fix linux compilation
2026-03-29 14:39:43 +07:00
Wildan M
b2de3d6e2e
Implement exec cache from ld_so cache
2026-03-29 13:11:36 +07:00
Ibuki.O
ac88c8f670
refactor: Migrate fstat*/fchmod/getdents/ftruncate/futimens to stdfscall
2026-03-14 13:35:39 +09:00
Anhad Singh
c469792043
feat(exec/shebang): handle multiple whitespaces
...
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2026-02-28 00:14:28 +11:00
Anhad Singh
79c3674c10
feat(redox/exec): replace argv[0] with script
...
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2026-02-28 00:14:21 +11:00
Ibuki Omatsu
bd9c6f1440
refactor: Make processes have cwd as a capability
2026-02-26 06:09:27 -07:00
auronandace
11f28342f9
unused_imports redox follow-up
2026-02-10 16:29:37 +00:00
Ibuki Omatsu
1bcb6dff78
Introduce namespace fd and related features
2026-01-20 20:43:05 -07:00
bjorn3
dc77995b57
redox-rt: Remove unnecessary image_file field from FexecResult::Interp
2025-12-09 22:22:09 +01:00
bjorn3
0158b111e0
redox-rt: Use non-fixed and anonymous remote mmap
2025-12-09 21:04:40 +01:00
bjorn3
1ede79fe88
Move cloexec and deactivate_tcb handling into redox-rt
2025-12-08 22:19:57 +01:00
bjorn3
b607877c07
Move cloexec handling to happen right before the final exec
...
This way if the target can't be executed, cloexec fds remain open as
expected.
2025-12-08 20:39:55 +01:00
bjorn3
4dae665cbf
Hard code the default scheme to file
...
Init no longer changes the default scheme to initfs at any point in
time. And for sandboxing you would be switching scheme namespace, not
default scheme.
It should be possible to mix and match relibc version from before and
after this change without breaking exec, though I haven't tested it.
2025-12-07 19:51:45 +01:00
bjorn3
6021ece539
Calculate total_args_envs_size in redox_rt::proc::fexec_impl
...
Calculating it earlier is a micro-optimization that doesn't seem like it
matters at all compared to all other costs of spawning a process. But at
the same time it makes things more fragile. And in fact bootstrap
actually passed the wrong value. It passed the
total_args_envs_auxvpointee_size that it computed rather than the
total_args_envs_size. While over-approximation doesn't cause UB, it
unnecessarily increases the amount of memory used after exec.
In addition pass &[&[u8]] rather than iterators for args and envs to
enable precomputing the total arg and env size. This also prevents you
from forgetting to pass a reversed iterator.
2025-12-07 18:52:47 +01:00
Jeremy Soller
0844e6fc90
WIP: use upper fd table
2025-11-15 07:55:37 -07:00
Jeremy Soller
82084440ad
Support nightly-2025-10-03
2025-10-03 21:51:10 -06:00
4lDO2
38e724ece9
Properly inherit ignored sigs across exec.
2025-09-20 11:08:41 +02:00
bjorn3
f51690c3a8
Remove the code to use escalated for suid binaries
2025-04-21 11:07:01 +02:00
4lDO2
a30f13ee9b
Fix setuid.
2025-04-20 14:00:35 +02:00
4lDO2
8bd510ff59
Simplify [res][ug]id getters and setters.
2025-04-19 19:26:59 +02:00
4lDO2
bd68da3df9
Fix relibc exec thisproc usage.
2025-04-19 19:26:58 +02:00
4lDO2
ad5efd0f11
Reach init fork
2025-04-19 19:26:57 +02:00
4lDO2
26399569de
Reach init w/proc manager.
2025-04-19 19:26:57 +02:00
4lDO2
91e58e8568
WIP: dynamic and static proc info
2025-04-19 19:26:57 +02:00
4lDO2
422a32690d
Replace removed syscalls with redox-rt stubs.
2025-04-19 19:26:57 +02:00
4lDO2
93cc8d81a4
Use call rather than close in final escalated step.
2025-04-05 20:06:26 +02:00
bjorn3
facc643e18
Couple of misc improvements
...
Fix a bunch of warnings and clarify that execve will never return Ok by
using Infallible
2025-03-30 20:18:01 +02:00
Josh Megnauth
c458d3d7a2
Support arguments in shebang (#!)
2025-01-25 00:08:20 +00:00
Josh Megnauth
513f1951fe
Handle prepended whitespace for hashbang
2024-12-30 17:14:24 +00:00
Josh Megnauth
d6ac5f8947
Avoid over allocations & reallocations
...
As we know, vectors amortize the cost of adding new elements by reserving
space for multiple elements when full. This is useful but may lead to
allocating more memory than necessary.
`relibc` generally avoids over allocations by reserving the exact amount
of space when possible. I fixed a few areas that still over allocated or
reallocated unnecessarily by leveraging iterators that are more likely
to know sizes.
2024-11-14 22:53:12 -05:00
4lDO2
ec216e56e2
Preserve umask across execv.
2024-09-25 20:28:50 +02:00
Kamil Koczurek
408a7b2ab6
Add capability to set the default scheme
2024-09-23 14:36:45 +00:00
Peter Limkilde Svendsen
3193656f22
Put random() state behind mutex
2024-08-15 23:26:16 +00:00
bjorn3
49c708f537
Remove all uses of the legacy scheme syntax"
2024-08-04 13:49:10 +02:00
4lDO2
2d66993b3f
Adapt to now-inverted signal mask (allowset).
2024-07-09 15:00:55 +02:00
4lDO2
53ed7aae59
Move rlct_clone, sigprocmask, sigaction, to rt.
2024-07-09 15:00:52 +02:00
4lDO2
a800693266
Refactor: move redox-exec into redox-rt::proc.
2024-07-09 15:00:52 +02:00
Jacob Lorentzon
e0b640d530
Implement new low-level signal trampoline
2024-03-17 16:58:42 +00:00
Arthur Paulino
d4eddbf42e
Refactor: inline core_io
...
* Extract the minimal set of definitions from `core_io` to `relibc` itself
* Remove dependency on `core_io`
2023-12-24 17:06:27 -03:00
4lDO2
75d1c67ca2
Switch to a lightweight CStr wrapper
2023-11-04 18:29:38 +00:00
4lDO2
ae46e37ca7
Run rustfmt
2023-10-26 15:51:04 +02:00
4lDO2
966c59ca0c
Make escalated communication pathless using sendfd.
2023-10-19 17:17:18 +02:00
Noa
df6f4678e8
Fix warnings
2023-05-30 13:46:17 -05:00
Jeremy Soller
16abc91341
cargo fmt and cargo fix
2022-11-11 13:27:18 -07:00
4lDO2
c26ce37620
Also fail if cwd could not be written to escalated.
2022-08-13 19:16:48 +02:00