Commit Graph

18903 Commits

Author SHA1 Message Date
Jorge Lucangeli Obes 8688dba547 Merge "android_filesystem_config.h: Add Brillo users." 2016-01-05 22:59:18 +00:00
Jorge Lucangeli Obes 4ae18025f7 android_filesystem_config.h: Add Brillo users.
-metrics_collector and metricsd gather and upload device metrics.
-webservd is part of the Weave (Brillo remote setup and management) stack.

Bug: 26337609
Change-Id: Icf6ce75e64293adbe773f2ee65e80629f2eeb737
2016-01-05 14:43:40 -08:00
Dan Willemsen 0491eb2632 Merge "liblog: Update Android.bp to match Android.mk" 2016-01-05 21:45:56 +00:00
Dan Willemsen d68c35a9ce liblog: Update Android.bp to match Android.mk
Change-Id: Ic887493c03d133a566a96c1c5b65dcd67e5d7131
2016-01-05 13:09:35 -08:00
Mark Salyzyn 796d3ec8f4 Merge "logd: document ro.logd.size" 2016-01-05 17:27:28 +00:00
Mark Salyzyn 66607ebc0e logd: document ro.logd.size
Bad comment advise in LogBuffer.cpp results in partners failing to
considering using ro.logd.size to set the platform buffer size
default.

NB: It is not good practice to increase the log buffer size to deal
with logspam, as increases will result in logd scale issues getting
closer to hitting the background cgroup cpu cap. Once we hit that
cap, logd spirals, pruning old entries slower than the incoming log
entries. logd.writer will take 100% cpu.

Change-Id: If4a7a74f300d078eeaed0ffd3eb3fd77d1f9fe90
2016-01-05 09:09:18 -08:00
Alex Vakulenko 946d8152b2 Merge "libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()" 2016-01-04 21:02:21 +00:00
Alex Vakulenko 08c9891c9c libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()
In libraries relying on binder it is useful to be able to obtain an
existing copy of BinderWrapper or create one if it doesn't exist.

This allows to abstract the actual RPC (binder) from clients who have
no other dependencies on this RPC.

BUG: 23782171
Change-Id: Ie775d3d8ab83d75e38abc7e1385eb39a363555ef
2016-01-04 12:56:27 -08:00
Alex Vakulenko 5b7563a085 Merge "Disable RTTI in crash_reporter and metricsd" 2016-01-04 20:02:13 +00:00
Alex Vakulenko 2096029743 Disable RTTI in crash_reporter and metricsd
There is no longer a reliance on RTTI in libbrillo, so disable RTTI
in the rest of Brillo codebase.

Bug: 26292405
Change-Id: I2751a2ac973a74741a82f5cd949fc0adaf2449a6
2016-01-04 11:12:48 -08:00
Dimitry Ivanov 100001a537 Merge "Revert "Temporary disable linker-namespaces"" 2016-01-04 17:15:44 +00:00
Dimitry Ivanov 619ffb4f5b Revert "Temporary disable linker-namespaces"
This reverts commit c18ac7cd2b.
2015-12-31 14:11:34 -08:00
Mark Salyzyn 727aeb6686 Merge "logd: build breakage aosp-brillo-master @ 2508494" 2015-12-30 21:46:54 +00:00
Mark Salyzyn ff8b8e838b logd: build breakage aosp-brillo-master @ 2508494
Change-Id: I38e506bc997c6e9759a064b517f9372a27d0e510
2015-12-30 13:46:07 -08:00
Mark Salyzyn 554630f94e Merge "logd: isMonotonic improvements" 2015-12-30 21:31:58 +00:00
Mark Salyzyn 2ed826a69f Merge changes Ibdc76bc0,I98738c66
* changes:
  logd: liblog: whitelist "snet_event_log"
  liblog: add __android_log_is_loggable checking to writer
2015-12-30 18:20:07 +00:00
Mark Salyzyn 6aa21b225d logd: liblog: whitelist "snet_event_log"
Dangerous bridge to cross to whitelist, who is special, who is not?
Rationalized as these events are used to catch exploits on platform.
As it stands no one should be allowed to block any messages in the
security context, not even for development purposes.

Bug: 26178938
Change-Id: Ibdc76bc0fe29ba05be168b623af1c9f41d7edbd2
2015-12-30 10:07:19 -08:00
Mark Salyzyn a014004752 liblog: add __android_log_is_loggable checking to writer
Add __android_log_is_loggable() checking for all buffers except
LOG_ID_SECURITY. Return -EPERM if blocked. Since we are sniffing
the log tag, check validity and return -EINVAL.

