Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

feat(fspy): carry wincode-encoded loss reason through report_loss - #1056

Merged
wan9chi merged 1 commit into
fspy-loss/6-shm-io-abort-payloadfrom
fspy-loss/7-wincode-report-loss
Dec 2, 2026
Merged

wan9chi merged 1 commit into
fspy-loss/6-shm-io-abort-payloadfrom
fspy-loss/7-wincode-report-loss

Conversation

@wan9chi

@wan9chi wan9chi commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Motivation

When a traced process cannot record an operation it is about to perform—such as Linux seccomp-unotify filter installation failing in restricted sandboxes, or future untracked fallbacks like unsupported cross-architecture Windows child processes—callers need to send a structured, wincode-encoded loss reason through Sender::report_loss so fspy and vp run can report the exact cause instead of an untyped signal.

Changes

  • Add ChannelProtocol::Loss<'a> so Sender::report_loss(&self, loss: &P::Loss<'_>) wincode-encodes structured loss reasons into shm_io's abort path and Receiver::close returns a zero-copy LossReport<P> (falling back to CloseError::Capacity if the region is full).
  • Define TrackingLoss<'a> in fspy_shared::ipc with SeccompInstallFailed { program, errno }, wire it through fspy_client_unix, fspy_preload_unix (exec and posix_spawn untracked fallbacks), and fspy::TrackingIncomplete (via From<TrackingLoss<'_>>).
  • Add tests covering cross-process and zero-sized loss payloads, the Linux posix_spawn untracked fallback, and vt summary formatting, and update CHANGELOG.md.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@wan9chi
wan9chi added this pull request to stack #1057 December 2, 2026 10:19
Add ChannelProtocol::Loss<'a> so Sender::report_loss wincode-encodes
structured loss reasons into shm_io's abort slot and Receiver::close
returns a zero-copy LossReport<P> (falling back to CloseError::Capacity
if the region is full).

Define TrackingLoss<'a> in fspy_shared::ipc, wire
TrackingLoss::SeccompInstallFailed { program, errno } through
fspy_client_unix, fspy_preload_unix (exec and posix_spawn fallbacks),
and fspy::TrackingIncomplete (via From<TrackingLoss<'_>>). Add tests
covering cross-process and zero-sized loss payloads, the posix_spawn
fallback, and vt summary formatting for seccomp losses.

Co-authored-by: Gemini 4 Neon <noreply@google.com>
@wan9chi
wan9chi force-pushed the fspy-loss/7-wincode-report-loss branch from a834bda to 78c2e94 Compare December 2, 2026 10:20
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  -0.95%  [ -5.36% ..  +3.45%]  overhead   +54.37%
dynamic/access             change  +0.43%  [ -4.02% ..  +4.67%]  overhead   +20.18%
dynamic/access-relative    change  -1.79%  [ -5.12% ..  +3.02%]  overhead   +66.82%
dynamic/access-contended   change  -3.26%  [-20.78% .. +12.75%]  overhead   +10.34%
static/launch              change  -0.97%  [ -5.41% ..  +3.51%]  overhead  +137.91%
static/access              change  +0.49%  [ -5.09% ..  +2.67%]  overhead +5378.33%
static/access-relative     change  +0.67%  [ -2.15% ..  +2.97%]  overhead +8266.19%
static/access-contended    change  +0.45%  [ -1.77% ..  +1.71%]  overhead +5567.72%

macos

dynamic/launch             change  +0.03%  [ -2.56% ..  +2.60%]  overhead  +229.54%
dynamic/access             change  +0.39%  [ -4.44% ..  +4.69%]  overhead    +6.20%
dynamic/access-relative    change  +0.00%  [ -3.11% ..  +2.15%]  overhead  +259.19%
dynamic/access-contended   change  +0.00%  [ -2.51% ..  +2.78%]  overhead    +3.64%

windows

dynamic/launch             change  +0.67%  [ -3.28% ..  +4.70%]  overhead   +32.18%
dynamic/access             change  +0.00%  [ -4.09% ..  +4.02%]  overhead    +1.16%
dynamic/access-relative    change  -0.20%  [ -1.02% ..  +0.62%]  overhead    +1.23%
dynamic/access-contended   change  +0.20%  [ -4.54% ..  +2.85%]  overhead    +1.63%

@wan9chi
wan9chi merged commit 0455423 into main Dec 2, 2026
23 of 24 checks passed
@wan9chi
wan9chi deleted the fspy-loss/7-wincode-report-loss branch December 2, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant