Bug 205463 - Log telemetry for IOUserClient lookups
Summary: Log telemetry for IOUserClient lookups
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: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-19 11:41 PST by Brent Fulgham
Modified: 2019-12-19 16:04 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.33 KB, patch)
2019-12-19 11:44 PST, Brent Fulgham
pvollan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-12-19 11:41:55 PST
We should use telemetry to make sure that every instance of an IOKit class we allow in our sandbox is actually needed by something for valid purposes.

Ideally, we would move as many of these out of the WebContent process as possible.

This telemetry will be a good first step in seeing if there is any low-hanging fruit.
Comment 1 Brent Fulgham 2019-12-19 11:42:10 PST
<rdar://problem/57987372>
Comment 2 Brent Fulgham 2019-12-19 11:44:59 PST
Created attachment 386127 [details]
Patch
Comment 3 Per Arne Vollan 2019-12-19 12:30:57 PST
Comment on attachment 386127 [details]
Patch

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

R=me.

> Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:451
>          (iokit-user-client-class "AppleJPEGDriverUserClient")
>          (iokit-user-client-class "IOSurfaceAcceleratorClient")

No telemetry for these?

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:564
>      (iokit-user-client-class "AppleMultitouchDeviceUserClient")
>      (iokit-user-client-class "AppleUpstreamUserClient")

Ditto.
Comment 4 Brent Fulgham 2019-12-19 13:24:05 PST
Comment on attachment 386127 [details]
Patch

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

>> Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:451
>>          (iokit-user-client-class "IOSurfaceAcceleratorClient")
> 
> No telemetry for these?

I think we expect to be using these, so telemetry won't be that useful (everyone will always have these). But if we move these features to the GPU Process we should add telemetry, too, and consider removing them.

>> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:564
>>      (iokit-user-client-class "AppleUpstreamUserClient")
> 
> Ditto.

Actually, I'm not sure if we use these. I'll add them.
Comment 5 Brent Fulgham 2019-12-19 16:04:06 PST
Committed r253798: <https://trac.webkit.org/changeset/253798>