Commit graph

56068 commits

Author SHA1 Message Date
Tom Cherry
44c7bcb29e Merge "Move default tag from libbase to liblog"
am: b40c15e101

Change-Id: I3df5ce6a45cd4ee8cdd912d305a1e06bfedc4548
2020-01-23 13:14:56 -08:00
Treehugger Robot
b40c15e101 Merge "Move default tag from libbase to liblog" 2020-01-23 20:32:25 +00:00
Christopher Ferris
0dd7ac6cd0 Merge "Properly handle empty map after read-only map."
am: 8bf4e29e44

Change-Id: Id7162e6f9edd13428eca7f39eb00f6a860d1e31e
2020-01-23 10:04:55 -08:00
Christopher Ferris
8bf4e29e44 Merge "Properly handle empty map after read-only map." 2020-01-23 17:45:26 +00:00
Tom Cherry
69ee5dde99 Move default tag from libbase to liblog
Bug: 119867234
Test: log tags look right, libbase/liblog unit tests
Change-Id: I3670c3fdce3d0238a23a53bba2877ffed1291f9c
2020-01-23 08:39:31 -08:00
Elliott Hughes
1d789a3535 Merge "debuggerd: remove the raw stack dump."
am: f8c0350eaa

Change-Id: I4e2deeebda36db892d09ae80357ab84a196901ce
2020-01-23 08:10:39 -08:00
Elliott Hughes
f8c0350eaa Merge "debuggerd: remove the raw stack dump." 2020-01-23 16:07:42 +00:00
Baligh Uddin
304d9784e4 Merge "Use SOONG_HOST_OUT_EXECUTABLES"
am: 2148b252c2

Change-Id: Ifaa5b147ea8016334aa7774124abaa4ca67ffdc0
2020-01-23 08:05:42 -08:00
Treehugger Robot
2148b252c2 Merge "Use SOONG_HOST_OUT_EXECUTABLES" 2020-01-23 16:02:29 +00:00
Baligh Uddin
3d902d1637 Use SOONG_HOST_OUT_EXECUTABLES
Bug: 147699225
Test: m com.android.tzdata (apexer requires these executables)
Change-Id: I008d244e330d2113cb3f2dd4b6c770df3f2fac06
2020-01-23 14:09:01 +00:00
Bowgo Tsai
85df445ee1 Merge "fastbootd: exporting more properties"
am: cfd517d2a0

Change-Id: I611f2ed730091a5c42be7849cb42588e946a43e7
2020-01-22 23:37:01 -08:00
Treehugger Robot
cfd517d2a0 Merge "fastbootd: exporting more properties" 2020-01-23 07:34:09 +00:00
Stephane Lee
ccf55fdf04 Merge "Populate fields for health HAL 2.1 + batteryCapacityLevel + batteryChargeTimeToFullNow"
am: 223fa17c2e

Change-Id: I4f2e0e45ef21c7fb23575e66eae11b3eb1e6607b
2020-01-22 19:17:14 -08:00
Christopher Ferris
0f40a05309 Properly handle empty map after read-only map.
Recently, the maps for an elf in memory might show up looking like:

  f0000-f1000 0 r-- /system/lib/libc.so
  f1000-f2000 0 ---
  f2000-f3000 1000 r-x /system/lib/libc.so
  f3000-f4000 2000 rw- /system/lib/libc.so

The problem is that there is logic in the code that assumed that the
map before the execute map must be the read-only map. In the case
above, this is not true. Add a new prev_real_map that will point
to the previous map that is not one of these empty maps.

This will fix the backtraces that look like this:

  #00  pc 0000000000050d58  /apex/com.android.runtime/lib64/bionic/libc.so!libc.so (offset 0x50000) (syscall+24) (BuildId: 5252408bf30e395d49ee270b54c77ca4)

To get rid of the !libc.so and the offset value, which is not correct.

Added new unit tests to verify this.
Added new offline test which an empty map between read-only and execute
map. Before this change, the backtraces had lines like
libc.so!libc.so (offset XXX) would be present.

Bug: 148075852

Test: Ran unit tests.
Change-Id: Ie04bfc96b8f91ed885cb1e655cf1e346efe48a45
2020-01-22 18:30:12 -08:00
Stephane Lee
223fa17c2e Merge "Populate fields for health HAL 2.1 + batteryCapacityLevel + batteryChargeTimeToFullNow" 2020-01-23 00:39:07 +00:00
Oliver Nguyen
ab1b7ce318 Merge "Set Clang coverage environment variables."
am: 38b33c09f9

