summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2019-05-22 10:04:50 -0700
committerOliver Nguyen <olivernguyen@google.com>2019-06-03 11:56:59 -0700
commitbaedc8e8815de4e5ec0060ce7a9292560422b268 (patch)
tree7cb4b251872f8ec8e56afdbca95065bdd2b3a66d
parent84d06f1474fbd39d1430fce55595d7929c9ecdf7 (diff)
downloadextras-baedc8e8815de4e5ec0060ce7a9292560422b268.tar.gz
Prefix sysprop for flushing coverage with 'debug.'
Bug: http://b/133322197 Fix selinux denials when reading the coverage.flush sysprop by prefixing it with 'debug.'. Sysprops starting with 'debug.' are readable by all processes when ro.debuggable is set. Test: Build cuttlefish with coverage and verify that selinux denials for sysprop reads no longer happen. Change-Id: I76bef0a658ce881cc81e2d2d4947bef966060376 (cherry picked from commit 9d31ce99069b28d302c5487c2154fc0fd5c2f9fd)
-rw-r--r--toolchain-extras/profile-extras-test.cpp2
-rw-r--r--toolchain-extras/profile-extras.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/toolchain-extras/profile-extras-test.cpp b/toolchain-extras/profile-extras-test.cpp
index 0cc4cef8..5e48a646 100644
--- a/toolchain-extras/profile-extras-test.cpp
+++ b/toolchain-extras/profile-extras-test.cpp
@@ -28,7 +28,7 @@ void __gcov_flush() {
}
}
-static const char kCoveragePropName[] = "coverage.flush";
+static const char kCoveragePropName[] = "debug.coverage.flush";
TEST(profile_extras, smoke) {
flush_count = 0;
diff --git a/toolchain-extras/profile-extras.cpp b/toolchain-extras/profile-extras.cpp
index 3af46a10..1b1393b7 100644
--- a/toolchain-extras/profile-extras.cpp
+++ b/toolchain-extras/profile-extras.cpp
@@ -33,7 +33,7 @@ static void gcov_signal_handler(__unused int signum) {
__gcov_flush();
}
-static const char kCoveragePropName[] = "coverage.flush";
+static const char kCoveragePropName[] = "debug.coverage.flush";
// In a loop, wait for any change to sysprops and trigger a __gcov_flush when
// <kCoveragePropName> sysprop transistions to "1" after a transistion to "0".