| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Implementation of NtMapViewOfSection intercept for 32 bit builds. | 5 // Implementation of NtMapViewOfSection intercept for 32 bit builds. |
| 6 // | 6 // |
| 7 // TODO(robertshield): Implement the 64 bit intercept. | 7 // TODO(robertshield): Implement the 64 bit intercept. |
| 8 | 8 |
| 9 #include "chrome_elf/blacklist/blacklist_interceptions.h" | 9 #include "chrome_elf/blacklist/blacklist_interceptions.h" |
| 10 | 10 |
| 11 #include <stddef.h> | 11 #include <stddef.h> |
| 12 #include <stdint.h> | 12 #include <stdint.h> |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 // Note that only #includes from base that are either header-only or built into | 17 // Note that only #includes from base that are either header-only or built into |
| 18 // base_static (see base/base.gyp) are allowed here. | 18 // base_static (see base/base.gyp) are allowed here. |
| 19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
| 20 #include "base/win/pe_image.h" | 20 #include "base/win/pe_image.h" |
| 21 #include "chrome_elf/blacklist/blacklist.h" | 21 #include "chrome_elf/blacklist/blacklist.h" |
| 22 #include "chrome_elf/breakpad.h" | 22 #include "chrome_elf/blacklist/crashpad_helper.h" |
| 23 #include "sandbox/win/src/internal_types.h" | 23 #include "sandbox/win/src/internal_types.h" |
| 24 #include "sandbox/win/src/nt_internals.h" | 24 #include "sandbox/win/src/nt_internals.h" |
| 25 #include "sandbox/win/src/sandbox_nt_util.h" | 25 #include "sandbox/win/src/sandbox_nt_util.h" |
| 26 #include "sandbox/win/src/sandbox_types.h" | 26 #include "sandbox/win/src/sandbox_types.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 NtQuerySectionFunction g_nt_query_section_func = NULL; | 30 NtQuerySectionFunction g_nt_query_section_func = NULL; |
| 31 NtQueryVirtualMemoryFunction g_nt_query_virtual_memory_func = NULL; | 31 NtQueryVirtualMemoryFunction g_nt_query_virtual_memory_func = NULL; |
| 32 NtUnmapViewOfSectionFunction g_nt_unmap_view_of_section_func = NULL; | 32 NtUnmapViewOfSectionFunction g_nt_unmap_view_of_section_func = NULL; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 NTSTATUS WINAPI BlNtMapViewOfSection64( | 274 NTSTATUS WINAPI BlNtMapViewOfSection64( |
| 275 HANDLE section, HANDLE process, PVOID *base, ULONG_PTR zero_bits, | 275 HANDLE section, HANDLE process, PVOID *base, ULONG_PTR zero_bits, |
| 276 SIZE_T commit_size, PLARGE_INTEGER offset, PSIZE_T view_size, | 276 SIZE_T commit_size, PLARGE_INTEGER offset, PSIZE_T view_size, |
| 277 SECTION_INHERIT inherit, ULONG allocation_type, ULONG protect) { | 277 SECTION_INHERIT inherit, ULONG allocation_type, ULONG protect) { |
| 278 return BlNtMapViewOfSection(g_nt_map_view_of_section_func, section, process, | 278 return BlNtMapViewOfSection(g_nt_map_view_of_section_func, section, process, |
| 279 base, zero_bits, commit_size, offset, view_size, | 279 base, zero_bits, commit_size, offset, view_size, |
| 280 inherit, allocation_type, protect); | 280 inherit, allocation_type, protect); |
| 281 } | 281 } |
| 282 #endif | 282 #endif |
| 283 } // namespace blacklist | 283 } // namespace blacklist |
| OLD | NEW |