Commit Graph

58378 Commits

Author SHA1 Message Date
Josh Gao dada5fd17e Merge "adb: avoid crash when authenticating without vendor keys." am: 046cc11982
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1331888

Change-Id: I8d634811a847261bd186a9e66ede6b3ebc0d0f98
2020-06-12 21:51:30 +00:00
Josh Gao 046cc11982 Merge "adb: avoid crash when authenticating without vendor keys." 2020-06-12 21:41:02 +00:00
Josh Gao 30b0bbd4a2 adb: avoid crash when authenticating without vendor keys.
Bug: http://b/158232136
Test: manual
Change-Id: Ic8211335494a6acb703af5b82f52856223f538bb
2020-06-11 21:31:09 -07:00
Jooyung Han 9b07c52de0 Merge "init: start ueventd in the default mount namespace" am: 7cc98e212b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1325695

Change-Id: Ib4ed39d69aef7bf25dbdb0cc161d72532a5b2d4c
2020-06-12 02:16:06 +00:00
Jooyung Han 7cc98e212b Merge "init: start ueventd in the default mount namespace" 2020-06-12 02:06:12 +00:00
Randall Huang 86ee5c700f Merge "Try to recover corrupted ext4 /data with backup superblock" am: 78e0d064c7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1318221

Change-Id: I1199d71921e33f93088b1adea7609012923dd706
2020-06-11 23:54:56 +00:00
Randall Huang 78e0d064c7 Merge "Try to recover corrupted ext4 /data with backup superblock" 2020-06-11 23:46:17 +00:00
Tom Cherry 00636fb0d1 Merge "logd: add a test for clearing logs with a reader present" am: 8d3265539b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1331017

Change-Id: I9cb52c5da6c249f959f17a2e9635fb78b69e3d0d
2020-06-11 22:43:39 +00:00
Tom Cherry 8d3265539b Merge "logd: add a test for clearing logs with a reader present" 2020-06-11 22:33:21 +00:00
Tom Cherry 8319bb40d0 logd: add a test for clearing logs with a reader present
Test that:
1) Logs are cleared
2) More logs can be added after clear
3) Well behaving blocking readers stay connected and can read new logs
after clear.

Test: this unit test
Change-Id: I8497896f5fb068b1e50ff0dcaab1cf79aebae2bb
2020-06-11 14:13:39 -07:00
Tom Cherry b4fc12cc6c Merge "logd: simplify Clear() + Prune() logic" am: 7a372d168a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1329340

Change-Id: Iefe47627fec9555ef4abccbdc89465f7dc61925f
2020-06-11 17:16:39 +00:00
Tom Cherry 7a372d168a Merge "logd: simplify Clear() + Prune() logic" 2020-06-11 16:34:20 +00:00
Treehugger Robot 1adcea5c84 Merge "Fix a misleading warning message about sysprop overriding" am: 6c7b75b421
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1331393

Change-Id: Ic442e2745923b5c6f38525233d0cf9fe9d10de04
2020-06-11 15:03:04 +00:00
Tom Cherry a863b1a04b logd: simplify Clear() + Prune() logic
Clear() and Prune() return a boolean indicating whether or not their
operations failed because the log buffer was 'busy'.  This means that
they return false upon success and true upon failure, which is not
intuitive.

This change inverts their return value to simply be true if they were
successful or false otherwise.  It also simplifies the return value of
ChattyLogBuffer::Prune() to true if the requested number of rows have
been pruned or if all rows in the log buffer have been pruned, and
otherwise return false.

Test: logging unit tests
Test: clearing works even under logging pressure
Change-Id: I346bb945496ef62bf8e973298f81c5163f49bc57
2020-06-11 07:59:01 -07:00
Treehugger Robot 6c7b75b421 Merge "Fix a misleading warning message about sysprop overriding" 2020-06-11 14:50:05 +00:00
Jiyong Park e714cde55d Fix a misleading warning message about sysprop overriding
Regardless of whether a system property is "ro." or not, it can be
overridden by build.prop from the more specific partition. i.e.
foo.bar=true in system/build.prop can be overridden by
foo.bar=false in vendor/build.prop. However, the warning message
was referring the overridden property as "ro." causing confusion
when reading the log. Fix it by not mentioning "ro.".

Bug: 117892318
Test: N/A
Change-Id: I13014522d0c6b507b30c8754e2087fd71cc39971
2020-06-11 19:45:14 +09:00
Jooyung Han 4f23d5a236 init: start ueventd in the default mount namespace
Init starts ueventd in the default mount namespace to support loading
firmware from APEXes.

Bug: 155023652
Test: devices boots
      adb$ nsenter -t (pid of ueventd) -m ls /apex
      => shows all APEXes
