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

Unified Diff: chrome_elf/blacklist/blacklist_interceptions.cc

Issue 101203010: Add 64-bit support to browser blacklisting (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome_elf/blacklist/blacklist_interceptions.cc
diff --git a/chrome_elf/blacklist/blacklist_interceptions.cc b/chrome_elf/blacklist/blacklist_interceptions.cc
index d0f64ea3721c0da47c368529ef6c53d254f12b60..5872a1f5a88c97ed43ce80bfc6636873ddfaaccb 100644
--- a/chrome_elf/blacklist/blacklist_interceptions.cc
+++ b/chrome_elf/blacklist/blacklist_interceptions.cc
@@ -169,6 +169,10 @@ bool IsSameAsCurrentProcess(HANDLE process) {
} // namespace
namespace blacklist {
+// Allocate storage for the pointer to the old NtMapViewOfSectionFunction.
+#pragma section(".oldntmap",write,read)
+__declspec(allocate(".oldntmap"))
+NtMapViewOfSectionFunction g_nt_map_view_of_section_func = NULL;
robertshield 2014/01/07 18:30:47 #if defined(_WIN64)?
csharp 2014/01/07 20:43:07 Done.
bool InitializeInterceptImports() {
g_nt_query_section_func = reinterpret_cast<NtQuerySectionFunction>(
@@ -229,4 +233,13 @@ SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection(
return ret;
}
+NTSTATUS WINAPI BlNtMapViewOfSection64(
csharp 2014/01/07 18:02:40 I had thought about moving this into a 64-bit spec
robertshield 2014/01/07 18:30:47 SGTM. Add #ifdefs around it?
csharp 2014/01/07 20:43:07 Done.
+ HANDLE section, HANDLE process, PVOID *base, ULONG_PTR zero_bits,
+ SIZE_T commit_size, PLARGE_INTEGER offset, PSIZE_T view_size,
+ SECTION_INHERIT inherit, ULONG allocation_type, ULONG protect) {
+ return BlNtMapViewOfSection(g_nt_map_view_of_section_func, section, process,
+ base, zero_bits, commit_size, offset, view_size,
+ inherit, allocation_type, protect);
+}
+
} // namespace blacklist

Powered by Google App Engine
This is Rietveld 408576698