File monitor: deliver only watched paths with es_invert_muting?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- objective-c
- Ambito
- operating-systems, performance, security
Direzione di ricerca
Start with FileMonitor.m:96 and Monitor.m:602-616, then inspect how the watched prefixes and file/process events are matched. Evaluate the proposed ES_MUTE_INVERSION_TYPE_TARGET_PATH behavior, including renames into watched directories and whether KERN_PROCARGS2 can replace exec/exit subscriptions. Done means the monitor avoids unnecessary events without creating a silent gap in watched-path coverage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On macOS 14+ the file monitor only alerts on a few prefixes (/Library/Extensions/, /System/Library/Extensions/, /private/var/at/tabs/), since launchd and login items moved to BTM events. But it still receives every create, write and rename on the machine, plus every exec and exit, and builds a File and Process object for each one before matching against the watch list (FileMonitor.m:96, Monitor.m:602-616).
On my machine (BlockBlock 2.5.2, macOS 15.7.3, M4 Max) the daemon averages about 21% of a core around the clock, and 0.3-0.8 of a core during builds and test runs. I measured roughly 2.4 µs per write and 130 µs per exec on a busy machine. Notarization and Block Scripts are off, so this is the file monitor.
Would you consider es_invert_muting(client, ES_MUTE_INVERSION_TYPE_TARGET_PATH) (macOS 13+) with the watched prefixes muted in, so the kernel only delivers events for paths BlockBlock can alert on? The exec/exit subscription seems to exist only to keep arguments for alert text, so reading the writer's arguments at alert time (KERN_PROCARGS2) could let that go too.
I understand there may be security reasons not to do this. A prefix list that drifts out of sync with the watch list would be a silent blind spot, and renames into a watched directory need care. If that's the reason it works this way, a note here would help others who hit the same cost (#35 looks related).
- Lingua principale
- Objective-C
- Stelle
- 859
- Fork
- 50
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di objective-see/BlockBlock
-
Typo in installer: “addition protections” → “additional protections”Forse già presa @Jah-yee l’ha presa 3 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
objective-see/BlockBlock#111 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
objective-see/BlockBlock#109 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 64/100
objective-see/BlockBlock#108 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
objective-see/BlockBlock#107 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
objective-see/BlockBlock#104 ·
Tutte le issue di objective-see/BlockBlock
Issue simili
-
e: impeller engine team-engine
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
beeware/rubicon-objc#844 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
facebook/infer#2230 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
AvaloniaUI/Avalonia#22437 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NeoFreeBird/app#131 · 3 commenti ·