Commit Graph

70 Commits

Author SHA1 Message Date
Red Bear OS 9bbdc2cafa Merge upstream/main (59cf8189) into submodule/base
Sync the base fork with 13 upstream commits (xhci event-processing
dedup + IRQ race fix, randd permission simplification, nvmed TimeSpec
fix, /dev/ptmx, fpath legacy-path cleanup, dynamically-linked init
fix, and more). Brings process_one_event into the tree, satisfying the
verify-fork-functions gate for base.

Conflicts resolved (3 of 8 overlapping files; 5 auto-merged):

- drivers/usb/xhcid/src/xhci/irq_reactor.rs: took upstream's
  process_one_event/EventProcessResult refactor (b2ed85ea) including
  the a01d3ce6 race fix (process events between NoEvent and
  unmasking), and re-applied the Red Bear SPURIOUS_REBOOT quirk on the
  NoEvent warning (downgrade to debug when quirked).

- randd/src/main.rs: took upstream's permission-handling
  simplification (e26db606); re-applied the RB fcntl improvement
  (F_GETFL/F_GETFD/F_SETFL/F_SETFD handling, Linux random_fops xref)
  and the is_cpu_feature_detected early-return cleanup. Dropped
  test_scheme_perms (deleted by upstream's simplification).

- Makefile: kept upstream's new /dev symlink block (dev/null, ptmx,
  random, urandom, zero, tty, stdin/stdout/stderr).

Verified: cargo check clean; 57/57 tests pass (xhcid 35, usbhubd 14,
xhci trb 8); verify-fork-functions.sh --no-fetch base reports all
upstream functions present.
2026-07-19 05:47:27 +09:00
bjorn3 5c6f460bbb Stop using the legacy path format in fpath
For fbbootlog, fbcon and the disk drivers there is no load bearing use
of the fpath output. And for chan relibc already handles both the legacy
and new format.
2026-07-16 20:16:44 +02:00
Red Bear OS 0422712e29 fix: add sndbuf/rcvbuf to Socket accept initializer
The accept() method was missing sndbuf and rcvbuf fields that were
added to the Socket struct. Inherit values from the listening socket.
2026-07-12 02:25:20 +03:00
Red Bear OS 00b799d512 absorb: 41 orphaned base patches re-applied (Phase 1.0A)
Per local/docs/PATCH-PRESERVATION-AUDIT-2026-07-12.md the base
fork was carrying only 38 of 100 patches in local/patches/base/.
The other 62 patches' content was silently missing from the fork
working tree, even though their .patch files were preserved.

This commit re-applies 41 patches that genuinely still apply
cleanly + 17 hunks that partially applied. Recovery covers:

- D-Bus initfs service wiring (P4-initfs-dbus-services)
- USB service wiring (P4-initfs-usb-drm-services)
- netcfg/dhcp/dhcpv6 driver fixes
- acpid shutdown/PM/quirk fixes
- inputd/ps2d hard-fail logging
- pcid driver interface refinements (server cmd channel)
- virtio-core for VirtualBox support
- ixgbed/rtl8139/rtl8168 net drivers
- ahcid NCQ + per-function interrupt coalescing
- logd persistent logging
- bootstrap procmgr race-condition fixes
- cargo version pin to +rb0.3.0 (synchronized release branch)

58 files changed, +1444/-318 lines.

