OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <asm/unistd.h> | 5 #include <asm/unistd.h> |
6 #include <dlfcn.h> | 6 #include <dlfcn.h> |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/audit.h> | 9 #include <linux/audit.h> |
10 #include <linux/filter.h> | 10 #include <linux/filter.h> |
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1787 | 1787 |
1788 void AddArmMaliGpuWhitelist(std::vector<std::string>* read_whitelist, | 1788 void AddArmMaliGpuWhitelist(std::vector<std::string>* read_whitelist, |
1789 std::vector<std::string>* write_whitelist) { | 1789 std::vector<std::string>* write_whitelist) { |
1790 // Device file needed by the ARM GPU userspace. | 1790 // Device file needed by the ARM GPU userspace. |
1791 static const char kMali0Path[] = "/dev/mali0"; | 1791 static const char kMali0Path[] = "/dev/mali0"; |
1792 | 1792 |
1793 // Devices needed for video decode acceleration on ARM. | 1793 // Devices needed for video decode acceleration on ARM. |
1794 static const char kDevMfcDecPath[] = "/dev/mfc-dec"; | 1794 static const char kDevMfcDecPath[] = "/dev/mfc-dec"; |
1795 static const char kDevGsc1Path[] = "/dev/gsc1"; | 1795 static const char kDevGsc1Path[] = "/dev/gsc1"; |
1796 | 1796 |
1797 // Devices needed for video encode acceleration on ARM. | |
1798 static const char kDevMfcEncPath[] = "/dev/mfc-enc"; | |
jln (very slow on Chromium)
2013/08/14 04:30:17
Is there no way that this device could be opened,
sheu
2013/08/14 05:44:44
Yep.
Every time you open the device you get anoth
| |
1799 | |
1797 read_whitelist->push_back(kMali0Path); | 1800 read_whitelist->push_back(kMali0Path); |
1798 read_whitelist->push_back(kDevMfcDecPath); | 1801 read_whitelist->push_back(kDevMfcDecPath); |
1799 read_whitelist->push_back(kDevGsc1Path); | 1802 read_whitelist->push_back(kDevGsc1Path); |
1803 read_whitelist->push_back(kDevMfcEncPath); | |
1800 | 1804 |
1801 write_whitelist->push_back(kMali0Path); | 1805 write_whitelist->push_back(kMali0Path); |
1802 write_whitelist->push_back(kDevMfcDecPath); | 1806 write_whitelist->push_back(kDevMfcDecPath); |
1803 write_whitelist->push_back(kDevGsc1Path); | 1807 write_whitelist->push_back(kDevGsc1Path); |
1808 read_whitelist->push_back(kDevMfcEncPath); | |
hshi1
2013/08/14 01:21:35
Did you mean write_whitelist->push_back(kDevMfcEnc
jln (very slow on Chromium)
2013/08/14 04:30:17
If this works fine without write access, please re
sheu
2013/08/14 05:44:44
Lulz. I forgot to actually remove the --no-sandbo
| |
1804 } | 1809 } |
1805 | 1810 |
1806 void AddArmTegraGpuWhitelist(std::vector<std::string>* read_whitelist, | 1811 void AddArmTegraGpuWhitelist(std::vector<std::string>* read_whitelist, |
1807 std::vector<std::string>* write_whitelist) { | 1812 std::vector<std::string>* write_whitelist) { |
1808 // Device files needed by the Tegra GPU userspace. | 1813 // Device files needed by the Tegra GPU userspace. |
1809 static const char kDevNvhostCtrlPath[] = "/dev/nvhost-ctrl"; | 1814 static const char kDevNvhostCtrlPath[] = "/dev/nvhost-ctrl"; |
1810 static const char kDevNvhostGr2dPath[] = "/dev/nvhost-gr2d"; | 1815 static const char kDevNvhostGr2dPath[] = "/dev/nvhost-gr2d"; |
1811 static const char kDevNvhostGr3dPath[] = "/dev/nvhost-gr3d"; | 1816 static const char kDevNvhostGr3dPath[] = "/dev/nvhost-gr3d"; |
1812 static const char kDevNvhostIspPath[] = "/dev/nvhost-isp"; | 1817 static const char kDevNvhostIspPath[] = "/dev/nvhost-isp"; |
1813 static const char kDevNvhostViPath[] = "/dev/nvhost-vi"; | 1818 static const char kDevNvhostViPath[] = "/dev/nvhost-vi"; |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2071 return false; | 2076 return false; |
2072 } | 2077 } |
2073 | 2078 |
2074 #if defined(SECCOMP_BPF_SANDBOX) | 2079 #if defined(SECCOMP_BPF_SANDBOX) |
2075 playground2::BpfSandboxPolicyCallback SandboxSeccompBpf::GetBaselinePolicy() { | 2080 playground2::BpfSandboxPolicyCallback SandboxSeccompBpf::GetBaselinePolicy() { |
2076 return base::Bind(&BaselinePolicyWithAux); | 2081 return base::Bind(&BaselinePolicyWithAux); |
2077 } | 2082 } |
2078 #endif // defined(SECCOMP_BPF_SANDBOX) | 2083 #endif // defined(SECCOMP_BPF_SANDBOX) |
2079 | 2084 |
2080 } // namespace content | 2085 } // namespace content |
OLD | NEW |