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
This commit is contained in:
Peter Collingbourne 2022-01-19 13:35:54 -08:00
parent 99da93a0e7
commit 69538cf7f3
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,8 @@ cc_binary {
"libwilhelm",
],
header_libs: ["bionic_libc_platform_headers"],
compile_multilib: "both",
cflags: [

View File

@ -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]