diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2019-05-22 10:04:50 -0700 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2019-05-22 10:04:50 -0700 |
commit | 9d31ce99069b28d302c5487c2154fc0fd5c2f9fd (patch) | |
tree | 308cd6f191af161ad990cbd4dd2767c9cd715a8f /toolchain-extras | |
parent | f225e8c9342f9916b3be6b6c9eaabe46031c7c4c (diff) | |
download | extras-9d31ce99069b28d302c5487c2154fc0fd5c2f9fd.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
Diffstat (limited to 'toolchain-extras')
-rw-r--r-- | toolchain-extras/profile-extras-test.cpp | 2 | ||||
-rw-r--r-- | toolchain-extras/profile-extras.cpp | 2 |
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". |