Merge "LogAudit: remove dynamic rate limiter"
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 4b6c502..439ab39 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -350,13 +350,15 @@
ufds[0].events = POLLIN;
ufds[0].revents = 0;
while (*timeout_ms > 0) {
- Timer timer;
- int nr = poll(ufds, 1, *timeout_ms);
- uint64_t millis = timer.duration().count();
- *timeout_ms = (millis > *timeout_ms) ? 0 : *timeout_ms - millis;
+ auto start_time = std::chrono::steady_clock::now();
+ int nr = poll(ufds, 1, *timeout_ms);
+ auto now = std::chrono::steady_clock::now();
+ auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time);
+ uint64_t millis = time_elapsed.count();
+ *timeout_ms = (millis > *timeout_ms) ? 0 : *timeout_ms - millis;
- if (nr > 0) {
- return true;
+ if (nr > 0) {
+ return true;
}
if (nr == 0) {
diff --git a/libnativeloader/Android.bp b/libnativeloader/Android.bp
index 4b21edc..17983bc 100644
--- a/libnativeloader/Android.bp
+++ b/libnativeloader/Android.bp
@@ -19,4 +19,8 @@
"-fvisibility=hidden",
],
export_include_dirs: ["include"],
+ required: [
+ "llndk.libraries.txt",
+ "vndksp.libraries.txt",
+ ],
}
diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c
index 5cfa2c8..fd83ecc 100644
--- a/lmkd/lmkd.c
+++ b/lmkd/lmkd.c
@@ -900,7 +900,9 @@
downgrade_pressure = (int64_t)property_get_int32("ro.lmk.downgrade_pressure", 60);
is_go_device = property_get_bool("ro.config.low_ram", false);
- mlockall(MCL_FUTURE);
+ if (mlockall(MCL_CURRENT | MCL_FUTURE))
+ ALOGW("mlockall failed: errno=%d", errno);
+
sched_setscheduler(0, SCHED_FIFO, ¶m);
if (!init())
mainloop();
diff --git a/trusty/storage/proxy/storage.c b/trusty/storage/proxy/storage.c
index c61e89d..5b83e21 100644
--- a/trusty/storage/proxy/storage.c
+++ b/trusty/storage/proxy/storage.c
@@ -379,7 +379,7 @@
}
if (req->size > MAX_READ_SIZE) {
- ALOGW("%s: request is too large (%zd > %zd) - refusing\n",
+ ALOGW("%s: request is too large (%u > %d) - refusing\n",
__func__, req->size, MAX_READ_SIZE);
msg->result = STORAGE_ERR_NOT_VALID;
goto err_response;