Bug 228773 - [macOS] Update message filters
Summary: [macOS] Update message filters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-04 07:45 PDT by Per Arne Vollan
Modified: 2021-08-04 11:28 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.44 KB, patch)
2021-08-04 07:48 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2021-08-04 07:45:43 PDT
Update message filters with enforcement on macOS based on telemetry.
Comment 1 Radar WebKit Bug Importer 2021-08-04 07:46:11 PDT
<rdar://problem/81514311>
Comment 2 Per Arne Vollan 2021-08-04 07:48:55 PDT
Created attachment 434903 [details]
Patch
Comment 3 Brent Fulgham 2021-08-04 09:51:35 PDT
Comment on attachment 434903 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434903&action=review

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:273
> +        (allow (with telemetry-backtrace) iokit-external-method

Do we really want telemetry-backtrace on these two methods?
Comment 4 Per Arne Vollan 2021-08-04 10:41:46 PDT
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 434903 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=434903&action=review
> 
> > Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:273
> > +        (allow (with telemetry-backtrace) iokit-external-method
> 
> Do we really want telemetry-backtrace on these two methods?

Yes, I believe so. They are not expected to be frequently used.

Thanks for reviewing!
Comment 5 Brent Fulgham 2021-08-04 10:55:03 PDT
Comment on attachment 434903 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434903&action=review

r=me

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:269
> +        (deny (with telemetry) (with message "IOMobileFramebufferUserClient")

So we deny (with telemetry) pretty much all uses of iokit-async-external-method, and iokit-external-trap ...

>>> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:273
>>> +        (allow (with telemetry-backtrace) iokit-external-method
>> 
>> Do we really want telemetry-backtrace on these two methods?
> 
> Yes, I believe so. They are not expected to be frequently used.
> 
> Thanks for reviewing!

... and allow with backtrace iokit-external-method for these two methods.

That means everything else is denied without telemetry, right?

If so, I think this seems right.
Comment 6 Per Arne Vollan 2021-08-04 11:19:39 PDT
(In reply to Brent Fulgham from comment #5)
> Comment on attachment 434903 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=434903&action=review
> 
> r=me
> 
> > Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:269
> > +        (deny (with telemetry) (with message "IOMobileFramebufferUserClient")
> 
> So we deny (with telemetry) pretty much all uses of
> iokit-async-external-method, and iokit-external-trap ...
> 
> >>> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:273
> >>> +        (allow (with telemetry-backtrace) iokit-external-method
> >> 
> >> Do we really want telemetry-backtrace on these two methods?
> > 
> > Yes, I believe so. They are not expected to be frequently used.
> > 
> > Thanks for reviewing!
> 
> ... and allow with backtrace iokit-external-method for these two methods.
> 
> That means everything else is denied without telemetry, right?
> 
> If so, I think this seems right.

Actually, I think we are keeping telemetry without backtraces for the denied items, in order to be able to see if they are being used.

Thanks for reviewing!
Comment 7 EWS 2021-08-04 11:28:56 PDT
Committed r280644 (240255@main): <https://commits.webkit.org/240255@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434903 [details].