WebKit's GPU process could not load our Metal bundle on arm64 guests, so
every WebGL context in Safari was lost as it was made. Its sandbox profile
lets it read /Library/GPUBundles but maps nothing executable there, and on
arm64e each MAC policy's op is called on its own: RgfxGate answered AMFI's
file_check_mmap for the bundle, and Sandbox's still refused the mapping
("file system sandbox blocked mmap()"). On x86-64 the route is the
dispatcher itself, so Sandbox was never asked. replayd is refused the same
way.
Graft 0.3.0 routes another policy's op by a "<policy>:" prefix. RgfxGate
now routes "Sandbox:file_check_mmap" in a call of its own, with the AMFI
route's rule (an executable mapping of one of the bundle executable's
cdhashes, maxprot clamped to prot) and Sandbox's own original for
everything else. A Graft that refuses the route leaves the AMFI routes in
place and logs that sandboxed processes cannot map the bundle. amfi_test
holds the route's name; it indexes past the policy's prefix, since clang's
-Wstring-plus-int refuses adding to the literal. x86-64 is unchanged.
From steelbrain/appwalk3-sbx (58c059be7, df27bdc99).