Commit graph

59622 commits

Author SHA1 Message Date
Woody Lin
ae467dea9b InitFatalReboot: Trigger panic explicitly for init_fatal_panic am: 8fb6e3fdaf
Change-Id: Ic38fbd15da49dd508d3bbe3b7ad34313e8919c40
2020-05-11 18:00:21 +00:00
Ruchir Rastogi
b797431342 Merge "Use proper platform version checks (libstats)" into rvc-dev 2020-05-11 17:22:24 +00:00
Woody Lin
8fb6e3fdaf InitFatalReboot: Trigger panic explicitly for init_fatal_panic
The exit of init panics the system *after* process context (mm, stack,
...etc.) are recycled, according to Linux kernel's 'do_exit'
implementation. To preserve most init process context for debugging,
triggers the panic via proc-sysrq explicitly.

Note: after this change, there will be no "Attempt to kill init" panic
when androidboot.init_fatal_panic is set.

Test: Insert data abort fault in init, the full process context is
      preserved in memory dump captured after panic.
Bug: 155940351
Change-Id: I3393bd00f99b8cb432cfa19a105b7d636b411764
(cherry picked from commit be1cf9006a)
2020-05-11 14:50:27 +00:00
Lorenzo Colitti
a789cb5bbe Simplify code that parses ifa_flags. am: c00d57d353
Change-Id: I4f5627d268050c18b3b4dc41d56da2675ff3c8f1
2020-05-11 13:53:48 +00:00
Jooyung Han
d1d5fdfc2a processgroup: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: Idaa27ce24cc13d13145eaef85a08b9033922c7bc
Change-Id: Idaa27ce24cc13d13145eaef85a08b9033922c7bc
(cherry picked from commit 4f55f3efd3)
2020-05-11 17:45:27 +09:00
Jooyung Han
3c20c62cdd gralloc: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: I06644a725eb8f4ce0c7d8e1f09359b55e1b668d7
Change-Id: I06644a725eb8f4ce0c7d8e1f09359b55e1b668d7
(cherry picked from commit 72a6b3137e)
2020-05-11 17:44:29 +09:00
Jooyung Han
86455d7f87 libcutils: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: I453c63fe29607ea0312da5465b03c741486fb670
Change-Id: I453c63fe29607ea0312da5465b03c741486fb670
(cherry picked from commit 88f00f2d43)
2020-05-11 17:43:04 +09:00
Lorenzo Colitti
80ee49df2c Parse IFA_F_* values above 0x80. am: 3991ca5657
Change-Id: I56d2d068aa2b3cc4717caa0aff7f4698f5e9d5d1
2020-05-11 08:16:27 +00:00
Lorenzo Colitti
c00d57d353 Simplify code that parses ifa_flags.
When parsing an RTM_NEWADDR or RTM_DELADDR, ifaddr is always
present (unless the message is invalid). So ifaddr->ifa_flags is
always known before any attributes are parsed.

Bug: 155005831
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest continues to apss
Change-Id: Id1998faccca7d81c1b7f3e85e4912aa22919e94a
2020-05-11 11:37:17 +09:00
Lorenzo Colitti
3991ca5657 Parse IFA_F_* values above 0x80.
In RTM_NEWADDR messages, the first 8 flags are reported in the
ifa_flags field in struct ifaddrmsg, but flags above 0x80 are
reported in the IFA_FLAGS attribute. NetlinkEvent currently only
looks at ifa_flags, so it cannot see higher-value flags such as
IFA_F_STABLE_PRIVACY. Fix this by parsing the IFA_FLAGS
attribute.

