[iOS] Add telemetry for IOKIt classes not seen in test runs
https://bugs.webkit.org/show_bug.cgi?id=206386
<rdar://problem/58663519>

Reviewed by Per Arne Vollan.

Capture telemetry to show which IOKit classes are acitvely used in WebKit.

No new tests because this does not change behavior.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@254734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 2bec080..9029ee1 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2020-01-16  Brent Fulgham  <bfulgham@apple.com>
+
+        [iOS] Add telemetry for IOKIt classes not seen in test runs
+        https://bugs.webkit.org/show_bug.cgi?id=206386
+        <rdar://problem/58663519>
+
+        Reviewed by Per Arne Vollan.
+
+        Capture telemetry to show which IOKit classes are acitvely used in WebKit.
+
+        No new tests because this does not change behavior.
+
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-01-16  Chris Dumez  <cdumez@apple.com>
 
         IPC hardening for WebPageProxy::SetPromisedDataForImage message
diff --git a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
index f09b741..edfc77a 100644
--- a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
+++ b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
@@ -265,12 +265,12 @@
 ;;; Declare that the application uses the OpenGL, Metal, and CoreML hardware & frameworks.
 ;;;
 (define-once (opengl)
-    (allow iokit-open
+    ;; Items not seen in testing
+    (allow iokit-open (with report) (with telemetry)
            (iokit-connection "IOGPU")
            (iokit-user-client-class
                 "AGXCommandQueue"
                 "AGXDevice"
-                "AGXDeviceUserClient"
                 "AGXSharedUserClient"
                 "IOAccelContext"
                 "IOAccelDevice"
@@ -280,6 +280,13 @@
                 "IOAccelDevice2"
                 "IOAccelSharedUserClient2"))
 
+    ;; Items with known uses
+    (allow iokit-open
+        (iokit-connection "IOGPU")
+        (iokit-user-client-class
+            "AGXDeviceUserClient" ;; Used by WebGL
+    ))
+
     (allow iokit-get-properties
         (iokit-property "IOGLBundleName")
         (iokit-property "IOGLESBundleName")
@@ -448,10 +455,14 @@
     )
 
     ; UIKit-required IOKit nodes.
-    (allow iokit-open
+    (allow iokit-open  (with report) (with telemetry)
         (iokit-user-client-class "AppleJPEGDriverUserClient")
-        (iokit-user-client-class "IOSurfaceAcceleratorClient")
         (iokit-user-client-class "IOSurfaceSendRight")
+    )
+
+    ; WebKit-required IOKit classes
+    (allow iokit-open
+        (iokit-user-client-class "IOSurfaceAcceleratorClient") ;; Media rendering into pixel buffers
         (iokit-user-client-class "IOSurfaceRootUserClient") ;; Needed by Tiled Grid code.
     )