From 69538cf7f379e6b75a3df9c8573942a8d824e823 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 19 Jan 2022 13:35:54 -0800 Subject: [PATCH] Disable pointer authentication in app processes. Unfortunately we have discovered that some applications in the wild are using PAC instructions incorrectly. To keep those applications working on PAC enabled devices, disable PAC in application processes for now. Bug: 212660282 Change-Id: I3030c47be9d02a27505bd4775c1982a20755758c --- cmds/app_process/Android.bp | 2 ++ cmds/app_process/app_main.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp index a1575173ded62..6a685a79cc335 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 12083b6fe20bb..815f9455471c9 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -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]