diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-08 16:04:43 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-08 16:04:43 +0000 |
commit | 7a90093d6b71d79d87b18148fe6af5611952bbb2 (patch) | |
tree | 0b035ddca802cb37fd548a6d3d7c55e7a621aac5 /simpleperf/main.cpp | |
parent | 23c944f6dd01b7975a0dd85d48ab4f2abbad2593 (diff) | |
parent | e474f50680b5c938d7462172b949578699df2854 (diff) | |
download | extras-aml_tz2_305400100.tar.gz |
Snap for 8426163 from e474f50680b5c938d7462172b949578699df2854 to mainline-tzdata2-releaseandroid-mainline-12.0.0_r112aml_tz2_305400500aml_tz2_305400300aml_tz2_305400100aml_tz2_304500300aml_tz2_303900110aml_tz2_303900102aml_tz2_303800002aml_tz2_303800001aml_tz2_303200001android12-mainline-tzdata2-releaseaml_tz2_305400100
Change-Id: Idbcfde9117fc93b159ca7325439be30538debfe5
Diffstat (limited to 'simpleperf/main.cpp')
-rw-r--r-- | simpleperf/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/simpleperf/main.cpp b/simpleperf/main.cpp index 21c5351e..49d25481 100644 --- a/simpleperf/main.cpp +++ b/simpleperf/main.cpp @@ -21,19 +21,17 @@ #include "command.h" #include "environment.h" -using namespace simpleperf; - #if defined(__ANDROID__) bool AndroidSecurityCheck() { // Simpleperf can be executed by the shell, or by apps themselves. To avoid malicious apps // exploiting perf_event_open interface via simpleperf, simpleperf needs proof that the user // is expecting simpleperf to be ran: - // 1) On Android < R, perf_event_open is secured by perf_event_allow_path, which is controlled + // 1) On Android < R, perf_event_open is secured by perf_event_paranoid, which is controlled // by security.perf_harden property. perf_event_open syscall can be used only after user setting // security.perf_harden to 0 in shell. So we don't need to check security.perf_harden explicitly. // 2) On Android R, perf_event_open may be controlled by selinux instead of - // perf_event_allow_path. So we need to check security.perf_harden explicitly. If simpleperf is + // perf_event_paranoid. So we need to check security.perf_harden explicitly. If simpleperf is // running via shell, we already know the origin of the request is the user, so set the property // ourselves for convenience. When started by the app, we won't have the permission to set the // property, so the user will need to prove this intent by setting it manually via shell. |