Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 | | 311 MITIGATION_WIN32K_DISABLE | |
|
jschuh
2014/05/16 20:28:12
Please remove MITIGATION_WIN32K_DISABLE here, beca
ananta
2014/05/16 21:12:18
Done.
| |
| 312 MITIGATION_EXTENSION_DLL_DISABLE | | 312 MITIGATION_EXTENSION_DLL_DISABLE | |
| 313 MITIGATION_DLL_SEARCH_ORDER)); | 313 MITIGATION_DLL_SEARCH_ORDER)); |
| 314 } | 314 } |
| 315 | 315 |
| 316 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) { | 316 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) { |
| 317 // These mitigations cannot be enabled prior to startup. | 317 // These mitigations cannot be enabled prior to startup. |
| 318 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS | | 318 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS | |
|
jschuh
2014/05/16 20:28:12
You'll need to update this test too:
https://code.
ananta
2014/05/16 21:12:18
Done.
| |
| 319 MITIGATION_WIN32K_DISABLE | | |
| 320 MITIGATION_DLL_SEARCH_ORDER)); | 319 MITIGATION_DLL_SEARCH_ORDER)); |
| 321 } | 320 } |
| 322 | 321 |
| 323 } // namespace sandbox | 322 } // namespace sandbox |
| 324 | 323 |
| OLD | NEW |