Open Bug 2058461 Opened 4 months ago

Tighten the Linux sandbox policy for the HWInference utility process

Categories

(Core :: Machine Learning: On Device, task)

task

Tracking

()

People

(Reporter: padenot, Unassigned)

References

Details

The initial Linux broker policy for the HWInference utility process (SandboxBrokerPolicyFactory::GetHWInferencePolicy, bug 2051970 / https://phabricator.services.mozilla.com/D268412) was copied from the RDD policy and might be wider than what GPU compute needs.

In D268412 the video-decode-specific rules were dropped (the MOZ_ENABLE_V4L2 AddV4l2Dependencies call, added for Raspberry Pi decode in bug 1833354, and the NVIDIA Tegra L4T /dev/nvhost-nvdec*, /dev/nvhost-vic, /dev/nvmap rules from bug 1903688). What remains still needs an check, for when we land the vulkan shaders and wire things through:

  • AddGLDependencies(), AddLdconfigPaths() and AddLdLibraryEnvPaths(): work out what the mozinference GPU compute backends actually open and narrow to that.
  • /lib, /lib64, /usr/lib*, /run/opengl-driver/lib and /nix/store can maybe use a bit of clean up
  • The /sys/devices/{cpu,system/cpu,system/node} trees and the /proc/cpuinfo reads (see bug 1662321).
You need to log in before you can comment on or make changes to this bug.