Cherry-pick r289052. rdar://problem/88382949
[GPUP] Add read access to sysctl properties
https://bugs.webkit.org/show_bug.cgi?id=236018
<rdar://problem/88382949>
Reviewed by Darin Adler.
Add read access to sysctl properties based on telemetry.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
Canonical link: https://commits.webkit.org/246759@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canonical link: https://commits.webkit.org/245886.164@safari-613-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-613-branch@289344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index e22ca1a..97c7498 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,5 +1,36 @@
2022-02-07 Russell Epstein <repstein@apple.com>
+ Cherry-pick r289052. rdar://problem/88382949
+
+ [GPUP] Add read access to sysctl properties
+ https://bugs.webkit.org/show_bug.cgi?id=236018
+ <rdar://problem/88382949>
+
+ Reviewed by Darin Adler.
+
+ Add read access to sysctl properties based on telemetry.
+
+ * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
+ * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-03 Per Arne Vollan <pvollan@apple.com>
+
+ [GPUP] Add read access to sysctl properties
+ https://bugs.webkit.org/show_bug.cgi?id=236018
+ <rdar://problem/88382949>
+
+ Reviewed by Darin Adler.
+
+ Add read access to sysctl properties based on telemetry.
+
+ * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
+ * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
+
+2022-02-07 Russell Epstein <repstein@apple.com>
+
Cherry-pick r289026. rdar://problem/87358372
Remove debug log accidentally added with r289018
diff --git a/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in b/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in
index 27d47e9..c1e11e0 100644
--- a/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in
+++ b/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in
@@ -152,17 +152,24 @@
"hw.l2cachesize"
"hw.logicalcpu"
"hw.logicalcpu_max"
+ "hw.machine"
"hw.memsize"
"hw.model"
"hw.ncpu"
"hw.physicalcpu"
"hw.physicalcpu_max"
+ "hw.product"
+ "hw.target"
"hw.vectorunit"
"kern.hostname"
"kern.hv_vmm_present"
+ "kern.iossupportversion"
"kern.maxfilesperproc"
"kern.osproductversion"
- "kern.osrelease")
+ "kern.osrelease"
+ "kern.ostype"
+ "kern.osversion"
+ "kern.version")
(sysctl-name-prefix "hw.optional.") ;; <rdar://problem/71462790>
(sysctl-name-prefix "hw.perflevel") ;; <rdar://problem/76783596>
)
diff --git a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
index 8f3b8de..469158c 100644
--- a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
+++ b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
@@ -532,9 +532,11 @@
"hw.pagesize_compat"
"hw.physicalcpu_max"
"hw.product" ;; <rdar://problem/81334849>
+ "kern.bootargs"
"kern.osproductversion"
"kern.osvariant_status"
"kern.secure_kernel"
+ "kern.osversion"
"vm.footprint_suspend"))
(allow iokit-get-properties