Bug: 155005831
Test: makes new test in aosp/1295495 pass
Original-Change: https://android-review.googlesource.com/1295670
Merged-In: I723f1106cbcea2186fc6452305942a0f8301fd2a
Change-Id: I723f1106cbcea2186fc6452305942a0f8301fd2a
2020-05-11 11:29:59 +09:00
android-build-team Robot
3a4910bc0e Snap for 6479434 from 908ff8b4e7 to mainline-release
Change-Id: Id41a441eab0c9b10a5986fe4195c72352feda4ef
2020-05-10 07:19:49 +00:00
Chen Zhu
908ff8b4e7 Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev am: 8950624662
Change-Id: Ifd6f6f0eb0cc2de2d4e5683762f43d6361a3a228
2020-05-09 03:01:08 +00:00
Chen Zhu
8950624662 Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev 2020-05-09 02:48:48 +00:00
Chen Zhu
5daea5a6a2 Add test config for adbd_test and apply MainlineTestModuleController to it
to only run the tests when com.google.android.adbd is

installed on device.

Bug: 154845935
Test: m mts && mts-tradefed run mts-adbd
Change-Id: I2f203d25288580a07391703e2b28df54479a69f0
2020-05-08 16:47:07 -07:00
android-build-team Robot
134ca04896 Snap for 6474498 from 8930951055 to mainline-release
Change-Id: I1b552bc589bbbbf2f988c2578da412e49d0992dc
2020-05-08 07:11:17 +00:00
Christopher Ferris
de38b1a356 Change call to mmap64.
The code was using an off64_t but calling mmap. This caused the code
to abort on 32 bit.

Add a unit test that would abort on the previous version.

Bug: 155662887

Test: New unit test passes.
Change-Id: I7a6efbc0d4227403c3d08a08deea56f239382157
Merged-In: I7a6efbc0d4227403c3d08a08deea56f239382157
(cherry picked from commit 7b9f35c9de)
2020-05-07 17:45:30 -07:00
TreeHugger Robot
8930951055 Merge "first_stage_init: add support to skip module load failures" into rvc-dev am: 1cf1238d4a
Change-Id: I4f58c8df4863e9685d0154eef6eeb28e9cdec5a4
2020-05-07 22:02:32 +00:00
TreeHugger Robot
1cf1238d4a Merge "first_stage_init: add support to skip module load failures" into rvc-dev 2020-05-07 21:48:05 +00:00
Will McVicker
f3483ec6a0 first_stage_init: add support to skip module load failures
Extend androidboot.first_stage_console cmdline property to enable
skipping module load failures without stopping at a serial console. This
is useful for GKI development.

Set androidboot.first_stage_console=2 for this behavior.

Bug: 155296582
Test: verify behavior for values 0, 1, and 2
Merged-In: I068c631a22c848e45a421b297b1acae1b3deb3c1
Change-Id: I068c631a22c848e45a421b297b1acae1b3deb3c1
(cherry picked from commit 6c5f82642b)
2020-05-07 21:47:17 +00:00
David Anderson
caa2743f97 Merge "libfiemap: Remove brittle tests." into rvc-dev am: 7d50e96978
Change-Id: I6f3640961d1369d4f4282b4ee2d923af2949294c
2020-05-07 19:45:23 +00:00
David Anderson
c2732bda42 Merge "fastboot: Fix snapshot-update merge behavior." into rvc-dev am: 4adbeb470f
Change-Id: I89477c995a82f6f4fbd38d3393538feb1c4e3c16
2020-05-07 19:45:09 +00:00
David Anderson
7d50e96978 Merge "libfiemap: Remove brittle tests." into rvc-dev 2020-05-07 19:34:04 +00:00
David Anderson
4adbeb470f Merge "fastboot: Fix snapshot-update merge behavior." into rvc-dev 2020-05-07 19:32:43 +00:00
Ruchir Rastogi
4ae167e829 Use proper platform version checks (libstats)
Test: bit libstatspush_compat_test
Bug: 146019024
Change-Id: If99a7067944ddfbe30bb0ddfe586a337a94d4c07
2020-05-07 12:31:39 -07:00
android-build-team Robot
6bfc05d555 Snap for 6470414 from c6d324b73a to mainline-release
Change-Id: Iab96993dc6e67e92fd7ed8f0262ffb6562883f28
2020-05-07 07:07:10 +00:00
TreeHugger Robot
c6d324b73a Merge "Using ABB for install-multi." into rvc-dev am: 67a2bebf74
Change-Id: Idd0093391d8da02ceda7d34b330782eb22f6c132
2020-05-06 23:16:25 +00:00
TreeHugger Robot
67a2bebf74 Merge "Using ABB for install-multi." into rvc-dev 2020-05-06 23:00:02 +00:00
Yifan Hong
82035d6b82 libsnapshot: fix incorrect assumption of cow images
libsnapshot used to assume CoW images are always mapped
with device mapper, and call GetDeviceString directly.
However, in tests, it is possible that it is mapped as loop
devices. Fix the incorrect assumption and calls
IImageManager::GetMappedImageDevice instead.

Test: libsnapshot_fuzzer with corpus
Bug: 154633114
Change-Id: I1ec39744480e514ae7a7902643ed863e0ca0a340
(cherry picked from commit e6c1a84276)
Merged-In: I1ec39744480e514ae7a7902643ed863e0ca0a340
2020-05-06 15:12:22 -07:00
Alex Buynytskyy
13e98eaf72 Using ABB for install-multi.
ABB uses single shared CMD for all operations which improves
reliability.

Bug: b/153486595
Fixes: 153486595
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I1e3da63882c980811ed2e9f5556732b24a041ce5
Merged-In: I1e3da63882c980811ed2e9f5556732b24a041ce5
2020-05-06 14:10:56 -07:00
android-build-team Robot
b68db40fc1 Snap for 6465939 from 9842adf768 to mainline-release
Change-Id: Iefa042e6e7be25dad189263b07579decf32433b0
2020-05-06 07:15:46 +00:00
David Anderson
3afca7c11e libfiemap: Remove brittle tests.
libfiemap functionality is extensively tested via libsnapshot, gsid, and
fiemap_writer_test. However those tests rely on the configuration of the
device, and libfiemap has fairly different behavior based on whether FBE
or metadata encryption is in use. (The former will use loop devices, the
latter uses dm-linear).

To expand coverage, we added tests with very complicated nesting,
creating fiemaps on a rw partition mounted off a device backed by a
fiemap. Unsurprisingly, this was brittle to begin with, and now
consistently fails due to the intermediate partition not having
sepolicy.

Given the preference toward metadata encryption, and the fact that the
FBE mode will still be properly tested via VTS, let's just remove these
tests.

Bug: 148874852
Test: fiemap_image_test
Change-Id: I7be7d44dea81508505c050ed995b3b78086ad35f
Merged-In: I7be7d44dea81508505c050ed995b3b78086ad35f
2020-05-05 19:16:21 -07:00
Tim Murray
9842adf768 Merge "mark atrace buffers as uninitialized" into rvc-dev 2020-05-05 22:33:04 +00:00
Tim Murray
0f85154117 mark atrace buffers as uninitialized
The atrace buffer does not need to be zero-initialized every time.

Test: memset calls from atrace_{begin,end}_body are gone
bug 155788214

Change-Id: I8082b6a9e6d6328f4aee3a22137977e9fae21933
2020-05-05 18:37:02 +00:00
android-build-team Robot
6c3e968560 Snap for 6462261 from b6ae75ef00 to mainline-release
Change-Id: Ib0c4114b0fc98e4bd6181fc9b174704e9772423e
2020-05-05 07:03:16 +00:00
TreeHugger Robot
b6ae75ef00 Merge "stats: Set min_sdk_version" into rvc-dev am: 4cfdfef1bf am: 2574b305a8 am: 21a07332eb
Change-Id: I76ecbbdb8869211c6cb342165e104e5037b35c1e
2020-05-04 23:59:11 +00:00
TreeHugger Robot
21a07332eb Merge "stats: Set min_sdk_version" into rvc-dev am: 4cfdfef1bf am: 2574b305a8
Change-Id: I1467b5818c660dc2f974c6d25f647f6b748210c0
2020-05-04 23:44:05 +00:00
TreeHugger Robot
2574b305a8 Merge "stats: Set min_sdk_version" into rvc-dev am: 4cfdfef1bf
Change-Id: I9960b0c64a2c41ff07acfac71d2caee7a1130805
2020-05-04 23:30:00 +00:00
TreeHugger Robot
4cfdfef1bf Merge "stats: Set min_sdk_version" into rvc-dev 2020-05-04 23:11:27 +00:00
David Anderson
f2f5edd9d5 fastboot: Fix snapshot-update merge behavior.
When merging in recovery, the "imminent data wipe" code was used, which
made the assumption the /metadata and /data state would be zapped. This
caused future OTAs to error because the old snapshots were detected.

