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

Side by Side Diff: sandbox/win/src/process_mitigations.cc

Issue 282133007: Allow the MITIGATION_WIN32K_DISABLE process mitigation to be set in the renderer sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review comments Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | sandbox/win/src/process_mitigations_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "sandbox/win/src/process_mitigations.h" 5 #include "sandbox/win/src/process_mitigations.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "sandbox/win/src/nt_internals.h" 10 #include "sandbox/win/src/nt_internals.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 bool CanSetProcessMitigationsPostStartup(MitigationFlags flags) { 302 bool CanSetProcessMitigationsPostStartup(MitigationFlags flags) {
303 // All of these mitigations can be enabled after startup. 303 // All of these mitigations can be enabled after startup.
304 return !(flags & ~(MITIGATION_HEAP_TERMINATE | 304 return !(flags & ~(MITIGATION_HEAP_TERMINATE |
305 MITIGATION_DEP | 305 MITIGATION_DEP |
306 MITIGATION_DEP_NO_ATL_THUNK | 306 MITIGATION_DEP_NO_ATL_THUNK |
307 MITIGATION_RELOCATE_IMAGE | 307 MITIGATION_RELOCATE_IMAGE |
308 MITIGATION_RELOCATE_IMAGE_REQUIRED | 308 MITIGATION_RELOCATE_IMAGE_REQUIRED |
309 MITIGATION_BOTTOM_UP_ASLR | 309 MITIGATION_BOTTOM_UP_ASLR |
310 MITIGATION_STRICT_HANDLE_CHECKS | 310 MITIGATION_STRICT_HANDLE_CHECKS |
311 MITIGATION_WIN32K_DISABLE |
312 MITIGATION_EXTENSION_DLL_DISABLE | 311 MITIGATION_EXTENSION_DLL_DISABLE |
313 MITIGATION_DLL_SEARCH_ORDER)); 312 MITIGATION_DLL_SEARCH_ORDER));
314 } 313 }
315 314
316 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) { 315 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) {
317 // These mitigations cannot be enabled prior to startup. 316 // These mitigations cannot be enabled prior to startup.
318 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS | 317 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS |
319 MITIGATION_WIN32K_DISABLE |
320 MITIGATION_DLL_SEARCH_ORDER)); 318 MITIGATION_DLL_SEARCH_ORDER));
321 } 319 }
322 320
323 } // namespace sandbox 321 } // namespace sandbox
324 322
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | sandbox/win/src/process_mitigations_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698