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
This commit is contained in:
Liu.andrew.x@gmail.com 2015-06-30 18:17:23 +00:00
parent cd744acecc
commit 440c1f79ef

View file

@ -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;
}