Lines Matching refs:rule

34   """Represents one matching rule in a policy file."""
129 """Finds a rule whose name is |component_name|. """
130 for rule in self._rules:
131 if rule.name == component_name:
132 return rule
157 for rule in self._rules:
158 if (rule.allocator_type == 'malloc' and
159 (not rule.stackfunction_pattern or
160 rule.stackfunction_pattern.match(stackfunction)) and
161 (not rule.stacksourcefile_pattern or
162 rule.stacksourcefile_pattern.match(stacksourcefile)) and
163 (not rule.typeinfo_pattern or rule.typeinfo_pattern.match(typeinfo))):
164 bucket.component_cache = rule.name
165 return rule.name
201 for rule in self._rules:
202 if (rule.allocator_type == 'mmap' and
203 (not rule.stackfunction_pattern or
204 rule.stackfunction_pattern.match(stackfunction)) and
205 (not rule.stacksourcefile_pattern or
206 rule.stacksourcefile_pattern.match(stacksourcefile)) and
207 (not rule.mappedpathname_pattern or
208 rule.mappedpathname_pattern.match(region[1]['vma']['name'])) and
209 (not rule.mappedpermission_pattern or
210 rule.mappedpermission_pattern.match(
215 (not rule.sharedwith or
216 not pageframe or sharedwith in rule.sharedwith)):
217 return rule.name, bucket
239 for rule in self._rules:
240 if (rule.allocator_type == 'unhooked' and
241 (not rule.mappedpathname_pattern or
242 rule.mappedpathname_pattern.match(region[1]['vma']['name'])) and
243 (not rule.mappedpermission_pattern or
244 rule.mappedpermission_pattern.match(
249 (not rule.sharedwith or
250 not pageframe or sharedwith in rule.sharedwith)):
251 return rule.name
308 for rule in policy['rules']:
309 stackfunction = rule.get('stackfunction') or rule.get('stacktrace')
310 stacksourcefile = rule.get('stacksourcefile')
312 rule['name'],
313 rule['allocator'], # allocator_type
316 rule['typeinfo'] if 'typeinfo' in rule else None,
317 rule.get('mappedpathname'),
318 rule.get('mappedpermission'),
319 rule.get('sharedwith')))