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.
This commit is contained in:
Red Bear OS
2026-07-19 05:46:55 +09:00
10 changed files with 131 additions and 317 deletions
-11
View File
@@ -92,17 +92,6 @@ impl<'a> FpathWriter<'a> {
Ok(w.written)
}
pub fn with_legacy(
buf: &'a mut [u8],
scheme_name: &str,
f: impl FnOnce(&mut Self) -> Result<()>,
) -> Result<usize> {
let mut w = FpathWriter { buf, written: 0 };
write!(w, "{scheme_name}:").unwrap();
f(&mut w)?;
Ok(w.written)
}
pub fn push_str(&mut self, s: &str) {
let count = core::cmp::min(s.len(), self.buf.len() - self.written);
self.buf[self.written..self.written + count].copy_from_slice(&s.as_bytes()[..count]);