Change-Id: Ibb8b33a07eb014752275e3bca4541b8b694dc64b
2020-06-11 15:10:40 +09:00
Randall Huang 72abd7b246 Try to recover corrupted ext4 /data with backup superblock
If the superblock of /data is corrupted, fs_mgr would skip check_fs.
But, e2fsck actually may reference backup superblock to recover
the filesystem. This fix gives fs_mgr second chance to fix corrupted
ext4 /data.

Bug: 156200421
Test: boot with corrupted ext4 superblock

Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: Ia39af3340c0e241f62557b7c2cc8b800443342f9
2020-06-11 14:04:47 +08:00
Yo Chiang c66db98edf Merge "shell_and_utilities_recovery: Fix required dependencies" am: 3447cdc741
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1328474

Change-Id: I6fa103edeaf04ac299a71efc2994ef31fcab10f8
2020-06-11 03:23:18 +00:00
Yo Chiang 3447cdc741 Merge "shell_and_utilities_recovery: Fix required dependencies" 2020-06-11 03:10:01 +00:00
Elliott Hughes b156c1af8a Merge "Remove zygote configuration for 32-bit primary, 64-bit secondary." am: cec2d69a0b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326175

Change-Id: Ie85d1cb1394bdcec5c45738de9f14ba462edd352
2020-06-11 00:22:22 +00:00
Elliott Hughes cec2d69a0b Merge "Remove zygote configuration for 32-bit primary, 64-bit secondary." 2020-06-10 23:52:34 +00:00
Elliott Hughes 409bca11de Remove zygote configuration for 32-bit primary, 64-bit secondary.
Bug: https://issuetracker.google.com/138812821
Test: treehugger
Change-Id: I67c59f1956cec7ea46ded6e0a772ac1226e2a7b3
Merged-In: I67c59f1956cec7ea46ded6e0a772ac1226e2a7b3
2020-06-10 22:52:52 +00:00
Marco Ballesio d604784b69 Merge "libprocessgroup: support for cgroup v2 hierarchy" am: 75d9170454
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324648

Change-Id: If325e2ab8096f01785b7c313ee9c171ca293b802
2020-06-10 21:50:05 +00:00
Marco Ballesio 75d9170454 Merge "libprocessgroup: support for cgroup v2 hierarchy" 2020-06-10 21:36:08 +00:00
Tom Cherry 3a4b1429a9 Merge "fastboot: don't print anything in Status() if the input is empty" am: 18b5965e20
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1329334

Change-Id: I819195167522bdcff7516db033ffeacb7c561200
2020-06-10 19:21:20 +00:00
Tom Cherry 18b5965e20 Merge "fastboot: don't print anything in Status() if the input is empty" 2020-06-10 19:03:18 +00:00
Tom Cherry 2217c50a4f fastboot: don't print anything in Status() if the input is empty
Status() is called with an empty string to handle `fastboot oem`
commands.  This currently emits a set of spaces and sets
last_start_time such that the epilog can track the time spent in this
command.  Emitting the spaces is problematic however, since it results
in the follow:

 $ fastboot oem device-info
                                                  (bootloader) Verity mode: false
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
OKAY [  0.000s]
Finished. Total time: 0.000s

If we skip emitting the spaces, then we get the correct result:

 $ fastboot oem device-info
(bootloader) Verity mode: false
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
OKAY [  0.001s]
Finished. Total time: 0.001s

There are no other uses of Status() with an empty string, so this
changes won't impact other commands.

Bug: 158310284
Test: fastboot formats this and other commands correctly.
Change-Id: I6294acefc65a8399160c0944b3fbc2f2ace919ed
2020-06-10 09:29:25 -07:00
Marco Ballesio f16f9417b0 libprocessgroup: support for cgroup v2 hierarchy
for a first implementation the cgroup v2 freezer controller will be used in a
way similar to cgroup v1, that is a single child group will hold all frozen
processes. Some adjustments are needed for the new structure.

- Add support for cgroup v2 syntax under procfs.
- Separate creation of a directory with ownership/mode changes to allow changes
    after mounting the cgroup kernfs root.
- Allow the creation of sub-groups under a cgroup v2 hierarchy.

Bug: 154548692
Test: manually verified that a proper cgroup v2 hierarchy is created and
accessible

Change-Id: I9af59e8214acaead3f520a94c95e75394c0df948
2020-06-10 09:14:00 -07:00
Treehugger Robot a33a65c8e2 Merge "Fix typo in android init language documentation." am: e4424ff422
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1327897

Change-Id: I37756521e91af1291b8a0f322abcf88bddbb0b17
2020-06-10 15:22:10 +00:00
Treehugger Robot e4424ff422 Merge "Fix typo in android init language documentation." 2020-06-10 15:08:49 +00:00
Yo Chiang dc53f4c266 shell_and_utilities_recovery: Fix required dependencies
TARGET module shell_and_utilities_recovery requires non-existent: unzip.recovery

This should be referring to the "ziptool" module. "unzip" is a symlink
installed by "ziptool".