Untracked mnt/ tree and *.orig / *.rej files cleaned up after
patch application (leftover from absolute-path patch headers).
2026-07-12 01:29:08 +03:00
Red Bear OS bd595851e2 base: apply Red Bear patches on latest upstream/main
251 files: init, acpid, ipcd, netcfg, ihdgd, virtio-gpud, scheme-utils,
inputd, block driver, ptyd, ramfs, randd, initfs bootstrap, path deps,
version +rb0.3.1, author attribution
2026-07-11 11:39:24 +03:00
Wildan M 55146b6e8e ipcd: Don't warn for opening stat 2026-05-02 18:46:51 +07:00
bjorn3 daf726c30d scheme-utils: Have FpathWriter handle writing the scheme name 2026-04-19 19:07:41 +02:00
bjorn3 64d23e9e05 scheme-utils: Introduce FpathWriter helper 2026-04-19 19:07:41 +02:00
bjorn3 a2bc1dd79c scheme-utils: Panic on scheme EOF
EOF used to be triggered by unmounting a scheme, but this is no longer
the case since namespaces got moved to userspace. Unmounting now only
closes the scheme root fd.
2026-04-18 16:49:21 +02:00
bjorn3 a5018ca37e scheme-utils: Merge read_requests and process_requests
And simplify some matches on the resulting method.
2026-04-18 16:49:21 +02:00
bjorn3 4ef2c7ad6f scheme-utils: Remove the need for RefCell wrappers around schemes for ReadinessBased 2026-04-18 16:49:21 +02:00
bjorn3 ca281c9395 scheme-utils: Copy ReadinessBased from redox-scheme to scheme-utils
To allow improving the implementation and interface in this repo and
move it back into redox-scheme later.
2026-04-18 16:49:03 +02:00
bjorn3 cb34b3da67 Update ipcd to rand 0.10 2026-04-16 19:10:34 +02:00
bjorn3 317a0178b6 Introduce scheme-utils crate and HandleMap type
HandleMap deduplicates the id assignment for handles and unlike most
existing implementations handles overflow just fine.
2026-04-13 22:19:07 +02:00
Ribbon 90ea974ce0 Add missing Cargo package description and update drivers README 2026-03-16 10:39:15 -06:00
bjorn3 53327b0969 ipcd: Use a single segment + mremap for shm
This way mmap fully functions even in the presence of growing. Fixes a
crash of Wayland applications when resizing the SHM pool.
2026-03-09 20:06:54 +01:00
bjorn3 bd6bc56d4d ipcd: Support ftruncate in shm 2026-03-08 21:42:50 +01:00
bjorn3 db4292da49 ipcd: Implement fsize for shm
To fix seek support.
2026-03-08 21:35:52 +01:00
Jeremy Soller 352d90332f Use libredox::protocol in ipcd and netstack 2026-02-28 08:20:24 -07:00
auronandace 5ffce47607 add clippy precedence lint 2026-02-20 13:43:48 +00:00
Jeremy Soller a8e9a5e73b ipcd: use first segment size for limits of mmap 2026-02-19 13:23:35 -07:00
Jeremy Soller c2c7020063 ipcd: block uds stream connect until accept 2026-02-19 12:56:23 -07:00
Wildan M 2875e8f26e ipcd: Allow non contiguous shm allocation 2026-02-19 13:19:39 +07:00
Wildan M 99c3193764 ipcd: Allow data transfer before accept 2026-02-06 14:03:08 +07:00
Jeremy Soller 2d672b7cd9 Add anyhow to workspace 2026-01-29 10:47:45 -07:00
Ibuki Omatsu 334928f151 feat: Introduce userspace namespace manager and adapt all schemes. 2026-01-20 20:56:58 -07:00
Jeremy Soller f740b61774 Use workspace dependencies for many common crates 2026-01-20 10:12:08 -07:00
Wildan M 58cdb72051 uds: Fix accept blocking 2026-01-15 12:28:35 +07:00
Wildan M 05b83ae9c8 uds: merge two connect impl 2026-01-15 11:20:57 +07:00
Wildan M 5b06aa1439 Fixes for socketpair wouldblock 2026-01-15 10:44:51 +07:00
Wildan M 7efad0a989 uds: Unblock accept(), allow getpeername while connecting 2026-01-15 03:36:33 +07:00
Jeremy Soller 214ee1a532 Merge branch 'ipcd-setsockopt' into 'main'
ipcd: temporarily allow setsockopt SO_SNDBUF

See merge request redox-os/base!86
2026-01-08 18:44:20 -07:00
Jeremy Soller 52fe7cd9a1 Merge branch 'revert-6dddb01d' into 'main'
Revert "Use atomic counter in UDS to avoid race condition"

See merge request redox-os/base!81
2026-01-08 18:43:51 -07:00
Wildan M 2818310738 ipcd: temporarily allow setsockopt SO_SNDBUF 2026-01-08 05:58:29 +07:00
Wildan Mubarok 648753bb9b Revert "Use atomic counter in UDS to avoid race condition"
This reverts commit 6dddb01d63
2026-01-01 11:38:22 +00:00
Ibuki Omatsu 3681e1b74a refactor: Replace unlink and rmdir with unlinkat in ramfs. Update redox-scheme and redox-rt for bootstrap. 2025-12-17 18:46:05 -07:00
Anhad Singh 9496f6f486 fix(ipcd/uds/steam): perform checks before get_uid_gid_from_pid
Fix
https://gitlab.redox-os.org/redox-os/base/-/merge_requests/69#note_47265

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-12-16 22:14:40 +11:00
Anhad Singh 383bd436d8 fix(ipcd/uds/stream): handle zero-byte payload
* sendmsg(2) on `SOCK_STREAM` with zero-byte payload is a no-op even if
  ancillary data is present. Note that this does not apply to
  `SOCK_DGRAM`.
* Pass the `msg_flags` to `get_connected_pear` as non-blocking behaviour
  may be requested.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-12-16 21:19:53 +11:00
bjorn3 1ac570fe06 Couple of minor feature gate changes 2025-12-13 12:38:22 +01:00
bjorn3 6c39bea37a Only depend on redox-rt when compiling for redox
This fixes rust-analyzer when it is not configured to use redox as target.
2025-12-05 22:06:39 +01:00
bjorn3 4a182077c9 ipcd: Fix a couple of warnings 2025-12-05 20:52:46 +01:00
bjorn3 f06923b201 Standardize main function of all daemons 2025-12-04 11:44:29 +01:00
bjorn3 f1057b6750 daemon: Abort on errors
All users did this anyway. And handling it inside the daemon crate
allows avoiding a panic of the parent process when the child process
panicked.
2025-12-03 21:55:47 +01:00
bjorn3 54d81e7423 Merge redox-daemon into this repo 2025-12-03 21:07:13 +01:00
bjorn3 0c2341d53e Remove outdated Cargo.lock files 2025-12-03 21:00:13 +01:00
Jeremy Soller 1145e908f1 ipcd: return sane value for SO_SNDBUF 2025-11-17 17:18:02 -07:00
Jeremy Soller 9704a4501e ipcd: refactor fevent handling 2025-11-16 09:02:27 -07:00
Jeremy Soller 16ac15d5eb ipcd: remove unnecessary debug print 2025-11-14 18:25:36 -07:00
Jeremy Soller eb2da68f88 Handle MSG_DONTWAIT 2025-11-13 10:19:13 -07:00
Jeremy Soller 594748c1e1 ipcd: make require_connected_connection compatible with O_NONBLOCK 2025-11-10 16:41:55 -07:00