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

Side by Side Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.h

Issue 570763002: Remove more dependencies on sandbox/linux/seccomp-bpf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_ 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_
6 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_ 6 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 virtual bool PreSandboxHook() OVERRIDE; 28 virtual bool PreSandboxHook() OVERRIDE;
29 29
30 protected: 30 protected:
31 // Start a broker process to handle open() inside the sandbox. 31 // Start a broker process to handle open() inside the sandbox.
32 // |broker_sandboxer_allocator| is a function pointer which can allocate a 32 // |broker_sandboxer_allocator| is a function pointer which can allocate a
33 // suitable sandbox policy for the broker process itself. 33 // suitable sandbox policy for the broker process itself.
34 // |read_whitelist_extra| and |write_whitelist_extra| are lists of file 34 // |read_whitelist_extra| and |write_whitelist_extra| are lists of file
35 // names that should be whitelisted by the broker process, in addition to 35 // names that should be whitelisted by the broker process, in addition to
36 // the basic ones. 36 // the basic ones.
37 void InitGpuBrokerProcess( 37 void InitGpuBrokerProcess(
38 sandbox::SandboxBPFPolicy* (*broker_sandboxer_allocator)(void), 38 sandbox::bpf_dsl::SandboxBPFDSLPolicy* (*broker_sandboxer_allocator)(
39 void),
39 const std::vector<std::string>& read_whitelist_extra, 40 const std::vector<std::string>& read_whitelist_extra,
40 const std::vector<std::string>& write_whitelist_extra); 41 const std::vector<std::string>& write_whitelist_extra);
41 42
42 sandbox::BrokerProcess* broker_process() { return broker_process_; } 43 sandbox::BrokerProcess* broker_process() { return broker_process_; }
43 44
44 private: 45 private:
45 // A BrokerProcess is a helper that is started before the sandbox is engaged 46 // A BrokerProcess is a helper that is started before the sandbox is engaged
46 // and will serve requests to access files over an IPC channel. The client of 47 // and will serve requests to access files over an IPC channel. The client of
47 // this runs from a SIGSYS handler triggered by the seccomp-bpf sandbox. 48 // this runs from a SIGSYS handler triggered by the seccomp-bpf sandbox.
48 // This should never be destroyed, as after the sandbox is started it is 49 // This should never be destroyed, as after the sandbox is started it is
49 // vital to the process. 50 // vital to the process.
50 // This is allocated by InitGpuBrokerProcess, called from PreSandboxHook(), 51 // This is allocated by InitGpuBrokerProcess, called from PreSandboxHook(),
51 // which executes iff the sandbox is going to be enabled afterwards. 52 // which executes iff the sandbox is going to be enabled afterwards.
52 sandbox::BrokerProcess* broker_process_; 53 sandbox::BrokerProcess* broker_process_;
53 DISALLOW_COPY_AND_ASSIGN(GpuProcessPolicy); 54 DISALLOW_COPY_AND_ASSIGN(GpuProcessPolicy);
54 }; 55 };
55 56
56 } // namespace content 57 } // namespace content
57 58
58 #endif // CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_ 59 #endif // CONTENT_COMMON_SANDBOX_LINUX_BPF_GPU_POLICY_LINUX_H_
OLDNEW
« no previous file with comments | « content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc ('k') | content/common/sandbox_linux/bpf_gpu_policy_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698