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

Unified Diff: sandbox/src/resolver_64.cc

Issue 10783004: Move Windows Sandbox, trybots version (don't commit me!) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to top of tree Created 8 years, 5 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
« no previous file with comments | « sandbox/src/resolver_32.cc ('k') | sandbox/src/restricted_token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/resolver_64.cc
diff --git a/sandbox/src/resolver_64.cc b/sandbox/src/resolver_64.cc
deleted file mode 100644
index 96d039b9b5bfa6b00f3bb219bc22a6ae12963496..0000000000000000000000000000000000000000
--- a/sandbox/src/resolver_64.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sandbox/src/resolver.h"
-
-#include "sandbox/src/sandbox_nt_util.h"
-
-namespace {
-
-const BYTE kPushRax = 0x50;
-const USHORT kMovRax = 0xB848;
-const ULONG kMovRspRax = 0x24048948;
-const BYTE kRetNp = 0xC3;
-
-#pragma pack(push, 1)
-struct InternalThunk {
- // This struct contains roughly the following code:
- // 00 50 push rax
- // 01 48b8f0debc9a78563412 mov rax,123456789ABCDEF0h
- // 0b 48890424 mov qword ptr [rsp],rax
- // 0f c3 ret
- //
- // The code modifies rax, but that should not be an issue for the common
- // calling conventions.
-
- InternalThunk() {
- push_rax = kPushRax;
- mov_rax = kMovRax;
- interceptor_function = 0;
- mov_rsp_rax = kMovRspRax;
- ret = kRetNp;
- };
- BYTE push_rax; // = 50
- USHORT mov_rax; // = 48 B8
- ULONG_PTR interceptor_function;
- ULONG mov_rsp_rax; // = 48 89 04 24
- BYTE ret; // = C3
-};
-#pragma pack(pop)
-
-} // namespace.
-
-namespace sandbox {
-
-size_t ResolverThunk::GetInternalThunkSize() const {
- return sizeof(InternalThunk);
-}
-
-bool ResolverThunk::SetInternalThunk(void* storage, size_t storage_bytes,
- const void* original_function,
- const void* interceptor) {
- if (storage_bytes < sizeof(InternalThunk))
- return false;
-
- InternalThunk* thunk = new(storage, NT_PLACE) InternalThunk;
- thunk->interceptor_function = reinterpret_cast<ULONG_PTR>(interceptor);
-
- return true;
-}
-
-NTSTATUS ResolverThunk::ResolveTarget(const void* module,
- const char* function_name,
- void** address) {
- // We don't support sidestep & co.
- return STATUS_NOT_IMPLEMENTED;
-}
-
-} // namespace sandbox
« no previous file with comments | « sandbox/src/resolver_32.cc ('k') | sandbox/src/restricted_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698