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

Side by Side Diff: syzygy/agent/asan/registry_cache.h

Issue 2378743002: [SyzyAsan] Disable registry filter for sandboxed processes. (Closed)
Patch Set: Created 4 years, 2 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 2015 Google Inc. All Rights Reserved. 1 // Copyright 2015 Google Inc. All Rights Reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // @param max_entries_per_version Value of max_entries_per_version_. 89 // @param max_entries_per_version Value of max_entries_per_version_.
90 // @param max_modules Value of max_modules_. 90 // @param max_modules Value of max_modules_.
91 // @param max_versions Value of max_versions_. 91 // @param max_versions Value of max_versions_.
92 explicit RegistryCache(const wchar_t* registry_name); 92 explicit RegistryCache(const wchar_t* registry_name);
93 RegistryCache(const wchar_t* registry_name, 93 RegistryCache(const wchar_t* registry_name,
94 size_t max_days_in_registry, 94 size_t max_days_in_registry,
95 size_t max_entries_per_version, 95 size_t max_entries_per_version,
96 size_t max_modules, 96 size_t max_modules,
97 size_t max_versions); 97 size_t max_versions);
98 98
99 // Returns true if the registry is available, false otherwise. On Chrome
100 // renderer processes the sandbox prevents access to the registry.
101 static bool RegistryAvailable();
102
99 // Initializes the registry cache and prunes old values in the registry. This 103 // Initializes the registry cache and prunes old values in the registry. This
100 // must be called once, before any other method. Note that this function is 104 // must be called once, before any other method. Note that this function is
101 // not thread-safe. 105 // not thread-safe.
102 // @returns false if an error occured. 106 // @returns false if an error occured.
103 bool Init(); 107 bool Init();
104 108
105 // Adds a new |allocation_stack_id|, if it was not existent. Otherwise, 109 // Adds a new |allocation_stack_id|, if it was not existent. Otherwise,
106 // updates it by removing corresponding registry value and inserting a new 110 // updates it by removing corresponding registry value and inserting a new
107 // one. note that the ID must be a relative one. Will not do anything if the 111 // one. note that the ID must be a relative one. Will not do anything if the
108 // module has not been initialized properly. 112 // module has not been initialized properly.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // The relative stack IDs that are loaded from the registry. 209 // The relative stack IDs that are loaded from the registry.
206 std::unordered_set<common::StackCapture::StackId> entries_; 210 std::unordered_set<common::StackCapture::StackId> entries_;
207 211
208 DISALLOW_COPY_AND_ASSIGN(RegistryCache); 212 DISALLOW_COPY_AND_ASSIGN(RegistryCache);
209 }; 213 };
210 214
211 } // namespace asan 215 } // namespace asan
212 } // namespace agent 216 } // namespace agent
213 217
214 #endif // SYZYGY_AGENT_ASAN_REGISTRY_CACHE_H_ 218 #endif // SYZYGY_AGENT_ASAN_REGISTRY_CACHE_H_
OLDNEW
« no previous file with comments | « syzygy/agent/asan/heap_managers/block_heap_manager.cc ('k') | syzygy/agent/asan/registry_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698