Commit Graph

58894 Commits

Author SHA1 Message Date
Alessio Balsini c723fca056 Re-enable libsnapshot ImageManagerTest
ImageManagerTest had been temporarily disabled because flaky.
This test looks stable now, re-enable it.

Bug: 148889015
Test: atest vts_libsnapshot_test [-- --abi x86]
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
(cherry picked from commit 42a608162d)
Merged-In: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
2020-08-07 18:07:13 -07:00
Kazuhiro Inaba 9cecf8422a cts: Skip CtsInitTestCases over a native bridge.
The set of linked binaries was making it difficult to run
the test over a native bridge. Since init won't usually
run over a native bridge, the test can be skipped.

Bug: 161081809, 142324733, 162288553
Test: Arm build of CtsInitTestCases skips rammus-arc-r Chromebook.
Change-Id: Icdd8b03111d0f3fd6658ee6d9a97fca27181db45
2020-07-30 06:53:28 +00:00
Xin Li 1521c58c5d Merge ab/12162526 into stage-aosp-rvc-ts-dev
Bug: 148878042
Change-Id: I54c668427c06c415584cc80d6e7d35d451b28393
2020-07-15 17:55:15 -07:00
Victor Khimenko add3b3a137 Merge "Make libbacktrace buildable for native_bridge" into rvc-dev 2020-07-14 17:18:34 +00:00
Steven Moreland 8367a666b5 String16::remove - avoid overflow am: 4048e49956 am: 107f18cb61 am: 9be245c3f0 am: 64fb5012b8 am: 4e27b6992b am: 26b81f59d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: Ib4704bc8a733ace56e7998b7bad5a6c5638900ad
2020-07-14 17:03:30 +00:00
Steven Moreland 26b81f59d2 String16::remove - avoid overflow am: 4048e49956 am: 107f18cb61 am: 9be245c3f0 am: 64fb5012b8 am: 4e27b6992b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: Id47901d6e4247aafb9f666ba505ab966d3adefed
2020-07-14 16:45:16 +00:00
Steven Moreland 4e27b6992b String16::remove - avoid overflow am: 4048e49956 am: 107f18cb61 am: 9be245c3f0 am: 64fb5012b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: I03057c052a24f205c78ee600178d45e0cd51a3c1
2020-07-14 16:29:09 +00:00
Steven Moreland 64fb5012b8 String16::remove - avoid overflow am: 4048e49956 am: 107f18cb61 am: 9be245c3f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: I3ab9771d898eea0158acfd07fbe5a2f4b7dad883
2020-07-14 16:12:53 +00:00
Steven Moreland 9be245c3f0 String16::remove - avoid overflow am: 4048e49956 am: 107f18cb61
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: I22f6b8299b4b77be31859a10b14efe01b297d531
2020-07-14 15:51:29 +00:00
Steven Moreland 107f18cb61 String16::remove - avoid overflow am: 4048e49956
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802

Change-Id: I4dedf81e3471473e589a858e14d7a9ae5f91b3d9
2020-07-14 15:37:25 +00:00
Ray Essick c8766043aa extend syscall minijail for clang code coverage
cutover to clang-based code coverage uses extra system call (ftruncate)
when writing coverage data. exposed while generating coverage for media.extractor.

Bug: 160917521
Test: build, boot, kill -37 extractors for {arm,x86}x{32,64}
Change-Id: I555b168c7aab43caa590df951861b92e8fa14bc3
2020-07-13 08:45:22 -07:00
Victor Khimenko fb60e6c9ae Make libbacktrace buildable for native_bridge
Bug: http://b/153609531

Test: m -j64 libbacktrace.native_bridge

Change-Id: I2b8a881b4e952f3b68dbcaeb14f147a6d955b406
Merged-In: I2b8a881b4e952f3b68dbcaeb14f147a6d955b406
2020-07-10 20:13:23 +02:00
Tom Cherry 8272339d93 Merge "init: skip RejectsCriticalAndOneshotService for devices launched before R" into rvc-dev 2020-07-09 22:53:44 +00:00
Tom Cherry 5c8457ef9a init: skip RejectsCriticalAndOneshotService for devices launched before R
This restriction is only added for devices launching with R or later.

Bug: 160663765
Test: this test runs when appropriate
Merged-In: I2353bfa7f598bd19ba57498cc5bbad7a3ed34707
Change-Id: I2353bfa7f598bd19ba57498cc5bbad7a3ed34707
(cherry picked from commit 0e40ba3183)
2020-07-09 14:36:12 -07:00
Yifan Hong 82e0c384f3 Merge changes I51628abe,I412d62b7 into rvc-dev
* changes:
  Wrap flock with TEMP_FAILURE_RETRY.
  Try locking after mounting metadata
