Commit Graph

59224 Commits

Author SHA1 Message Date
Steven Moreland bad50ed24f libutils: check vsnprintf error
For encoding errors, this function will return a negative value which
causes problems down the line. Check for an error and return. Also,
integer overflows are guarded.

Bug: 161894517
Test: fuzzer test case
Change-Id: Ia85067d4258bde4b875c832d6223db5dd26b8838
Merged-In: Ia85067d4258bde4b875c832d6223db5dd26b8838
(cherry picked from commit ee22384c54)
2020-08-12 21:45:05 +00:00
android-build-team Robot 6072de17cd Snap for 6680390 from add3b3a137 to rvc-release
Change-Id: I8b05f49b34f8d9f028ac41ee5b6cedf14a64ba76
2020-07-15 01:11:09 +00: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
android-build-team Robot 2238fcaf56 Snap for 6676900 from c8766043aa to rvc-release
Change-Id: I099ba16eecec869723216af716500c46a068270c
2020-07-14 01:11:59 +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
android-build-team Robot 8c8c4ab367 Snap for 6668007 from 8272339d93 to rvc-release
Change-Id: I2f007fa202ab2dfa2e91d19a6da424630e252c12
2020-07-10 01:08:17 +00: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
android-build-team Robot f3f86ec888 Snap for 6664334 from 82e0c384f3 to rvc-release
Change-Id: Ifaebb46b489815615d4dd1a96c3cd4fb1754d1a7
2020-07-09 01:01:04 +00: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
android-build-team Robot ca12ae3d69 Snap for 6660508 from 46a58a5925 to rvc-release
Change-Id: I2e3336aa4d87753552f18285edda7888ff9169ba
2020-07-08 01:05:56 +00:00
TreeHugger Robot 46a58a5925 Merge "Remove SkipMountingPartitions from vendor libfstab" into rvc-dev 2020-07-07 02:01:59 +00:00
android-build-team Robot ae5c096fdc Snap for 6657150 from 2ce3ddfee1 to rvc-release
Change-Id: Iec3e1c17991f947e056cb7df619fb4ec6782ee3a
2020-07-07 01:08:06 +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
android-build-team Robot 64d985b2cb Snap for 6650198 from 9285b496bd to rvc-release
Change-Id: I3e3a59ebbe936f630a5a550a9f7fb605e13e7b45
2020-07-03 01:10:33 +00: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
android-build-team Robot d6ea07752a Snap for 6630229 from d389d983bc to rvc-release
Change-Id: Ie3458f247fe28a685d85b0a7a13645f4b383fa4b
2020-06-26 01:03:06 +00:00
Josh Gao d389d983bc Merge "adbd: check auth id." into rvc-dev 2020-06-25 22:45:47 +00:00
android-build-team Robot bc8334c9aa Snap for 6626121 from 163548736a to rvc-release
Change-Id: I433bcf23ff027a016149f0148b8447c1b51625ed
2020-06-25 01:07:01 +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
android-build-team Robot ee3dee2eaa Snap for 6621766 from 8b637c8824 to rvc-release
Change-Id: I9f51497c2c37f66c1a3b12782d42bf0c26149301
2020-06-24 01:05:37 +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
android-build-team Robot efd78098fe Snap for 6617762 from 6a8602a8c9 to rvc-release
Change-Id: I1d3edd178c1609877cac3c30baaee4a39459af4a
2020-06-23 01:03:13 +00: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
android-build-team Robot 2cad8b10f6 Snap for 6610691 from 20d78e3323 to rvc-release
Change-Id: Ia3c50135d8825463acd140e9d382f63e70d86486
2020-06-20 01:01:30 +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
android-build-team Robot c4b4ea401f Snap for 6606167 from 507d21905b to rvc-release
Change-Id: Ic162cc36173a2f6663ff0e90ba920978165081ab
2020-06-19 01:08:11 +00:00