Commit 97b0a4e0 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

Whitelist dmabuf sync ioctl on all linux platforms

This ioctl is used to synchronize zero copy GPU uploads. Non-Chrome OS
builds are starting to be able to use this capability (wayland on linux
desktop, non-CrOS DRM platform builds) so whitelist it more broadly.

Bug: 898234, 864914
Test: chrome --enable-zero-copy --enable-native-gpu-memory-buffers
  on http://media.24ways.org/2009/15/space.html w/ fps counter

Change-Id: I449d5deddd48abff65a7f7add9c3b990f8d208e3
Reviewed-on: https://chromium-review.googlesource.com/c/1297085Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602049}
parent 26aac6e5
......@@ -15,7 +15,6 @@
#include "sandbox/linux/system_headers/linux_syscalls.h"
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
#if defined(OS_CHROMEOS)
// TODO(vignatti): replace the local definitions below with #include
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
#include <linux/types.h>
......@@ -26,7 +25,6 @@ struct local_dma_buf_sync {
#define LOCAL_DMA_BUF_BASE 'b'
#define LOCAL_DMA_BUF_IOCTL_SYNC \
_IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
#endif
using sandbox::SyscallSets;
using sandbox::bpf_dsl::Allow;
......@@ -43,10 +41,8 @@ ResultExpr RestrictIoctl() {
return Switch(request)
.SANDBOX_BPF_DSL_CASES((static_cast<unsigned long>(TCGETS), FIONREAD),
Allow())
#if defined(OS_CHROMEOS)
.SANDBOX_BPF_DSL_CASES(
(static_cast<unsigned long>(LOCAL_DMA_BUF_IOCTL_SYNC)), Allow())
#endif
.Default(sandbox::CrashSIGSYSIoctl());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment