Commit graph

61768 commits

Author SHA1 Message Date
Eric Biggers
56b43bc0a2 Merge "fs_mgr: Revert "Try to recover corrupted ext4 /data with backup superblock"" am: 64d1a3d60e am: 4a15f52193
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387869

Change-Id: Id2d127aadb30dbf70030e6c1665a06c3b9cfaf76
2020-08-05 23:05:30 +00:00
Eric Biggers
4a15f52193 Merge "fs_mgr: Revert "Try to recover corrupted ext4 /data with backup superblock"" am: 64d1a3d60e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387869

Change-Id: I99c68fb21b55aadb6f6ed3c82efb05e5d1d3ceb6
2020-08-05 22:46:31 +00:00
Eric Biggers
64d1a3d60e Merge "fs_mgr: Revert "Try to recover corrupted ext4 /data with backup superblock"" 2020-08-05 22:28:53 +00:00
Tom Cherry
a44090fb87 Merge "liblog: add a timeout for logd command socket operations" am: 368c70daba am: 1c99963351
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1389398

Change-Id: I59e929223199b96013ba7009223bda85d5336dcc
2020-08-05 19:57:51 +00:00
Kazuhiro Inaba
c32d879a94 cts: Skip CtsInitTestCases over a native bridge. am: 9cecf8422a am: 49ddb673c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12263311

Change-Id: I293e4b2817e06874ab049a0043bb2b4fb866c755
2020-08-05 19:38:29 +00:00
Tom Cherry
1c99963351 Merge "liblog: add a timeout for logd command socket operations" am: 368c70daba
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1389398

Change-Id: I1361f77d0436fc8596e94c3a30d7b05b209ce612
2020-08-05 19:37:43 +00:00
Tom Cherry
368c70daba Merge "liblog: add a timeout for logd command socket operations" 2020-08-05 19:18:07 +00:00
Kazuhiro Inaba
49ddb673c5 cts: Skip CtsInitTestCases over a native bridge. am: 9cecf8422a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12263311

Change-Id: I9d208b96945f99b64da031d03e09a570862bcc1b
2020-08-05 19:10:41 +00:00
Christopher Ferris
f11daa5dfb Merge "Fix fuzzer so it doesn't add overlapping maps." am: a39e39fe31 am: 46f2a82271
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387875

Change-Id: I022825db56d21d77a8b8826ad0c7cbb266daaa9b
2020-08-05 17:09:57 +00:00
Christopher Ferris
46f2a82271 Merge "Fix fuzzer so it doesn't add overlapping maps." am: a39e39fe31
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387875

Change-Id: Ib671925c2226490e586ec152a2d6c1f38005b2ba
2020-08-05 16:52:33 +00:00
Christopher Ferris
a39e39fe31 Merge "Fix fuzzer so it doesn't add overlapping maps." 2020-08-05 16:32:04 +00:00
Joshua Duong
56eb247d3a Merge "[adb] Correctly read host/user name on Windows." am: a65d905b4a am: a0c115a38b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1380298

Change-Id: I7c74450e5485824fee0ab04eaca8fb4f91f84823
2020-08-05 16:03:06 +00:00
Joshua Duong
a0c115a38b Merge "[adb] Correctly read host/user name on Windows." am: a65d905b4a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1380298

Change-Id: I95aefaaf1a599266532149e848c4bc0d373dc926
2020-08-05 15:45:29 +00:00
Joshua Duong
a65d905b4a Merge "[adb] Correctly read host/user name on Windows." 2020-08-05 15:25:47 +00:00
Tom Cherry
0d847fb4cb liblog: add a timeout for logd command socket operations
Add a 2s timeout for logd command socket operations:
  android_logger_clear
  android_logger_get_log_readable_size
  android_logger_get_log_size
  android_logger_set_log_size
  android_logger_get_statistics
  android_logger_get_prune_list
  android_logger_set_prune_list

That correspond to:
  logcat -c
  logcat -g
  logcat -G
  logcat -S
  logcat -p
  logcat -P

These operations should return immediately in typical circumstances,
but if logd is stuck, they would otherwise block indefinitely.  This
allows the commands to gracefully timeout instead.

Test: kill -s STOP `pidof logd`; logcat -g (and other options)
      times out appropriately
Test: logcat -g (and other options) work successfully otherwise
Change-Id: I6c4671a9b3daa4a454c0a14ae7d0b7d3b08be77a
2020-08-04 17:41:47 -07:00
Steven Moreland
f1c0be76ab Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8 am: d05ecb8d9d am: dc99a094dd am: 64b312bbd8 am: 0cb14f1fe7 am: ce44c8ac3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: I6fb2a6370b202cbe476aee558e09c702605d8328
2020-08-04 23:38:00 +00:00
Steven Moreland
ce44c8ac3c Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8 am: d05ecb8d9d am: dc99a094dd am: 64b312bbd8 am: 0cb14f1fe7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: I1cb83a4a22e205dddd10536f61392215d5cb33dc
2020-08-04 23:19:46 +00:00
Christopher Ferris
63525c8d6c Fix fuzzer so it doesn't add overlapping maps.
The fuzzer was creating individual maps that overlapped with other maps.
Since this is not possible in the real world unless the kernel is broken,
do not let the fuzzer do this. This resulted in memory leaks, because some
parts of the code have this assumption baked in.

Bug: 160895854

Test: Ran fuzzer test case that leaked memory and verified it no longer does.
Change-Id: I9f3c1e28781093b041b747e1566fb51d40d2bf71
2020-08-04 16:08:12 -07:00
Steven Moreland
0cb14f1fe7 Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8 am: d05ecb8d9d am: dc99a094dd am: 64b312bbd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: I7d40bc3c63aa13c4050662f17b8a0854f8864ce4
2020-08-04 23:02:18 +00:00
Steven Moreland
64b312bbd8 Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8 am: d05ecb8d9d am: dc99a094dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: I79dcbb310a2515e7f17ad2ebbb0367070084dab2
2020-08-04 22:46:49 +00:00
Steven Moreland
dc99a094dd Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8 am: d05ecb8d9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: I816b8858c69e6481299f942401a16b5b39cd8b69
2020-08-04 22:21:36 +00:00
Tom Cherry
3b7f554c8e Merge "libmodprobe: remove SetMinimumLogSeverity() from constructor" am: 03325fb854 am: daa14e59cd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387857

Change-Id: Ibb1d40eb215a74182f81b0310ea63d762eb1a957
2020-08-04 22:11:30 +00:00
Steven Moreland
d05ecb8d9d Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542 am: d8801aaad8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: Ifa0692e4966e78f4e180a2efc53db991177b6006
2020-08-04 22:03:55 +00:00
Tom Cherry
daa14e59cd Merge "libmodprobe: remove SetMinimumLogSeverity() from constructor" am: 03325fb854
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1387857

Change-Id: Ifed528d6dfaaebe116b6b0714a77def969b76a27
2020-08-04 21:57:12 +00:00
Steven Moreland
d8801aaad8 Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459

Change-Id: Id247c7079c146da8eaf52f098027d5daa25ce8d8
2020-08-04 21:37:54 +00:00
Tom Cherry
03325fb854 Merge "libmodprobe: remove SetMinimumLogSeverity() from constructor" 2020-08-04 21:30:09 +00:00
Steven Moreland
a03d37d542 Merge "libutils: check vsnprintf error" into oc-dev 2020-08-04 21:20:36 +00:00
Steven Moreland
5b175d1261 Merge "perfboot: significant figures + units for summary" am: fe8dec0447 am: b76d1b8873
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386892

Change-Id: I32a01ad3ebf2eae40bbcadeeada4babaf8d0696c
2020-08-04 18:46:14 +00:00
Eric Biggers
dc3e897a88 fs_mgr: Revert "Try to recover corrupted ext4 /data with backup superblock"
This reverts commit 72abd7b246
(change Ia39af3340c0e241f62557b7c2cc8b800443342f9).

When vold enables either FDE or metadata encryption, it encrypts the
filesystem in-place.  Unfortunately, due to a bug, for ext4 filesystems
it hasn't been encrypting the backup superblocks.

Also, in read_ext4_superblock(), the check for
StartsWith(blk_device, "/dev/block/dm-") can return true even if the
encryption mapping hasn't been added yet, since when a GSI image is
booted the userdata block device is a logical volume using dm-linear.

The result is that read_ext4_superblock() can recognize a backup
superblock when the encryption mapping hasn't been added yet, causing
e2fsck to run without the encryption mapping and corrupt the filesystem.

https://android-review.googlesource.com/c/platform/system/vold/+/1385029
will fix this for new or factory-reset devices.  However, there probably
are many existing devices that already have their backup superblocks
unencrypted.  Therefore, the EncryptInPlace fix isn't enough and we have
to revert the change that started using the backup superblocks too.

Bug: 161871210
Bug: 162479411
Change-Id: I279f84c072bc6c8d3e251a5e95c78f8d6c0d50ba
2020-08-04 11:34:30 -07:00
Steven Moreland
b76d1b8873 Merge "perfboot: significant figures + units for summary" am: fe8dec0447
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386892

Change-Id: I0c3c4c09a23c9a9dd041b0d4d822d885bf1047b0
2020-08-04 18:28:54 +00:00
Steven Moreland
fe8dec0447 Merge "perfboot: significant figures + units for summary" 2020-08-04 18:10:32 +00:00
Tom Cherry
3085d957e8 libmodprobe: remove SetMinimumLogSeverity() from constructor
Only the parent executable, not libraries should set this value.

Note that `modprobe` in toolbox and first stage init, the two primary
users of this library already set this same minimum log severity.

Test: build
Change-Id: I888968deede3323cc270efc3cfd1b40fc521d2da
2020-08-04 08:28:36 -07:00
Jaegeuk Kim
a704bca725 Merge "support f2fs casefolding formatting tool" am: ef2c28bf71 am: ec91233684
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1367758

Change-Id: I626360c9acdf0fcbcd3320b27ea1af6a2a59f4aa
2020-08-04 05:10:19 +00:00
Jaegeuk Kim
ec91233684 Merge "support f2fs casefolding formatting tool" am: ef2c28bf71
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1367758

Change-Id: I5b7c3e91f42832db1186f8b10064f96cac0d2ee3
2020-08-04 04:49:13 +00:00
Jaegeuk Kim
ef2c28bf71 Merge "support f2fs casefolding formatting tool" 2020-08-04 04:18:07 +00:00
Joshua Duong
62a42ec8ca [adb] Correctly read host/user name on Windows.
Bug: 162111908

Test: On linux/mac:
HOSTNAME="" adb keygen mykey; cat mykey.pub # Also LOGNAME
HOSTNAME="测试" adb keygen mykey; cat mykey.pub
HOSTNAME="test" adb keygen mykey; cat mykey.pub

Test: On Windows:
set COMPUTERNAME=&& adb keygen mykey
&& powershell -command "get-content -encoding utf8 mykey.pub" # Also USERNAME
set COMPUTERNAME=测试&& adb keygen mykey
&& powershell -command "get-content -encoding utf8 mykey.pub"
set COMPUTERNAME=test&& adb keygen mykey
&& powershell -command "get-content -encoding utf8 mykey.pub"

