Commit Graph

2447 Commits

Author SHA1 Message Date
世界 bee231b9ff usbip: collapse server state into exportLedger
ServerService used to own three mutexes coordinating six pieces of
mutable state (exports, busy, controlState, controlSeq, controlSubs,
LeaseManager). The lock-ordering rule that fixed the import/attach
race in 0c892411a lived only as a comment. Two-mutex (fast/slow)
ledger absorbs all of it; the two mutexes are never held
simultaneously, so the ordering rule becomes a property of the type
instead of a discipline callers must observe. TryReserveForImport
closes the window where two concurrent OpReqImports could both pass
the busy check before either marked busy.
2026-06-09 10:42:26 +08:00
世界 cec39eb00c usbip: unify platform services behind host interfaces
Collapse ServerService and ClientService to one definition each by
hiding Linux vs Darwin behind ExportHost, ImportHost, and Export
seams. Along the way, extract three state machines that previously
lived as scattered fields on the service structs:

- LeaseManager owns its own mutex and closes the
  availability-vs-insert TOCTOU by checking export busy inside Issue
  under the same lock as the insert.
- DataSession gives the three per-import data-plane implementations
  (Linux kernel handoff, Darwin server data session, Darwin virtual
  controller) a uniform Done/Err/Close interface.
- clientAssignment encapsulates the matched/import-all target state
  and exposes ApplyMatched/ApplyAll diffs to ClientService, which
  keeps worker goroutine lifecycle.

Service busy tracking moves off the per-platform serverExport struct
onto ServerService.busy, since it follows the lease/import lifecycle
rather than physical claim/release. linux_test.go is migrated to
construct ServerService and ClientService through the new host
interfaces.
2026-06-09 10:42:26 +08:00
世界 d690a17780 Fix USB/IP import lease and attach races 2026-06-09 10:42:26 +08:00
世界 ff9336435e usbip: fix review findings 2026-06-09 10:42:26 +08:00
世界 35347af96d usbip: use event-driven status updates 2026-06-09 10:42:25 +08:00
世界 09491ff209 Cleanup codes 2026-06-09 10:42:25 +08:00
世界 26bd37a012 Fix USB/IP matched retention and snapshot ordering 2026-06-09 10:42:25 +08:00
世界 0e34a2d088 Fix usbip host bind recovery 2026-06-09 10:42:25 +08:00
世界 7b73e80df3 Fix Darwin USB/IP transfer cleanup 2026-06-09 10:42:24 +08:00
世界 d76f9692be Fix USB/IP standard polling and Darwin busy state 2026-06-09 10:42:24 +08:00
世界 9f884487e9 Fix USB/IP handoff and shutdown cleanup 2026-06-09 10:42:24 +08:00
世界 786c7b0138 usbip: harden linux interop teardown 2026-06-09 10:42:24 +08:00
世界 0de8058c5f usbip: address review findings 2026-06-09 10:42:24 +08:00
世界 1b6d586930 fix usbip control resync and darwin bounds 2026-06-09 10:42:23 +08:00
世界 44214c4c55 Fix USB/IP control status updates 2026-06-09 10:42:23 +08:00
世界 f1a516cb6e Serialize Darwin USB host teardown 2026-06-09 10:42:23 +08:00
世界 0135eaef7c usbip: add extended control protocol 2026-06-09 10:42:23 +08:00
世界 e94a99d5b9 Fix USB/IP lint and vet issues 2026-06-09 10:42:22 +08:00
世界 7ab2269998 Fix USB/IP unlink and runtime test gating 2026-06-09 10:42:22 +08:00
世界 9ea04956fa Fix Darwin USB/IP availability and doorbell handling 2026-06-09 10:42:22 +08:00
世界 3cfe767ae4 Fix USB/IP Darwin protocol handling 2026-06-09 10:42:22 +08:00
世界 1cf178440f usbip: add linux socketpair relay fallback 2026-06-09 10:42:22 +08:00
世界 5450351607 Add Darwin USB/IP support 2026-06-09 10:42:21 +08:00
世界 d408350363 usbip: cover import-all retry refresh 2026-06-09 10:42:21 +08:00
世界 033b905bc6 usbip: harden linux import/export handling 2026-06-09 10:42:21 +08:00
世界 4608c0c656 Add usbip virtual-device interop tests 2026-06-09 10:42:20 +08:00
世界 5e8c224be3 Add usbip tests and auto-load drivers 2026-06-09 10:42:20 +08:00
世界 2435611360 service/usbip: add hotplug control push path 2026-06-09 10:42:20 +08:00
世界 ad5b1de82d Fix USBIP parsing and lifecycle handling 2026-06-09 10:42:20 +08:00
世界 323b406971 Fix USB/IP re-enumeration and export availability 2026-06-09 10:42:20 +08:00
世界 bb1ab8080a Add Linux usbip client and server services 2026-06-09 10:42:19 +08:00
世界 8a42af329c Bump version v1.14.0-alpha.29 2026-06-08 08:52:25 +08:00
世界 6b490f5cf4 Fix crash on Apple platforms caused by concurrent libresolv calls 2026-06-08 08:51:52 +08:00
世界 dc110f51d2 platform: Add tailscale device name and logout 2026-06-08 08:51:52 +08:00
世界 4bf449a219 tailssh: fix platform SFTP session teardown 2026-06-08 08:51:51 +08:00
世界 b2a9c4990c tailscale: Add tailssh server 2026-06-08 08:51:51 +08:00
世界 5dee6a9e2f tools: Fix mising cleanup 2026-06-08 08:51:51 +08:00
世界 45be67c977 hysteria2: Add gecko obfs 2026-06-08 08:51:51 +08:00
世界 4db5ea3182 daemon: Add Tailssh 2026-06-08 08:51:51 +08:00
世界 881c850bb8 sing: Fix comment loop 2026-06-08 08:51:51 +08:00
世界 3d50303ec1 Fix tailscale dns 2026-06-08 08:51:51 +08:00
世界 3b23e5a6bd tailscale: Expose more peer info fields 2026-06-08 08:51:50 +08:00
世界 ae375df1a2 tailscale: Add runtime exit node API 2026-06-08 08:51:50 +08:00
世界 bd2085f9dc Fix tailscale 2026-06-08 08:51:50 +08:00
世界 243cc07880 realm: Open separate v4 and v6 packet conns on client 2026-06-08 08:51:50 +08:00
世界 f3109a0bc1 gvisor: Fix dialing to self addresses 2026-06-08 08:51:50 +08:00
世界 21291afa33 tailscale: Fix handle peer DNS query 2026-06-08 08:51:50 +08:00
世界 701f165e30 tailscale: Revert dialer deprecation and remove control_http_client 2026-06-08 08:51:50 +08:00
世界 07c36152c2 process: Fix panic when package manager is unavailable on Android 2026-06-08 08:51:49 +08:00
世界 8196cc7644 route: Refetch rule-set when cache restore fails 2026-06-08 08:51:49 +08:00