Bug 205463

Summary: Log telemetry for IOUserClient lookups
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, ggaren, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch pvollan: review+

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>