2020-07-08 18:57:30 +00:00
Yifan Hong bd6d2cded8 Wrap flock with TEMP_FAILURE_RETRY.
flock may return EINTR. There are code using LockShared() to test
existance of the directory. Don't fail spuriously.

Test: pass
Bug: 160457903
Change-Id: I51628abe05599422eb3f344781d8f3acd653c822
2020-07-08 18:57:24 +00:00
Yifan Hong 44033e75cc Try locking after mounting metadata
In rescue mode, if /metadata is mounted but /metadata/ota does
not exist, immediately unmount /metadata and fallback to the code
path when /metadata is not mounted; that is, old partitions are
overwritten.

Test: in recovery, select wipe then immediately sideload
Bug: 160457903
Change-Id: I412d62b7005c81a7126106edc471622e6a7ef813
2020-07-08 11:00:10 +00:00
TreeHugger Robot 46a58a5925 Merge "Remove SkipMountingPartitions from vendor libfstab" into rvc-dev 2020-07-07 02:01:59 +00:00
Yifan Hong 2ce3ddfee1 Merge "liblp: Force 10.0 metadata on downgrade to Q." into rvc-dev 2020-07-06 20:24:02 +00:00
Yifan Hong ba5dfd76de liblp: Force 10.0 metadata on downgrade to Q.
Q liblp only supports 10.0 super partition metadata, so
forcefully downgrade the current metadata version too.

On retrofit Virtual A/B devices, the metadata version is
at most 10.1, because the new VIRTUAL_AB flag is not set
on retrofit devices.

In version 10.1, two per-partition flags: UPDATED and DISABLED
are introduced.
- The updated flag is set when the device undergoes a Virtual A/B
update before. Clear it.
- The disabled flag should only be set on metadata files used by
libfiemap ImageManager. It shouldn't be used on super partition metadata.

Hence, this CL should only clear UPDATED flag.

Test: R->R->Q OTA
Bug: 159590481
Change-Id: I8b548c8ce36a75197e7172a77f9207fd44fe4670
2020-07-06 10:06:36 -07:00
Hung-ying Tyan 0a0f4b163a Remove SkipMountingPartitions from vendor libfstab
SkipMountingPartitions() should only be called from a system process
as the config file is in /system_ext.
Remove it from the vendor variant of libfstab.

Bug: 158301941
Test: build hardware/interfaces/boot/1.1/default/boot_control and check symbol
Change-Id: I834183a623c0711dd79b89486fc3fc80f9710801
Merged-In: I834183a623c0711dd79b89486fc3fc80f9710801
(cherry picked from e7cb09d226)
2020-07-03 20:06:37 +08:00
Boleyn Su 9285b496bd ReadFileSymbolicLink checks /system/bin/ps
According to
https://android.googlesource.com/platform/build/+/refs/heads/android10-dev/core/Makefile#140,
/default.prop may not be a symbolic link.

Bug: 158552949
Test: atest CtsInitTestCases

Change-Id: I19bde577fa50280e1ed6fb8fdbe846655abb930b
Merged-In: I0d3f96c1656dfe02bfa0e801680f7fa887afd1d9
(cherry picked from commit 6f47feaccdbe849c982e0de9068e38be85006bfb)
(cherry picked from commit 755a3dd78d)
2020-07-02 04:22:10 +00:00
Suren Baghdasaryan d4bc3f2adb libprocessgroup: Allow vendor profile attributes to override system ones
In the current implementation vendor profile attributes do not override
system ones and instead generate a warning. Fix that by overriding existing
attribute if a new definition is found.

Bug: 160318642
Test: add vendor attributes and confirm no warnings
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I71a2ee4d4b3c585e7c9a01b791e973390d409cbc
Change-Id: I71a2ee4d4b3c585e7c9a01b791e973390d409cbc
2020-07-01 15:22:04 -07:00
Boleyn Su 755a3dd78d ReadFileSymbolicLink checks /system/bin/ps
According to
https://android.googlesource.com/platform/build/+/refs/heads/android10-dev/core/Makefile#140,
/default.prop may not be a symbolic link.

Bug: 158552949
Test: atest CtsInitTestCases

