Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Unified Diff: content/common/sandbox_linux/bpf_renderer_policy_linux.cc

Issue 1841683003: ui/ozone: Flush CPU caches when mapping/unmapping prime pixmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missing semicolon Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/bpf_renderer_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
index a3e74389425729b4762cb22e7d5acddd717a3281..2d338c95991d7294793589cb48668bcdf44113de 100644
--- a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
@@ -15,6 +15,18 @@
#include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h"
#include "sandbox/linux/system_headers/linux_syscalls.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>
+
+struct local_dma_buf_sync {
+ __u64 flags;
+};
+#define LOCAL_DMA_BUF_BASE 'b'
+#define LOCAL_DMA_BUF_IOCTL_SYNC _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
Robert Sesek 2016/04/04 18:12:17 Please wrap to 80 columns, and on line 46.
+#endif
+
using sandbox::SyscallSets;
using sandbox::bpf_dsl::Allow;
using sandbox::bpf_dsl::Arg;
@@ -30,6 +42,10 @@ 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());
}
« no previous file with comments | « no previous file | ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698