diff options
author | Liu.andrew.x@gmail.com <Liu.andrew.x@gmail.com> | 2015-06-30 18:17:23 +0000 |
---|---|---|
committer | Liu.andrew.x@gmail.com <Liu.andrew.x@gmail.com> | 2015-06-30 18:17:23 +0000 |
commit | 440c1f79ef1e2e6bcfde08b98d925182a21f53fa (patch) | |
tree | f320c2c812e15fc24864e1554aede6ab3ed9ad72 | |
parent | Adjust breakpad module size to match adjusted start_addr. (diff) | |
download | breakpad-440c1f79ef1e2e6bcfde08b98d925182a21f53fa.tar.xz |
This CL adds support for ARM and ARM64 architectures when calculating
exploitability ratings.
The stackwalker will now grab the instruction pointers for ARM and ARM64
architectures, so checking exploitability on ARM and ARM64 will no longer
return EXPLOITABILITY_ERR_PROCESSING.
R=ivanpe@chromium.org
Review URL: https://codereview.chromium.org/1216063004
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1466 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/processor/exploitability_linux.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/processor/exploitability_linux.cc b/src/processor/exploitability_linux.cc index c11aed4c..4f98dfeb 100644 --- a/src/processor/exploitability_linux.cc +++ b/src/processor/exploitability_linux.cc @@ -106,8 +106,15 @@ ExploitabilityRating ExploitabilityLinux::CheckPlatformExploitability() { case MD_CONTEXT_AMD64: instruction_ptr = context->GetContextAMD64()->rip; break; + case MD_CONTEXT_ARM: + instruction_ptr = + context->GetContextARM()->iregs[MD_CONTEXT_ARM_REG_PC]; + break; + case MD_CONTEXT_ARM64: + instruction_ptr = + context->GetContextARM64()->iregs[MD_CONTEXT_ARM64_REG_PC]; + break; default: - // TODO(liuandrew): Add support ARM and arm64 architectures. BPLOG(INFO) << "Unsupported architecture."; return EXPLOITABILITY_ERR_PROCESSING; } |