Change-Id: I19bde577fa50280e1ed6fb8fdbe846655abb930b
Merged-In: I0d3f96c1656dfe02bfa0e801680f7fa887afd1d9
(cherry picked from commit 6f47feaccdbe849c982e0de9068e38be85006bfb)
2020-06-29 09:00:10 +00:00
Josh Gao d389d983bc Merge "adbd: check auth id." into rvc-dev 2020-06-25 22:45:47 +00:00
Josh Gao a5c24c323d adbd: check auth id.
When multiple auth requests come in (e.g. if someone connects over TCP
and USB, or if we send a USB request, and then kill adb and try again),
we need to disambiguate.

Bug: http://b/159061108
Test: manual
Change-Id: I0768dc3c1830456cb8cbd4395c23ef8f193cc420
2020-06-24 16:25:49 -07:00
Keun-young Park 163548736a Merge "Start statsd before starting zygote" into rvc-dev 2020-06-24 21:18:18 +00:00
Keun young Park 6423ccd96b Start statsd before starting zygote
- zygote needs statsd for logging boot time event.
- statsd starting later leads into stats logging failure which
  is reported by all child processes of zygote later.
  This brings lots of noise in statsd error.

Bug: 159664734
Test: reboot and check if error log does not show up
  E statsd  : Found dropped events: 1 error -19 last atom tag 240 from uid 10169
Change-Id: Ie585febb50a9668671c8fda41a872595baae8385
2020-06-23 20:40:19 -07:00
Maciej Zenczykowski 227635182f Merge "add a new trigger for launching the bpfloader" into rvc-dev 2020-06-24 02:52:51 +00:00
Maciej Żenczykowski c1ca9f75f9 add a new trigger for launching the bpfloader
Test: built and booted
Bug: 150040815
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Merged-In: If80758b3d7bf499d428880efa5ed555076bfc291
Change-Id: If80758b3d7bf499d428880efa5ed555076bfc291
2020-06-23 14:08:27 -07:00
Tom Cherry 8b637c8824 logd: make drop_privs work if neither klogd or auditd are used
Fix a bug that was causing cap_set_flag() fail and logd to exit.

Bug: 159588327
Test: caps are set correctly and logd functions with both, one of, or
      none of klogd and auditd enabled.
Merged-In: Ia51f078ad848535ce1ac29edd8a56a2b686a12cc
Change-Id: Ia51f078ad848535ce1ac29edd8a56a2b686a12cc
(cherry picked from commit 54b00a9e3c)
2020-06-22 14:57:43 -07:00
Nikita Ioffe 6a8602a8c9 Merge "Explicitly call restorecon_recursive on /metadata/apex" into rvc-dev 2020-06-22 21:27:08 +00:00
TreeHugger Robot a8c92eaae7 Merge "modprobe: Use more inclusive language for libmodprobe (Part Deux)" into rvc-dev 2020-06-22 18:12:14 +00:00
TreeHugger Robot da0a2ae786 Merge "llkd: Use more inclusive language" into rvc-dev 2020-06-22 17:47:17 +00:00
Nikita Ioffe cf7b6bad55 Explicitly call restorecon_recursive on /metadata/apex
On some devices we see a weird in which /metadata/apex will have a wrong
selinux label. This will effectively prevent such devices from getting
any apex updates. Since we haven't figured out a root cause for this
bug, it's safer to explicitly call restorecon on /metadata/apex to make
sure it's correct.

This change shouldn't affect a normal boot flow, since /metadata/apex
will already have a correct label and restorecon_recursive will be a
no-op.

Test: rm -Rf /metadata/apex && \
    mkdir /metadata/apex &&
    mkdir /metadata/apex/sessions
Bug: 149317789
Change-Id: I971ffe35c93bb79d9e71106c24515ec0ee70333a
2020-06-22 16:56:38 +00:00
David Anderson 20d78e3323 Merge "remount: Do not allow remounting during checkpoints." into rvc-dev 2020-06-19 20:04:54 +00:00
TreeHugger Robot 5062ea0564 Merge "fastboot: copy AVB footer on boot image to end of partition" into rvc-dev 2020-06-19 19:38:11 +00:00
Steve Muckle 618ca3400d fastboot: copy AVB footer on boot image to end of partition
If the flashed boot image is smaller than the block device, the AVB
footer will not be at the end of the partition. Although images are
normally created to match the partition size the GKI boot.img must work
on all devices, and the size of the boot partition will vary.

Copy the AVB footer to the end of the partition before flashing, if it
is not there already.

Bug: 159377163
Change-Id: I5a5e25fb54dc9d6a2930fda63434968808ffa1f0
Merged-In: I5a5e25fb54dc9d6a2930fda63434968808ffa1f0
2020-06-19 11:35:01 -07:00
Mark Salyzyn 4ca9fa9e10 llkd: Use more inclusive language
Documentation is synchronized to match external, to ease updating.

