strawberry/include/strawberry
trvon 383c22cbd3
exec guard: answer a cache hit without holding the cache lock
Both hit paths (fanotify and Endpoint Security) called finish() while holding
cache_mutex_. finish() is the answer: it writes the kernel response, runs the
observation callback, bumps stats under stats_mutex_ and pushes to
report_mutex_. Holding the cache lock across that serialised every cache-hit
exec behind one mutex even though the daemon runs two workers, so on Linux a
slow answer was a slow exec - in the path whose whole job is to keep launches
fast.

detail::answer_cached_assessment copies the entry under the lock, releases it,
and only then answers. cache_mutex_ is now a leaf lock (also at the work-loop
insert), so the old edge cache_mutex_ -> {pending, stats, report} is gone and no
inversion can be introduced. Answer-exactly-once is unchanged: respond() still
checks pending->responded under the pending mutex, and the hit path still
answers once and returns.

The seam is declared in exec_guard.hpp so the tests no longer redeclare an
internal function in their own translation unit.
2026-11-19 17:29:38 -07:00
..
learn gate: a bounded evaluation range, so out-of-sample evidence is possible 2026-11-19 17:27:59 -07:00
store store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
behavior_engine.hpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
config.hpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
control_server.hpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
correlation_engine.hpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
crash_safety.hpp Harden against crashes and I/O faults 2026-10-25 18:17:17 -06:00
daemon_app.hpp Privacy: macOS tracker source via Little Snitch log-traffic (WS2 macOS) 2026-10-28 18:54:27 -06:00
daemon_states.hpp Implement runtime pipeline, reporting, and local UI 2026-04-26 16:31:01 -04:00
database.hpp store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
detection_pipeline.hpp detection: ctime in the scan key, retry after a failed scan, never hold live execs 2026-11-19 16:21:34 -07:00
doctor.hpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
evidence_store.hpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
exec_guard.hpp exec guard: answer a cache hit without holding the cache lock 2026-11-19 17:29:38 -07:00
file_watch.hpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
fleet.hpp Stage 6: node identity (fleet.hpp) — pure node_uid + wrapper 2026-11-07 18:59:51 -07:00
fleet_export.hpp Fleet F1: merge dedup per node+window, overlay newest-per-node, export --since 2026-11-12 06:50:03 -07:00
fleet_gate.hpp fleet gate: refuse incomplete evidence and unprovable pooled provenance 2026-11-19 17:28:46 -07:00
fleet_merge.hpp fleet: node-share cap never below the fair share 1/N 2026-11-14 11:29:06 -07:00
hash_utils.hpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
incident_report.hpp Implement runtime pipeline, reporting, and local UI 2026-04-26 16:31:01 -04:00
inspection_executor.hpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
installed_files.hpp Record routine indicators as evidence only 2026-10-26 05:37:58 -06:00
ioc_list.hpp Privacy: tracker list feeds (advisory only, never block) 2026-10-28 05:25:53 -06:00
ioc_set.hpp Add policy, threat-intel feeds and OpenSnitch containment 2026-10-25 18:17:05 -06:00
json_field.hpp Add policy, threat-intel feeds and OpenSnitch containment 2026-10-25 18:17:05 -06:00
log_flags.hpp Correlate outside the pipeline lock; per-exec logs opt-in 2026-10-26 07:06:05 -06:00
node_ids.hpp Doctor: detect and retire findings for hashes you have since allowlisted 2026-10-28 11:37:52 -06:00
opensnitch.hpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
opensnitch_events.hpp Privacy: macOS tracker source via Little Snitch log-traffic (WS2 macOS) 2026-10-28 18:54:27 -06:00
parse_num.hpp Harden against crashes and I/O faults 2026-10-25 18:17:17 -06:00
perf_stats.hpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
platform_process.hpp Read process facts on macOS without procfs 2026-10-27 09:55:09 -06:00
policy.hpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
proc_read.hpp Harden against crashes and I/O faults 2026-10-25 18:17:17 -06:00
process_monitor.hpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
process_query.hpp Add process search seen timestamps 2026-04-26 18:46:08 -04:00
profiling.hpp Add resource governor, scan profiles and KPI harness 2026-10-25 18:17:16 -06:00
redact.hpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
repeat_aggregator.hpp Detection: unify the two repeat-aggregation sinks + IOC severity resolution 2026-10-28 17:39:48 -06:00
resource_governor.hpp detection: ctime in the scan key, retry after a failed scan, never hold live execs 2026-11-19 16:21:34 -07:00
retro_hunt.hpp Retro-hunt: re-scan binaries seen before when the rules change 2026-10-27 08:59:38 -06:00
rule_partition.hpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
rule_updater.hpp Rules R1: ship pinned yara-forge-core source snapshot in the release (no per-node fetch) 2026-11-11 13:21:12 -07:00
scanner_health.hpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
service_hints.hpp Use macOS store paths and launchd hints in the CLI, app and MCP 2026-10-28 04:39:57 -06:00
swallowed.hpp Forbid empty catch blocks 2026-10-25 18:52:45 -06:00
sys_io.hpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
telemetry.hpp Stage 4: shadow mode for the inspection model 2026-10-27 12:04:40 -06:00
thread_entry.hpp Forbid empty catch blocks 2026-10-25 18:52:45 -06:00
tracker_set.hpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
yara_scanner.hpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00