summaryrefslogtreecommitdiff
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-02-14 13:06:12 -0800
committerMark Salyzyn <salyzyn@google.com>2017-02-21 22:29:19 +0000
commitd69e801fe890d1732906aaadb8aa06244bb4ac52 (patch)
treee21608a6446e0ac209604ca5b3c086cc82707f90 /libutils/ProcessCallStack.cpp
parent01815fdcc52e6e94fe078d34ffdd71752e1aafdc (diff)
liblog: Harden log_id check.
Logd currently checks against LOG_ID_MAX and LOG_ID_KERNEL to determine if a given log_id is available. liblog uses only LOG_ID_KERNEL. While this matches with the comments in log/log_id.h to always keep LOG_ID_KERNEL at the end it does not match with other checks that logd makes, causing inconsistent behavior. This inconsistency is noticable on devices that errantly rewrite LOG_ID_MAX to not equal LOG_ID_KERNEL + 1. For log buffers with id's greater than LOG_ID_KERNEL, liblog reports that logd is unavailable while logd would accept the request. The guideline is to not use buffer ids above LOG_ID_KERNEL. This hardening change prevents an inconsistency that results if these guidelines are not followed. Partners are urged instead to increase LOG_ID_KERNEL locally to match their LOG_ID_MAX - 1 when they add new local log buffers in their private builds. Signed-off-by: Evan Ralston <eralston@amazon.com> Signed-off-by: Mark Salyzyn <salyzyn@google.com> Test: compiles. no functional change Change-Id: Icd4b12ac79c1e5cd1d8a32f67a9795797580aad5
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
0 files changed, 0 insertions, 0 deletions