Commit Graph

74 Commits

Author SHA1 Message Date
auronandace 2d3ee10aef platform and pthread cleanup 2026-02-27 21:38:16 +00:00
auronandace 1195ea9b9f tar sys_uio and sys_un header cleanup 2026-02-27 21:10:56 +00:00
Ibuki Omatsu bd9c6f1440 refactor: Make processes have cwd as a capability 2026-02-26 06:09:27 -07:00
Anhad Singh d234e81fc9 fix(ld.so): debug build
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-17 00:15:10 +11:00
Anhad Singh f9487321c0 fix(ld.so): base_addr
Not guaranteed that the program headers immediately follow the ELF
header.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-15 15:47:02 +11:00
auronandace 924189992f add unexpected_cfgs lint 2026-02-11 14:13:57 +00:00
auronandace a3c67e898d add unused_must_use lint 2026-02-11 09:48:47 +00:00
auronandace b7742efe5e remove rust platform tests 2026-02-05 15:11:42 +00:00
Wildan M 9711dcca51 Implement logger and todo macros 2026-01-25 04:55:18 +07:00
Ibuki Omatsu 1bcb6dff78 Introduce namespace fd and related features 2026-01-20 20:43:05 -07:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
Anhad Singh c05e2da5b3 misc(all): formatting
Signed-off-by: Anhad Singh andypython@protonmail.com
2026-01-19 09:03:44 +00:00
Anhad Singh 81e6d4116a fix(redox/build): missing unsafe blocks
This change was made, commited, pushed and tested entirely on Redox :^)
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-19 08:42:41 +00:00
sourceturner 2d5ac47214 Use unsafe blocks in platform module 2026-01-18 21:51:33 +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
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
4lDO2 05481b36a6 Fix IPC size on i686. 2025-04-19 19:27:01 +02:00
4lDO2 dc2988968e Use SignalThread call and fix fork sighandler sync with procmgr. 2025-04-19 19:26:59 +02:00
4lDO2 b30ccb61fe Enforce procmgr errors, fix attrs path. 2025-04-19 19:26:59 +02:00
4lDO2 ac7e0755f1 Fix SyncSigPctl invocation. 2025-04-19 19:26:59 +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
Jeremy Soller b05f7479ba environ_iter: handle environ being null 2025-04-05 20:56:38 -06:00
Anhad Singh 023a005688 fix(ld.so): non-pie lazy
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh c286ad2868 fix(ld.so): do not depend on TLS at all
In the next big refactor (next PR), all of the platform functionality
used by both relibc and ld.so will be moved into a `platform`/`sysdeps`
crate and then ld.so would be moved out of relibc and not link with it.

I think doing it in a seperate PR would make it more managable, as when
I did half of it, the diff was pretty huge and that way it would be
easier to review too :)

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-05 23:11:59 +11:00
Peter Limkilde Svendsen 06fec0b843 Add various basic docstrings 2024-10-27 23:25:57 +01:00
4lDO2 eee603efa8 Remove the "-1 errno" e() function. 2024-09-27 15:35:04 +02:00
4lDO2 8b8b00da01 Use unsigned return values in read()-like Pal fns.
Returning a negative number of bytes makes absolutely no sense, besides
the "-1 and errno" pattern, which is now converted to Result<_, Errno>.
2024-09-27 10:39:26 +02:00
4lDO2 ec216e56e2 Preserve umask across execv. 2024-09-25 20:28:50 +02:00
4lDO2 f6761407e5 Pass si_pid to all realtime signals. 2024-09-24 19:34:51 +02:00
Kamil Koczurek 408a7b2ab6 Add capability to set the default scheme 2024-09-23 14:36:45 +00:00
4lDO2 4bd0d2a1ef Move pthread::Errno to separate module. 2024-09-11 23:22:29 +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
4lDO2 4c11b607de Implement pread and pwrite using the syscalls. 2024-06-14 14:10:47 +02:00
Jacob Lorentzon e0b640d530 Implement new low-level signal trampoline 2024-03-17 16:58:42 +00:00
Peter Limkilde Svendsen a7137512fa Use standard casing and mangling for internal errno 2024-03-01 00:25:42 +00:00
Peter Limkilde Svendsen 9093f6bc47 Use Cell representation for errno 2024-02-29 14:07:40 +00:00
Darley Barreto 298340abf9 Remove ralloc 2024-01-13 10:57:02 -03:00
Darley Barreto ce1e31d567 Replace C dlmalloc 2023-12-12 15:04:17 +00:00
4lDO2 492be53c2c Remove old pthreads-emb OS-specific code. 2023-05-06 17:02:52 +02:00
Jeremy Soller 16abc91341 cargo fmt and cargo fix 2022-11-11 13:27:18 -07:00
4lDO2 5e74d173ab Fix ld.so access function on Redox. 2022-08-13 19:16:48 +02:00
4lDO2 54b3f873f8 Move cwd from kernel to relibc. 2022-08-13 19:16:45 +02:00
4lDO2 049a5156d7 Implement PT_INTERP, and thus dynamic linking.
With this change, gcc can now successfully compile a tiny program that
printfs an integer returned from a function, from a dynamically linked
library that it compiled as well.

Rustc however, is orders of magnitude more complex, and the next step is
to fix constructors which require access to `environ`, in ld.so
2022-07-26 21:34:48 +02:00
4lDO2 c95d276af9 Allow POSIX's environ to be set.
Rust's libstd for example uses environ when using the `envs` builder
method for spawning processes, and therefore relibc cannot simply assume
environ will always point to the internal relibc env var Vec.
2022-07-26 21:33:01 +02:00
Jeremy Soller 65bd3ed1e3 Fixes for program_invocation_name and program_invocation_short_name 2021-11-30 10:27:24 -07:00
jD91mZM2 56e1eceb28 Replace AllocStringWriter with CVec 2020-06-29 17:44:57 +02:00