Bug: 7456955
Test: TH; boot/ramdisk/system/bin/ziptool installed in /boot partition
Change-Id: Ib9edf9c17b4dfdebdb8719fb7b9244fca6133f6d
2020-06-10 07:58:04 +00:00
Amos Bianchi 16bfe099f3 Fix typo in android init language documentation.
Test: N/A
Change-Id: I158294b59f120f5f1296f3c9e6e5357fb02ed6b8
2020-06-09 17:10:49 -07:00
Dan Willemsen ce53427a3a Merge "Fix visibility rules now that Make supports visibility checks" am: 48d272c79c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324639

Change-Id: I546f4196c62941cf1b0975054aabde3605951617
2020-06-09 23:21:32 +00:00
Dan Willemsen 48d272c79c Merge "Fix visibility rules now that Make supports visibility checks" 2020-06-09 23:00:27 +00:00
Dan Willemsen ed96fe1d30 Fix visibility rules now that Make supports visibility checks
Previously, Soong visibility rules did not affect Make modules. Now
these checks have been implemented in:

https://android-review.googlesource.com/c/platform/build/+/1324454

So this fixes the visibility rules to include modules that were
previously using libbacktrace_no_dex.

Bug: 158599308
Test: treehugger
Change-Id: I8f242015ce72ad989e13d56ab085f2abe2f8ce92
2020-06-09 21:02:30 +00:00
Josh Gao 3ea63f1637 Merge "adbd: remove ifdefs guarding root/secure." am: 536f220f55
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324037

Change-Id: Ib17996ff101a7bf8bf23cff915e920ae6765ac51
2020-06-09 20:19:25 +00:00
Josh Gao 536f220f55 Merge "adbd: remove ifdefs guarding root/secure." 2020-06-09 20:05:29 +00:00
Tom Cherry d5401ddf61 Merge "Adding wait for a device file before mount" am: bd742a15ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322740

Change-Id: I518ff8a0178fda94457805240aa9c0b1fbf3c50a
2020-06-09 16:52:21 +00:00
Tom Cherry bd742a15ab Merge "Adding wait for a device file before mount" 2020-06-09 16:36:42 +00:00
Treehugger Robot a3238e04f7 Merge "init: fix README.md about perform_apex_configs" am: 389d8885a8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1325691

Change-Id: I320bfbf4a74c0da6f6c3e166ac85d7a68e4b2db4
2020-06-09 15:18:49 +00:00
Treehugger Robot 389d8885a8 Merge "init: fix README.md about perform_apex_configs" 2020-06-09 15:06:54 +00:00
Josh Gao d076857c4f adbd: remove ifdefs guarding root/secure.
The same adbd module prebuilt will get used for both user and userdebug
builds in the post-APEX world, so we can't guard functionality with
product variable ifdefs anymore.

The code that was previously compiled out runs before we drop root, so
the increased attack surface essentially consists of an attacker having
control over system properties, and that likely implies that we're
doomed already (either they have filesystem control, or they have code
execution in init).

Bug: http://b/158156979
Test: treehugger
Change-Id: Ia70d3140189e5212beb813ff719355e30ca5fa04
2020-06-08 17:57:33 -07:00
Alistair Delva 59f6b8ed50 Merge changes from topic "default-fstab-swapon_all" am: a3ed46533c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326173

Change-Id: I8288152cdbacde9a58eff8df7e3835da5499804e
2020-06-08 23:54:38 +00:00
Alistair Delva 886bb952b4 Add documentation for umount_all am: 6c6a36fb31
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326172

Change-Id: I06f57b3c1957ea589a2e9d33f06844bbcef2817c
2020-06-08 23:54:36 +00:00
Alistair Delva a3ed46533c Merge changes from topic "default-fstab-swapon_all"
* changes:
  Respect ro.boot.fstab_suffix in swapon_all
  Add documentation for umount_all
2020-06-08 23:41:51 +00:00
Alistair Delva de28a8651f Respect ro.boot.fstab_suffix in swapon_all
While mount_all and umount_all were updated to use ro.boot.fstab_suffix,
I neglected to update swapon_all. Trivially copied from umount_all.

Bug: 142424832
Change-Id: Icd706fe7a1fe16c687cd2811b0a3158d7d2e224e
Merged-In: Icd706fe7a1fe16c687cd2811b0a3158d7d2e224e
2020-06-08 23:41:40 +00:00
Treehugger Robot 63d66709c4 Merge "Stop using varargs in libkeyutils." am: ad3874e025
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326171

Change-Id: I309fa2101804f0d7eed4109ff20f19eb14b13730
2020-06-08 21:31:28 +00:00
Treehugger Robot ad3874e025 Merge "Stop using varargs in libkeyutils." 2020-06-08 21:24:18 +00:00
Josh Gao c10af3984c Merge "Move libadbd_auth, libadbd_fs to adbd_system_binaries." am: b99f194d05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322057

Change-Id: Icb7cd0eabf954f998213142fd3ad319379ae418d
2020-06-08 21:16:40 +00:00