This CL allows OTAs to proceed even if unexpected snapshots are present.
It also forces the state to "MergeCompleted" after a merge in recovery,
so that the next normal boot can perform cleanup.

Bug: 155339165
Test: fastboot snapshot-update merge, then take another OTA
      vts_libsnapshot_test
Change-Id: Ief6dea3ba76323044e61307272dda320a4494aea
Merged-In: Ief6dea3ba76323044e61307272dda320a4494aea
2020-05-04 15:53:06 -07:00
android-build-team Robot
7b58652479 Snap for 6456462 from 81584cab85 to mainline-release
Change-Id: I685eef3e485bf707d00b20003b1e959c3112af71
2020-05-03 07:00:47 +00:00
Christopher Ferris
81584cab85 Merge "Fix dangling pointer issue in LocalUpdatbleMaps" into rvc-dev am: 64021d834a am: 2273266944 am: 7ae951c333
Change-Id: Ib878f9c405f34942149a22304dbe4818896fcb46
2020-05-02 17:04:31 +00:00
Christopher Ferris
7ae951c333 Merge "Fix dangling pointer issue in LocalUpdatbleMaps" into rvc-dev am: 64021d834a am: 2273266944
Change-Id: Ief08752efe3670d39f54f27e26966cf06ef8cf4a
2020-05-02 16:52:17 +00:00
Christopher Ferris
2273266944 Merge "Fix dangling pointer issue in LocalUpdatbleMaps" into rvc-dev am: 64021d834a
Change-Id: I23e337eb2b6705e07b2d93f3561285923544d4f0
2020-05-02 16:36:18 +00:00
Christopher Ferris
64021d834a Merge "Fix dangling pointer issue in LocalUpdatbleMaps" into rvc-dev 2020-05-02 16:28:23 +00:00
Yifan Hong
02df85cff6 Merge "Handle zero snapshot size appropriately." into rvc-dev am: 5b182952de am: c3b037686d am: a06d79852a
Change-Id: I5a0e7e51de0af0754fa4cd6a3b601ad832435eee
2020-05-02 05:25:07 +00:00
Yifan Hong
a06d79852a Merge "Handle zero snapshot size appropriately." into rvc-dev am: 5b182952de am: c3b037686d
Change-Id: I21499287085f7f12050063df4ca542ac9b666f7f
2020-05-02 05:13:21 +00:00
Yifan Hong
c3b037686d Merge "Handle zero snapshot size appropriately." into rvc-dev am: 5b182952de
Change-Id: Ia2794499c5fc9cbbb7b09b1c0f7f73e4729cf2f7
2020-05-02 05:01:37 +00:00
Yifan Hong
5b182952de Merge "Handle zero snapshot size appropriately." into rvc-dev 2020-05-02 04:47:00 +00:00
Sim Sun
ce0f3201d1 Fix dangling pointer issue in LocalUpdatbleMaps
Libunwindstack would remove duplicated items and update the `prev_map`
during reparsing `/proc/self/maps`. But we leave `prev_real_map`
pointing toward a MapInfo that will be deleted soon. It will cause a
dangling pointer issue.

Add new tests to cover this dangling pointer issue.

Bug: 155511785

Test: libunwindstack_test
Change-Id: I62e1b97bcb73f07e9349671f0b758f5ec9de16c0
(cherry picked from commit a7a194beb4)
2020-05-01 17:24:57 -07:00
TreeHugger Robot
a314341df7 Merge "first_stage_init: add support to skip module load failures" into rvc-d1-dev am: 427e663b96 am: 9f42e0d770
Change-Id: Ibbd2e1a78faca7207a22929f899ef811b63781db
2020-05-02 00:00:06 +00:00