diff options
Diffstat (limited to 'devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc')
-rw-r--r-- | devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc b/devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc new file mode 100644 index 000000000000..638308bfa4c0 --- /dev/null +++ b/devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc @@ -0,0 +1,58 @@ +--- content/gpu/gpu_sandbox_hook_linux.cc.orig 2019-12-12 12:39:40 UTC ++++ content/gpu/gpu_sandbox_hook_linux.cc +@@ -96,8 +96,9 @@ static const char kLibV4lEncPluginPath[] = + "/usr/lib/libv4l/plugins/libv4l-encplugin.so"; + #endif + +-constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; ++constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL; + ++#if !defined(OS_BSD) + void AddV4L2GpuWhitelist( + std::vector<BrokerFilePermission>* permissions, + const service_manager::SandboxSeccompBPF::Options& options) { +@@ -299,8 +300,10 @@ std::vector<BrokerFilePermission> FilePermissionsForGp + AddStandardGpuWhiteList(&permissions); + return permissions; + } ++#endif + + void LoadArmGpuLibraries() { ++#if !defined(OS_BSD) + // Preload the Mali library. + if (UseChromecastSandboxWhitelist()) { + for (const char* path : kWhitelistedChromecastPaths) { +@@ -315,6 +318,7 @@ void LoadArmGpuLibraries() { + // Preload the Tegra V4L2 (video decode acceleration) library. + dlopen(kLibTegraPath, dlopen_flag); + } ++#endif + } + + bool LoadAmdGpuLibraries() { +@@ -370,6 +374,7 @@ bool LoadLibrariesForGpu( + return true; + } + ++#if !defined(OS_BSD) + sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( + const service_manager::SandboxLinux::Options& options) { + sandbox::syscall_broker::BrokerCommandSet command_set; +@@ -390,13 +395,17 @@ bool BrokerProcessPreSandboxHook( + service_manager::SetProcessTitleFromCommandLine(nullptr); + return true; + } ++#endif + + } // namespace + + bool GpuProcessPreSandboxHook(service_manager::SandboxLinux::Options options) { ++ NOTIMPLEMENTED(); ++#if !defined(OS_BSD) + service_manager::SandboxLinux::GetInstance()->StartBrokerProcess( + CommandSetForGPU(options), FilePermissionsForGpu(options), + base::BindOnce(BrokerProcessPreSandboxHook), options); ++#endif + + if (!LoadLibrariesForGpu(options)) + return false; |