Change-Id: I6c484ac1634a12ac963c57a503a0cc41f809bbcd
2020-01-22 14:41:52 -08:00
Oliver Nguyen
38b33c09f9 Merge "Set Clang coverage environment variables." 2020-01-22 22:34:35 +00:00
Elliott Hughes
627928e059 debuggerd: remove the raw stack dump.
This takes a lot of space, isn't convincingly useful, and makes it
likely that the far more valuable stuff that comes after it gets
truncated. So let's just drop it.

Bug: http://b/139860930
Test: manual crasher, presubmit
Change-Id: Ie417ffc07e3cb17e95fdb3d183f8c87de0f34b89
2020-01-22 14:13:46 -08:00
Zim
6bb2476ebd Merge "Harden /mnt/pass_through permission bits"
am: eba798a767

Change-Id: Icdb984ed9253f6ea86ccbfd2432fef68d6889896
2020-01-22 13:38:49 -08:00
Treehugger Robot
eba798a767 Merge "Harden /mnt/pass_through permission bits" 2020-01-22 21:30:53 +00:00
Ruchir Rastogi
d31aea7383 Merge "stats_event.h/c tests"
am: 4169e9e47d

Change-Id: I917ffcefc86909e799abe8b6af33ea1c5b146359
2020-01-22 12:56:01 -08:00
Treehugger Robot
4169e9e47d Merge "stats_event.h/c tests" 2020-01-22 20:50:09 +00:00
Ruchir Rastogi
c6e6c44e50 stats_event.h/c tests
Add unit tests for the native API to log atoms to statsd.

(This CL is being cherrypicked into AOSP in order to prevent automerger
issues with the rename from libstatssocket to libstatspush.)

Test: bit libstatssocket_test:*
Bug: 145231901
Change-Id: If427c17319787200260cbe3b71075ca556c9a82b
Merged-In: If427c17319787200260cbe3b71075ca556c9a82b
2020-01-22 11:43:01 -08:00
Tom Cherry
82b6e55054 Merge "liblog: check loggability before formatting"
am: 929c9e8b40

Change-Id: I83738092ea00854e2f45c760628650def304301e
2020-01-22 11:36:15 -08:00
Treehugger Robot
929c9e8b40 Merge "liblog: check loggability before formatting" 2020-01-22 19:16:11 +00:00
Stephane Lee
86f9f6aed5 Populate fields for health HAL 2.1
+ batteryCapacityLevel
+ batteryChargeTimeToFullNow

Bug: 137790244
Test: lshal debug (health service)
Change-Id: Ieb0b42e6cdded5974f01198ee151453367f82579
2020-01-22 10:50:05 -08:00
Zim
6ca090e6b0 Harden /mnt/pass_through permission bits
It previously had 0755 permission bits

With such permissive bits, an unauthorized app can access a file using
the /mnt/pass_through path for instance even if access via /storage
would have been restricted.

It is now 0700

TODO: Change ACL for /mnt/user from 0755 to 0700 in vold only when
FUSE flag is on. Changing it with FUSE off breaks accessing /sdcard
because /sdcard is eventually a symlink to /mnt/user/0/primary

Test: adb shell ls -d /mnt/pass_through
Bug: 135341433
Change-Id: I3ea9655c6b8c6b4f847b34a2d3b96784a8f4a160
2020-01-22 17:54:45 +00:00
Christopher Ferris
15c7e20207 Merge "Fix global finding logic."
am: d88210b676

Change-Id: I7ed869cbd0089c63dbb51fa7b2b2b2ebfb673a92
2020-01-22 09:34:40 -08:00
Christopher Ferris
d88210b676 Merge "Fix global finding logic." 2020-01-22 17:07:47 +00:00
Tom Cherry
96e7ef5ec1 liblog: check loggability before formatting
Only print logs with priority >= INFO on host, as fake_log_device
does.

This fixes a regression in host builds where loggability wasn't
checked at all.

Bug: 69935292
Test: ART host tests don't print extraneous logs
Change-Id: I885b794da6f24bd905192252925e4a9f88b06674
2020-01-22 08:49:59 -08:00
Bowgo Tsai
99f9a38a8b fastbootd: exporting more properties
Exporting more properties that can be useful for image compatibility
check, prior to run fastboot flash.

Bug: 74445765
Bug: 144473561
Test: fastboot getvar <new variable>
Change-Id: I2ddfa2c1e9e719e05a3a64b9ca1d608957aebf11
2020-01-22 23:29:07 +08:00
Yifan Hong
55573a3774 Merge "SnapshotManager::WaitForMerge gives more info"
am: e99ec483b1