blacklist is replaced with ignorelist or ignore depending on context.

Bug: 159345740
Test: none
Merged-In: I6db7ad321684759e3c5ac1f66f940b6e8a5709a0
Change-Id: I6db7ad321684759e3c5ac1f66f940b6e8a5709a0
2020-06-19 06:51:59 -07:00
Mark Salyzyn 21c02bbd4b modprobe: Use more inclusive language for libmodprobe (Part Deux)
Remove blacklist

Test: none
Bug: 151950334
Merged-In: I14ed08390a7db0b4b962343c61d60230751047ce
Change-Id: I14ed08390a7db0b4b962343c61d60230751047ce
2020-06-19 06:33:08 -07:00
David Anderson 9aeae82f69 remount: Do not allow remounting during checkpoints.
Bug: 157540389
Test: manual test
Change-Id: I5931a583e48ddac05f319629ae2f7f5f0f6cf032
Merged-In: I5931a583e48ddac05f319629ae2f7f5f0f6cf032
2020-06-18 23:10:10 +00:00
TreeHugger Robot 507d21905b Merge "Don't call block checkpoint functions above dm-default-key" into rvc-dev 2020-06-18 22:22:57 +00:00
Paul Lawrence 39c7961c90 Don't call block checkpoint functions above dm-default-key
Bug: 156225476
Test: Build for f2fs and ext4 device, make sure checkpoints roll back
and commit

Merged-In: I7a772ff712dec9e69df175de840d69d296c65923
Change-Id: I7a772ff712dec9e69df175de840d69d296c65923
2020-06-18 21:58:57 +00:00
TreeHugger Robot 54e693e6d7 Merge "modprobe: Use more inclusive language for modprobe and libmodprobe" into rvc-dev 2020-06-18 20:46:11 +00:00
Tim Murray 4dc1d5f3de Merge "Move zygote64 into the top-app stune group." into rvc-dev 2020-06-18 19:15:39 +00:00
Tim Murray e2318a2fce Move zygote64 into the top-app stune group.
Improve app startup performance before the new app is in the top-app
cpuset.

Test: boots, zygote64 in top-app stune group
Bug: 159201879

Change-Id: I3aad4b4b1d2f54db9e7ba86db8a655d8552bad0a
2020-06-18 10:43:01 -07:00
Mark Salyzyn 502cb7af75 modprobe: Use more inclusive language for modprobe and libmodprobe
blacklist is replaced with blocklist.

Test: none
Bug: 151950334
Merged-In: I59f9fde5900b9aee82aca1eab4a6ded3d136063b
Change-Id: I59f9fde5900b9aee82aca1eab4a6ded3d136063b
2020-06-18 09:46:37 -07:00
Narayan Kamath 17fcd95f64 Merge "Fix Deadlock Issue On AppFuseBridge" into rvc-dev 2020-06-18 10:15:55 +00:00
Tom Cherry 709d569241 liblog: fix reading pmsg
d3ecc66b9c "liblog: support extended logger_entry headers" removed
the logger_entry::msg variable and instead uses hdr_size as an offset
from logger_entry to where the message starts in parent log_msg
buffer.

In pmsg, hdr_size is not recorded and therefore uninitialized when it
was referenced, causing corruption when reading last logcat.  This
change uses sizeof(log_msg->entry) instead.

Bug: 158263230
Test: last logcat works
Merged-In: Ic01e73bf4d8ba8419cc770138565aa1210a6078b
Change-Id: Ic01e73bf4d8ba8419cc770138565aa1210a6078b
(cherry picked from commit 34d7bd98ad)
2020-06-17 13:54:58 -07:00
hyeeun.jun@samsung.com 612fc47090 Fix Deadlock Issue On AppFuseBridge
There are two locks used by AppFuseBridge.
First is it's object lock, and the second is a mutex lock in app fuse library.
There are two oppsite routines to get those locks.

  (Thread A) Got Java lock -> Try to get Native lock
  (Thread B)        Got Native lock -> Try to get Java lock

The order must be followed to obtain two locks.
If not, the dead lock will be caused.
Therefore we change the routine to get the mutex lock first, and the object lock later.

Signed-off-by: hyeeun.jun@samsung.com <hyeeun.jun@samsung.com>
Bug: https://issuetracker.google.com/issues/145707568
Bug: 157535024
Test: atest --test-mapping apex/blobstore

Change-Id: I0ab002da9a0b7ca2f518d50ab477a080cabe3788
2020-06-17 13:39:21 +01:00