NB: Try not to call __android_log_is_loggable() in native code within
a signal handler. Both here, and in the system properties, there
are locking paths that are not guaranteed to play well in that
environment. This has also been the case for the log writer path
even before this change. All attempts have been made to use trylock,
and to use a more expensive code path when contention occurs rather
than lead to deadlock.

Bug: 19544788
Bug: 26178938
Change-Id: I98738c662f6328189a6703251eb8721a05e956f9
2015-12-30 10:03:37 -08:00
Mark Salyzyn 10b82b6834 logd: isMonotonic improvements
Use 1972 as a right delineation. Otherwise use half way point
between the monotonic and realtime. Treat correction factor as
unsigned, ensure that any wrapping to a negative value is
dropped or set to EPOCH. Acknowledge that we can get a more
accurate time track by acquiring the time rather than relying on
healthd timestamp.

Bug: 26331432
Change-Id: I09075fca58676a30cf7d87baf2d4b0f53795abaa
2015-12-29 11:34:29 -08:00
Mark Salyzyn b5e821316d Merge "logd: Add worst pid of system filter" 2015-12-29 17:37:55 +00:00
Mark Salyzyn bec3c3def9 logd: Add worst pid of system filter
- Add a new statistic that reports per pid and log_id for AID_SYSTEM
- Add a new pruning filter ~1000/! boolean
- Use this new statistic to prune on worst pid within AID_SYSTEM

Bug: 26029733
Bug: 21615139
Bug: 22855208
Change-Id: Iab5dd28f807dcf03d276372853883f3b6afa8294
2015-12-29 09:32:35 -08:00
Mark Salyzyn 420b64160c Merge "logpersist: missing X" 2015-12-29 15:33:52 +00:00
Mark Salyzyn 3bab2a9096 logpersist: missing X
Signed-off-by: LawrenceSY_Kuo@asus.com
Bug: 19608716
Change-Id: I90e0313262a02906dec71417b995fc725f78a292
2015-12-29 07:31:37 -08:00
Pavlin Radoslavov 0f0498ad50 Merge "Use GID "wakelock" to control access to kernel wakelock" 2015-12-29 01:24:15 +00:00
Pavlin Radoslavov 17d80c84e1 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 14:57:28 -08:00
Dan Willemsen 3fb7d97689 Merge "Limit adb_test to first multilib" 2015-12-22 22:05:31 +00:00
Bertrand Simonnet c947a13772 Merge "metricsd: Replace scoped_ptr with unique_ptr." 2015-12-22 19:11:19 +00:00
Mark Salyzyn f58fb531ff Merge "liblog: build break" 2015-12-22 18:53:16 +00:00
Mark Salyzyn 31ca3c3770 liblog: build break
Some compilers erroneously see uninitialized use, even despite all
accesses being behind !not_locked. Confirmed initialization does not
affect expected performance.

Bug: 26178938
Bug: 26029733
Bug: 17760225
Change-Id: Ib36ed8dd2c4b196ca84ef79a9531625dcee77e15
2015-12-22 10:49:35 -08:00
Mark Salyzyn 6cc75a68bd Merge "logd: Allow flags "eng" and "svelte" in boolean" 2015-12-22 18:12:57 +00:00
Mark Salyzyn 2427d34152 Merge "liblog: is loggable is flaky" 2015-12-22 18:12:15 +00:00
Mark Salyzyn a67d8a53c7 liblog: is loggable is flaky
- Deal with __android_log_is_loggable inside signal handler by
  treating a lock contention system call as more costly than reading
  the associated property directly. Rather waiting around in a
  contended stat to hit cache.
- Check both the individual known __system_property_serial() and
  global __system_property_area_serial() to detect updates or
  additions to the properties to respond in the most aggressive and
  timely manner. __android_log_is_loggable() return at max CPU
  clockrate on a N9 in 61ns.
- Craft a common do_cache2 inline that adds the above to the other
  functions that utilize cache handling and preserves (within 3ns)
  performance in android_log_clockid() and __android_log_security().
  These functions return at max CPU clockrate on a N9 in 23ns.

Bug: 19544788
Bug: 25693940
Bug: 25792367
Bug: 26178938
Change-Id: I9cd94598f5c558e946b93977ad3714a4b03d0422
2015-12-22 10:06:22 -08:00
Bertrand SIMONNET 6c9fbb9a3a metricsd: Replace scoped_ptr with unique_ptr.
scoped_ptr are a chromism. We should use unique_ptr instead.

Bug: 25958769
Test: unit tests.

