Commit Graph

575 Commits

Author SHA1 Message Date
4lDO2 ac7e0755f1 Fix SyncSigPctl invocation. 2025-04-19 19:26:59 +02:00
4lDO2 a4dc232a33 Impl getres[ug]id C function. 2025-04-19 19:26:59 +02:00
4lDO2 8bd510ff59 Simplify [res][ug]id getters and setters. 2025-04-19 19:26:59 +02:00
4lDO2 747d11062b Rename KillTarget -> ProcKillTarget. 2025-04-19 19:26:58 +02:00
4lDO2 88848c25fe Add (backend todo) proc calls for kill+sigq. 2025-04-19 19:26:58 +02:00
4lDO2 f4a64cfbc3 Add setresguid. 2025-04-19 19:26:58 +02:00
4lDO2 48df8f5bba Add unstable interface for getting current thread fd. 2025-04-19 19:26:58 +02:00
4lDO2 9566a00ad1 WIP: waitpid and exit IPC calls. 2025-04-19 19:26:58 +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 b851422214 WIP: use proc manager in non-init fork. 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 d68f5d8d3d Make redox itimer relibc stub rather than kernel stub. 2025-04-13 18:18:05 +02:00
bjorn3 ea4c41686c Rustfmt 2025-04-12 22:15:05 +02:00
Jeremy Soller 9a93fde7b5 Fix gettid on Redox 2025-04-10 13:18:33 -06:00
Jeremy Soller 1cbe2038ec Merge branch 'escalated_consume' into 'master'
Use call rather than close in final escalated step.

See merge request redox-os/relibc!641
2025-04-06 13:30:23 +00:00
Jeremy Soller b05f7479ba environ_iter: handle environ being null 2025-04-05 20:56:38 -06:00
4lDO2 93cc8d81a4 Use call rather than close in final escalated step. 2025-04-05 20:06:26 +02:00
Darley Barreto d2cc45f59c Add redox_openat_v1 2025-04-05 14:50:02 -03: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
Jeremy Soller 121e733990 Merge branch 'fix_arm64' into 'master'
Fix building for arm64

See merge request redox-os/relibc!636
2025-03-30 16:26:41 +00:00
bjorn3 8650ac293e Fix building on targets with unsigned c_char 2025-03-30 16:35:29 +02:00
Josh Megnauth 51c04d2470 Use C string literals & deprecate c_str! 2025-03-14 21:17:53 -04:00
Ron Williams c528c0885f Make nanosleep and sleep handle interrupts correctly, plus fix alarm 2025-01-31 21:10:14 +00:00
Josh Megnauth c458d3d7a2 Support arguments in shebang (#!) 2025-01-25 00:08:20 +00:00
Jeremy Soller f08952b1b0 Merge branch 'patch5' into 'master'
feat: rwlock

Closes #196

See merge request redox-os/relibc!594
2024-12-30 17:17:05 +00:00
Josh Megnauth 513f1951fe Handle prepended whitespace for hashbang 2024-12-30 17:14:24 +00:00
Anhad Singh 0449c35e52 chore: fix formatting
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 01:23:51 +11:00
Anhad Singh bc51d8e1d5 fix(pal/redox): use RwLock instead of InnerRwLock
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 01:07:36 +11:00
Anhad Singh cfe89f828a feat: rwlock instead of mutex for global scope
* Rwlock -> InnerRwLock
* RwLock makes use of InnerRwLock.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 00:54:52 +11: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
Jeremy Soller 0dd6e27597 Merge branch 'dynamic_linker' into 'master'
fix(ld_so): for Linux

See merge request redox-os/relibc!570
2024-12-09 12:56:04 +00: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
Josh Megnauth 6ec03b6f4a fix: round_up_to_page_size overflow
Closes: #200

The spec doesn't define which error code to set if `len` is too large.
`ENOMEM` is the closest defined condition that fits:

>> [...] the range [addr,addr+len) exceeds that allowed for the address
space of a process [...]

Logically, `len` would lead to `addr` exceeding the address space of a
process if rounding it up to the next page size causes an overflow.
2024-11-26 00:37:12 -05:00
Josh Megnauth a709dd47bf fix: Multiplication overflow in setsockopt 2024-11-23 19:53:33 +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
Peter Limkilde Svendsen 06fec0b843 Add various basic docstrings 2024-10-27 23:25:57 +01:00
Andrey Turkin a4122753e6 Initial RISC-V64 support 2024-10-11 06:44:54 +03:00
4lDO2 57f098931a Remove ld.so's now unnecessary access() wrapper. 2024-09-30 16:55:27 +02:00
4lDO2 07af4e49f7 Add sigaltstack test. 2024-09-28 16:51:17 +02:00
4lDO2 eee603efa8 Remove the "-1 errno" e() function. 2024-09-27 15:35:04 +02:00
4lDO2 070b4cd05c Switch PalPtrace to Rusty error handling. 2024-09-27 15:35:04 +02:00
4lDO2 d474163e0e Switch to Rusty error handling in PalSocket. 2024-09-27 15:35:01 +02:00
4lDO2 4da5ad37d1 Convert PalEpoll to Rusty error handling. 2024-09-27 11:22:36 +02:00
4lDO2 1a46a24c70 Rustify PalSignal error handling. 2024-09-27 11:12:19 +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 986754e7b3 Remove all remaining errno interfaces from Pal. 2024-09-27 10:29:32 +02:00
4lDO2 313b32c815 Switch almost all of Pal to Rusty error handling. 2024-09-27 10:19:44 +02:00