OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 SANDBOX_SRC_POLICY_LOW_LEVEL_H__ | 5 #ifndef SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
6 #define SANDBOX_SRC_POLICY_LOW_LEVEL_H__ | 6 #define SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 // policyGen.AddRule(kNtCreateFileSvc, &rule1); | 36 // policyGen.AddRule(kNtCreateFileSvc, &rule1); |
37 // policyGen.AddRule(kNtCreateFileSvc, &rule2); | 37 // policyGen.AddRule(kNtCreateFileSvc, &rule2); |
38 // policyGen.Done(); | 38 // policyGen.Done(); |
39 // | 39 // |
40 // At this point (error checking omitted) the policy_memory can be copied | 40 // At this point (error checking omitted) the policy_memory can be copied |
41 // to the target process where it can be evaluated. | 41 // to the target process where it can be evaluated. |
42 | 42 |
43 namespace sandbox { | 43 namespace sandbox { |
44 | 44 |
45 // TODO(cpu): Move this constant to crosscall_client.h. | 45 // TODO(cpu): Move this constant to crosscall_client.h. |
46 const size_t kMaxServiceCount = 32; | 46 const size_t kMaxServiceCount = 64; |
47 static_assert(IPC_LAST_TAG <= kMaxServiceCount, | 47 static_assert(IPC_LAST_TAG <= kMaxServiceCount, |
48 "kMaxServiceCount is too low"); | 48 "kMaxServiceCount is too low"); |
49 | 49 |
50 // Defines the memory layout of the policy. This memory is filled by | 50 // Defines the memory layout of the policy. This memory is filled by |
51 // LowLevelPolicy object. | 51 // LowLevelPolicy object. |
52 // For example: | 52 // For example: |
53 // | 53 // |
54 // [Service 0] --points to---\ | 54 // [Service 0] --points to---\ |
55 // [Service 1] --------------|-----\ | 55 // [Service 1] --------------|-----\ |
56 // ...... | | | 56 // ...... | | |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 char* data_start, size_t* data_size) const; | 184 char* data_start, size_t* data_size) const; |
185 PolicyBuffer* buffer_; | 185 PolicyBuffer* buffer_; |
186 OpcodeFactory* opcode_factory_; | 186 OpcodeFactory* opcode_factory_; |
187 EvalResult action_; | 187 EvalResult action_; |
188 bool done_; | 188 bool done_; |
189 }; | 189 }; |
190 | 190 |
191 } // namespace sandbox | 191 } // namespace sandbox |
192 | 192 |
193 #endif // SANDBOX_SRC_POLICY_LOW_LEVEL_H__ | 193 #endif // SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
OLD | NEW |