Change-Id: Ie23ae2ef42f66dcc76f45a9dafa66c8ceb0a2d90
2015-12-22 09:18:04 -08:00
Mark Salyzyn 9c66a58f21 logd: Allow flags "eng" and "svelte" in boolean
- enhance property_get_bool, drop property_get_bool_svelte
- enhance base properties with ro and persist variants
- update and fortify README.property
- primarily move auditd and kernel logger into a realm where
  they can be controlled by build properties.
- Move logd.klogd to logd.kernel, and add ro.logd.kernel
  and persist.logd.kernel.
- Add ro.logd.auditd and persist.logd.auditd.
- Document persist.logd.security
- Document log.tag and persist.logd.tag properties.
- Document ro.logd.size, persist.logd.size and logd.size
  properties.

Bug: 26178938
Bug: 26029733
Bug: 17760225
Change-Id: Ibc1a497e45d69db5cf52133937f7ba6fb1d6cd21
2015-12-22 07:44:31 -08:00
Dan Willemsen 1e20e0aa1d Limit adb_test to first multilib
It uses libadb, which is also only compiled for the primary
architecture. BUILD_HOST_NATIVE_TEST is changing the default
LOCAL_MULTILIB to match BUILD_NATIVE_TEST.

Change-Id: Ia9c002e641125eb996a7f198af1f182d0d6171c6
2015-12-21 16:17:24 -08:00
Dimitry Ivanov 8a1b764db9 Merge "Add parameter for shared namespaces" 2015-12-21 23:10:49 +00:00
Dimitry Ivanov d2a6220001 Add parameter for shared namespaces
Shared namespaces are used for bundled app classloaders.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I163033f70c50ef9ddb4164676c033ab30748964e
(cherry picked from commit ef4639c1a5)
2015-12-19 23:38:28 -08:00
Elliott Hughes 0e6a23c7d5 Merge "Give adb a proper progress bar." 2015-12-19 17:15:42 +00:00
Nick Kralevich 920d637d25 Merge "more O_CLOEXEC" 2015-12-19 06:59:11 +00:00
Nick Kralevich c68c8862f9 more O_CLOEXEC
Change-Id: I330aef8d6f1fc35d6649995ef312954b84dff555
2015-12-18 20:57:25 -08:00
Mark Salyzyn af9daf4524 Merge "liblog: test: instrument is_loggable failures" 2015-12-18 23:21:33 +00:00
Mark Salyzyn 77c166b5dd liblog: test: instrument is_loggable failures
Bug: 25792367
Change-Id: Ia34f8e7ea0bd7f15bf705afd3a1c631a56d1c479
2015-12-18 15:17:51 -08:00
Elliott Hughes a00e6ef1ff Give adb a proper progress bar.
This factors out the duplication in the single-file progress, and adds a
whole-sync progress percentage to the front of the line. A number that's
both more interesting and easier to read.

This also fixes the >100 percentage reporting for files of unknown size.

Bug: http://b/26189482
Change-Id: I51501ccef6ae1f52425db0eb0862d87e90947a6c
2015-12-18 14:43:31 -08:00
Tao Bao a2f1e65d13 Merge "healthd: Track the API change of res_create_multi_display_surface()." 2015-12-18 22:20:32 +00:00
Jorge Lucangeli Obes c57c622e76 Merge "Add audioserver UID." 2015-12-18 22:00:59 +00:00
Jorge Lucangeli Obes a3548a21ca Merge "New uid for extractor process" 2015-12-18 22:00:17 +00:00
Mark Salyzyn f2e88777fb Merge "logd: statistics per-pid filter" 2015-12-18 21:26:16 +00:00
Mark Salyzyn ee3b838e13 logd: statistics per-pid filter
Primarily gives access to the Chattiest TIDs and TAGs
associated with a pid.

Has a secondary effect of allowing us to pull out the
command line, comm and in some cases the associated
PACKAGE for a specific pid while the logs are still
present even if the executable is gone.

Bug: 26029733
Bug: 21615139
Change-Id: I1ea63165a680a9318360579b70b1512078ed5682
2015-12-18 13:17:37 -08:00
Jorge Lucangeli Obes 37211e1f3d Add audioserver UID.
(Originally in
https://googleplex-android-review.git.corp.google.com/#/c/804752).

Change-Id: I31951cad1bbcec58b21559be0d86581ba9187a92
2015-12-18 13:06:34 -08:00
Mark Salyzyn 5d8742feb6 Merge "liblog: test: pmsg overhead measurement" 2015-12-18 20:34:55 +00:00