Change-Id: I62c952c511a620286aa4e05b1763361406e9f89a
2020-08-03 18:55:17 -07:00
Steven Moreland
18b73dd0b6 perfboot: significant figures + units for summary
This is correct significant figures/units based on the precision of our
measurements, but it does not reflect our actual certainty re the output
data, since in reality, confidence is diminished by temperature, device,
hardware revision, time of day/month/year, spurious activity, data
connectivity, app install list, inherent randomness of multiprogramming,
sensor activity, user interaction, /data caches, build-by-build
differences, charging state, data fragmentation, race-driven sleeps,
cosmic radiation, factory defects, local magnetic or gravitational field
differences, changes in device momentum, or other known and unknown
causes.

Bug: N/A
Test: run perfboot.py, and output has:
    mean: 10801 ms
    median: 10801 ms
    standard deviation: 18 ms
Change-Id: I796396acc203b29e9a14e4d6dffa58db7b8cd9fb
2020-08-04 00:58:40 +00:00
Tom Cherry
119daf8d48 Merge "liblog: don't cache property size values and move to own file" am: 001a5df898 am: 6c33a55292
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386258

Change-Id: I28f115dba48abb789668d98bde792792c4618f33
2020-08-03 23:42:14 +00:00
Tom Cherry
6c33a55292 Merge "liblog: don't cache property size values and move to own file" am: 001a5df898
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386258

Change-Id: If8240d3cc1761a201e80592a2bc5a84cb5bd773d
2020-08-03 23:18:36 +00:00
Tom Cherry
001a5df898 Merge "liblog: don't cache property size values and move to own file" 2020-08-03 22:59:03 +00:00
Tom Cherry
cbf354d26c Merge "liblog: use unique log tags for is_loggable tests" am: d851b2ab07 am: 51d1bb3504
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1385942

Change-Id: I9e27c767a30efcbc5df2f2f2b483290ff333cbfe
2020-08-03 21:36:47 +00:00
Tom Cherry
51d1bb3504 Merge "liblog: use unique log tags for is_loggable tests" am: d851b2ab07
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1385942

Change-Id: I236cf6bfa72a32213a0ade3fa870867619113c65
2020-08-03 21:13:16 +00:00
Tom Cherry
d851b2ab07 Merge "liblog: use unique log tags for is_loggable tests" 2020-08-03 20:46:30 +00:00
Tom Cherry
d2743ef5c9 liblog: don't cache property size values and move to own file
Don't cache the property size values since they're only queried at the
start of logd and only once during dumpstate.  Initializing
SerializedLogBuffer, which includes all of the logd queries, takes
under 100us without the cache, certainly fast enough that this cache
is unneeded.

Move these functions to their own file in preparation for removing
them from liblog.

Test: log sizes set appropriately
Change-Id: I15a2fd687dcffb4eab2f22ee0825ca86e40cdba3
2020-08-03 13:17:12 -07:00
Matthew Maurer
1f54d51ab4 Merge "Add support for tipc_send()" am: 0b9a329303 am: 7ae978ca0d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1339493

Change-Id: Ic3c489709e86e7a52b62030293c7090212f6db8b
2020-08-03 19:55:26 +00:00
Elliott Hughes
3d8a7e789e Merge "libdebuggerd: do a to-do." am: 5c2c72b44b am: c9ca928f3f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386256

Change-Id: Ib9efe72edb3b115e29ea7d52d99b04991269069e
2020-08-03 19:55:19 +00:00
Matthew Maurer
7ae978ca0d Merge "Add support for tipc_send()" am: 0b9a329303
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1339493

Change-Id: I6c9bb3cdef14ff187420004db4f6703b20c124f5
2020-08-03 19:44:22 +00:00
Matthew Maurer
0b9a329303 Merge "Add support for tipc_send()" 2020-08-03 19:35:55 +00:00
Elliott Hughes
c9ca928f3f Merge "libdebuggerd: do a to-do." am: 5c2c72b44b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1386256

Change-Id: I5ff9003b566f684c22a53513cf8819652ebf71b9
2020-08-03 19:32:46 +00:00
Elliott Hughes
5c2c72b44b Merge "libdebuggerd: do a to-do." 2020-08-03 18:56:46 +00:00