summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Peter Collingbourne <pcc@google.com> 2022-01-24 21:50:23 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-01-24 21:50:23 +0000
commit1d5943f8e45f5f504f24848a56b88b8ae466201c (patch)
tree6173c0f63a1d2e2509d1ff294558cf4962e8a71a
parent402c615d7a9da173132626f247fdb9db6a829dff (diff)
parent373ab4c0d860184bccee8941b906c7c0583c00ea (diff)
Merge "Disable pointer authentication in app processes." am: 4b799b3691 am: 373ab4c0d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954983 Change-Id: I9f6de7f1452011ff40dabb7c489c0423974639f5
-rw-r--r--cmds/app_process/Android.bp2
-rw-r--r--cmds/app_process/app_main.cpp5
2 files changed, 7 insertions, 0 deletions
diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp
index a1575173ded6..6a685a79cc33 100644
--- a/cmds/app_process/Android.bp
+++ b/cmds/app_process/Android.bp
@@ -64,6 +64,8 @@ cc_binary {
"libwilhelm",
],
+ header_libs: ["bionic_libc_platform_headers"],
+
compile_multilib: "both",
cflags: [
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 12083b6fe20b..815f9455471c 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -15,6 +15,7 @@
#include <android-base/macros.h>
#include <binder/IPCThreadState.h>
+#include <bionic/pac.h>
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
#include <cutils/memory.h>
@@ -182,6 +183,10 @@ int main(int argc, char* const argv[])
ALOGV("app_process main with argv: %s", argv_String.string());
}
+ // Because of applications that are using PAC instructions incorrectly, PAC
+ // is disabled in application processes for now.
+ ScopedDisablePAC x;
+
AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv));
// Process command line arguments
// ignore argv[0]