Chromium Code Reviews| 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 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ | 5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ |
| 6 #define CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ | 6 #define CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ |
| 7 | 7 |
| 8 #include "sandbox/win/src/nt_internals.h" | 8 #include "sandbox/win/src/nt_internals.h" |
| 9 #include "sandbox/win/src/sandbox_types.h" | 9 #include "sandbox/win/src/sandbox_types.h" |
| 10 | 10 |
| 11 namespace blacklist { | 11 namespace blacklist { |
| 12 | 12 |
| 13 extern NtMapViewOfSectionFunction g_nt_map_view_of_section_func; | |
| 14 | |
| 13 bool InitializeInterceptImports(); | 15 bool InitializeInterceptImports(); |
| 14 | 16 |
| 15 // Interception of NtMapViewOfSection within the current process. | 17 // Interception of NtMapViewOfSection within the current process. |
| 16 // It should never be called directly. This function provides the means to | 18 // It should never be called directly. This function provides the means to |
| 17 // detect dlls being loaded, so we can patch them if needed. | 19 // detect dlls being loaded, so we can patch them if needed. |
| 18 SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection( | 20 SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection( |
| 19 NtMapViewOfSectionFunction orig_MapViewOfSection, | 21 NtMapViewOfSectionFunction orig_MapViewOfSection, |
| 20 HANDLE section, | 22 HANDLE section, |
| 21 HANDLE process, | 23 HANDLE process, |
| 22 PVOID *base, | 24 PVOID *base, |
| 23 ULONG_PTR zero_bits, | 25 ULONG_PTR zero_bits, |
| 24 SIZE_T commit_size, | 26 SIZE_T commit_size, |
| 25 PLARGE_INTEGER offset, | 27 PLARGE_INTEGER offset, |
| 26 PSIZE_T view_size, | 28 PSIZE_T view_size, |
| 27 SECTION_INHERIT inherit, | 29 SECTION_INHERIT inherit, |
| 28 ULONG allocation_type, | 30 ULONG allocation_type, |
| 29 ULONG protect); | 31 ULONG protect); |
| 30 | 32 |
| 33 // Interception of NtMapViewOfSection on the child process. | |
|
robertshield
2014/01/07 18:30:47
s/on the child process/within the current process/
csharp
2014/01/07 20:43:07
Done.
| |
| 34 // It should never be called directly. This function provides the means to | |
| 35 // detect dlls being loaded, so we can patch them if needed. | |
| 36 SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection64( | |
|
robertshield
2014/01/07 18:30:47
#if defined(_WIN64)
csharp
2014/01/07 20:43:07
Done.
| |
| 37 HANDLE section, HANDLE process, PVOID *base, ULONG_PTR zero_bits, | |
| 38 SIZE_T commit_size, PLARGE_INTEGER offset, PSIZE_T view_size, | |
| 39 SECTION_INHERIT inherit, ULONG allocation_type, ULONG protect); | |
| 40 | |
| 31 } // namespace blacklist | 41 } // namespace blacklist |
| 32 | 42 |
| 33 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ | 43 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_INTERCEPTIONS_H_ |
| OLD | NEW |