Change-Id: I369b2220bb42258d19fe275fd69c83a03a3c9bba
2020-01-21 19:22:36 -08:00
Yifan Hong
e99ec483b1 Merge "SnapshotManager::WaitForMerge gives more info" 2020-01-22 03:13:16 +00:00
Christopher Ferris
de5cd8ccd4 Fix global finding logic.
Recently, the maps for an elf in memory might show up looking like:

  f0000-f1000 0 r-- /system/lib/libc.so
  f1000-f2000 0 ---
  f2000-f3000 1000 r-x /system/lib/libc.so
  f3000-f4000 2000 rw- /system/lib/libc.so

That empty map was confusing the logic when looking for a global
variable. Now this case is handled properly.

New unit test added for this case.

Bug: 147910661

Test: Ran unit tests.
Test: Ran original failing test 137-cfi.
Change-Id: Ida2e96d1da5e1bf61f41646949fe5a2d405c0d61
2020-01-21 18:00:57 -08:00
Josh Gao
a35a2e21c2 Merge "adb: windows: fix adb execute root cmd with no tips"
am: 02f535f582

Change-Id: Ia10c83a69e4a54c3cc669ef70a59f7e2d84147f4
2020-01-21 17:41:33 -08:00
Josh Gao
02f535f582 Merge "adb: windows: fix adb execute root cmd with no tips" 2020-01-22 01:37:13 +00:00
Woody Chow
1886fb446c Merge "Fix unsigned integer overflow of i, which gives SIGABRT"
am: 8db23af93b

Change-Id: I4ac6ed7acd6db7c1dca3105bb9fbdcb0907c781d
2020-01-21 17:16:24 -08:00
Woody Chow
8db23af93b Merge "Fix unsigned integer overflow of i, which gives SIGABRT" 2020-01-22 01:14:18 +00:00
Elliott Hughes
556bb77f6f Merge "Make OSTREAM_STRING_POINTER_USAGE_WARNING build even with GCC"
am: 7becf26301

Change-Id: I734de51bbb9cbbb16f8768411711c67efd2c819d
2020-01-21 17:13:13 -08:00
Elliott Hughes
7becf26301 Merge "Make OSTREAM_STRING_POINTER_USAGE_WARNING build even with GCC" 2020-01-22 01:06:05 +00:00
Alessio Balsini
e0e4df8486 Merge "Snapshot merge progress percentage"
am: 3ddd4304f5

Change-Id: Ibf6b6bbbb3c1f11b4ece4d50e8ce18c77bdb45fd
2020-01-21 16:28:52 -08:00
Treehugger Robot
3ddd4304f5 Merge "Snapshot merge progress percentage" 2020-01-22 00:25:50 +00:00
Tom Cherry
42c89602da Merge changes Icb49b30b,Ib52cbfb4
am: 81c8385ab3

Change-Id: I2e1431bc655dfb26f1b9307d91ab07fbac0cbd99
2020-01-21 14:31:41 -08:00
Tom Cherry
81c8385ab3 Merge changes Icb49b30b,Ib52cbfb4
* changes:
  Move minimum log priority from libbase to liblog
  Move SetLogger and SetAborter from libbase to liblog
2020-01-21 22:27:49 +00:00
Elliott Hughes
58fdc98bf5 Merge "Update shell_and_utilities docs for R."
am: 2353510b5a

Change-Id: If7e48b8ec6fcac02df79e220ac2151de6d077b30
2020-01-21 14:16:40 -08:00
Elliott Hughes
2353510b5a Merge "Update shell_and_utilities docs for R." 2020-01-21 21:45:59 +00:00
Yifan Hong
b98a2e36ae SnapshotManager::WaitForMerge gives more info
It now returns Ok() if successful, NeedsReboot() if merge
it should be checked again after reboot, and Error() for
other errors.

This wraps UpdateState to help clients interpret the UpdateState value.

Also separate SnapshotManager::Return from FiemapStatus since they are
for different libraries and have (potentially) different set of error codes.

Test: libsnapshot_test
Bug: 138808328
Change-Id: I8c95417c2b0b7b2a362beb12585f861453a79278
2020-01-21 13:34:55 -08:00
Ryan Savitski
bc1dba9d4f Merge "init: add builtin check for perf_event LSM hooks"
am: cdebef1d2b

Change-Id: Ibd81d1eca1af30c50265af4a84fc8f28f31c228e
2020-01-21 12:45:49 -08:00
Ryan Savitski
cdebef1d2b Merge "init: add builtin check for perf_event LSM hooks" 2020-01-21 20:40:50 +00:00
Steven Moreland
604ed987f3 Merge "libutils: sp lh comparison w/ pointer"
am: 2ac625db19

Change-Id: Iaf8cb1ba18da25b371c672a955f925404b4402f2
2020-01-21 12:20:49 -08:00