Commit graph

69213 commits

Author SHA1 Message Date
Treehugger Robot
bbf4835c7e Merge "Isolate app profile ref data" 2021-06-15 11:03:40 +00:00
Treehugger Robot
79e0890f6d Merge "fs_mgr: support 'check_at_most_once' for dm-verity" 2021-06-15 05:27:34 +00:00
Christopher Ferris
4c68e77b45 Merge "Avoid thread cache in unwinder." 2021-06-14 23:58:01 +00:00
David Anderson
4b15582828 Merge "libsnapshot: Add stubs for Xor Ops and Sequence Data" 2021-06-14 21:20:24 +00:00
Christopher Ferris
0c787f0d6b Avoid thread cache in unwinder.
The code in the fallback path calls pthread_key_create when using the
normal thread cache. However, this code is executed out of the linker,
which means that the call doesn't see keys created by the libc version
of pthread_key_create. As of now, simply avoid using the thread cache
to avoid this problem.

Bug: 189803009

Test: debuggerd -b on a media process on a 32 bit Android Go device
Test: and observe no crash.
Test: debuggerd unit tests pass.
Change-Id: I9ca1a55e44d3bb69d49450826d7d64d7a64145c3
(cherry picked from commit 49e5a76544)
2021-06-14 19:57:33 +00:00
Treehugger Robot
1fc3a2d932 Merge "DO NOT MERGE - Merge ab/7272582" 2021-06-13 21:36:18 +00:00
Xin Li
95150cc25a DO NOT MERGE - Merge ab/7272582
Bug: 190855093
Change-Id: I20031b6d8af2ee6fe1ef559c5983cee480a3acb2
2021-06-11 17:34:35 -07:00
Daniel Rosenberg
93edf30370 libsnapshot: Add stubs for Xor Ops and Sequence Data
This adds stubs for update engine to build against while developing the
Xor Ops feature. The ops return failure upon use.

Test: builds
Change-Id: Iba6465453c2dfaf0c6578c4bed8955817ad6c02a
2021-06-10 17:48:53 -07:00
Ricky Wai
420830f8a6 Isolate app profile ref data
Due to aosp/1708274, ref data directory is now world accessible.
We need to fix ref data directory so that it does not leak app
visibility information.

Bug: 189787375
Test: AppDataIsolationTests
Change-Id: I716852478ce0734c7038934c88c36a567c06393f
2021-06-08 12:15:14 +01:00
Treehugger Robot
7534f6ca53 Merge "Fixing flakiness in libfs_avb_internal_test" 2021-06-08 10:32:51 +00:00
Bowgo Tsai
6a0cf6b8e3 Fixing flakiness in libfs_avb_internal_test
Using multiple unique_fd() and also modifying the file might
cause some races. Closing the fd when it's not needed.

Bug: 187303962
Test: atest --host libfs_avb_internal_test -- --test-arg \
      com.android.tradefed.testtype.HostGTest:native-test-timeout:5m
Change-Id: I789f33b49e7cbdb22396e1df9a2694dce9f8a6f7
2021-06-08 15:27:41 +08:00
David Anderson
cc8572441e Merge "ueventd: the parallel restorecon dirs is configurable [1/1]" 2021-06-07 23:08:59 +00:00
Treehugger Robot
645a15db77 Merge "fastboot: support vbmeta_vendor.img" 2021-06-07 01:52:54 +00:00
Treehugger Robot
d5e5ba7e96 Merge "remount: Fix failure for system-as-root" 2021-06-04 20:42:22 +00:00
Leo Yan
e81be34c85 remount: Fix failure for system-as-root
Since commit 5ad7b3cbc5 ("Try to remount mounted points only"), the
system-as-root cannot be remounted successfully when execute command
"adb remount".  This is because the mount point "/system" cannot be
found and directly bails out with failure.

Add an extra checking for the mount point "/system" for the
system-as-root case, takes it as a found entry; thus the function can
continue to run and fix up to remount root.

Suggested-by: David Anderson <dvander@google.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Change-Id: Ia936c9d97bed951184813a087c70fe591cb33fe0
2021-06-04 22:30:28 +08:00
Bowgo Tsai
a48a78356f fastboot: support vbmeta_vendor.img
Bug: 181909612
Test: build
Change-Id: If61fff1c83513d71605c0cef2737a38f7575d69b
2021-06-04 00:59:43 +00:00
David Anderson
391056ea73 Merge "Warn loudly if using deprecated ueventd paths." 2021-06-03 22:12:25 +00:00
Mitch Phillips
ca4a4d2690 Merge "[MTE] Print cause and alloc/dealloc traces to logcat." 2021-06-03 18:21:58 +00:00
Yo Chiang
4063fc4a01 Merge "first_stage_mount: mount point must be canonical path" 2021-06-03 06:24:17 +00:00
David Anderson
0050bef9e1 Warn loudly if using deprecated ueventd paths.
Bug: 189268918
Test: treehugger
Change-Id: Ib4cfa4f3a1f4626afcd37278d93390ad34b0216b
2021-06-02 18:22:28 -07:00
Devin Moore
34cf9834e4 Merge "Fix androidboot.bootdevice test case for bootconfig" 2021-06-02 15:37:11 +00:00
yuehu mi
ddffa0ea74 ueventd: the parallel restorecon dirs is configurable [1/1]
PD#SWPL-45884
BUG:187441275

Problem:
ueventd: coldboot took too much time

Solution:
1.The parallel restorecon dirs can be configured in ueventd.rc
2.Add 'parallel_restorecon_dir' keywords
parallel_restorecon_dir <directory>

Verify:
redi

Change-Id: Id5b13f18d36afb894891697f21ac63e78b3fe130
Signed-off-by: yuehu mi <yuehu.mi@amlogic.com>
2021-06-02 20:02:59 +08:00
Yi-Yo Chiang
3431d52675 first_stage_mount: mount point must be canonical path
Ban weird paths such as /../system or //vendor in first stage mount.
Add utility function fs_mgr_create_canonical_mount_point() that:

* mkdir(mount_point) to ensure mount_point's existence
* Test that realpath(mount_point) =?= mount_point

Bug: 188898525
Test: Presubmit
Test: Boot CF
Change-Id: Iaf2ec52701277f26cc81f3e15a47b6083a788334
2021-06-02 16:38:17 +08:00
Treehugger Robot
0f62609aa7 Merge "fs_mgr_fstab: Parse overlayfs options from fs flags" 2021-06-02 07:20:46 +00:00
Yo Chiang
4b18faf982 Merge "Remove deprecated fs_mgr_overlayfs_required_devices()" 2021-06-02 07:17:00 +00:00
Mitch Phillips
78f0670dda [MTE] Print cause and alloc/dealloc traces to logcat.
This information clearly meets the bar for being dumped to logcat. If we
omit the info, we may confuse the user into thinking that it's not
available at all, especially if it's their first time seeing an MTE
report.

This also adds some functionality to the integration testing library to
pull logcat messages and scan them to make sure the contents are in both
places.

Bug: 187881237
Test: atest debuggerd_test # on QEMU w/ MTE.
Change-Id: Icc17ea45bda7628331cc4812eaad3bc5c949b7a7
2021-06-01 18:12:22 -07:00
David Anderson
b4cd291317 Merge "Update documentation for SnapshotMergeReport." 2021-06-01 22:14:55 +00:00
Treehugger Robot
de5ac631bd Merge "adb-remount-test: Make awk scripts mawk-v1.3.3-compatible" 2021-06-01 20:31:44 +00:00
JeongHyeon Lee
14e9a70e7a fs_mgr: support 'check_at_most_once' for dm-verity
Parse the hashtree descriptor of the AVB-protected partitions
and add 'check_at_most_once' option to dm-verity table.

Test: build & check dm-verity table
Test: atest --host libfs_avb_test
Test: atest --host libfs_avb_internal_test -- --test-arg \
      com.android.tradefed.testtype.HostGTest:native-test-timeout:5m

Signed-off-by: JeongHyeon Lee <jhs2.lee@samsung.com>
Change-Id: I226a545aa95e07ebd7096dde18c357ac1ed1241c
2021-05-31 10:43:25 +00:00
Yi-Yo Chiang
ad3a57bdba adb-remount-test: Make awk scripts mawk-v1.3.3-compatible
Our CI is failing because the host machine is using mawk instead of gawk.
mawk v1.3.3 cannot parse regex such as '/[/]/', while mawk v1.3.4 and
gawk can.
Change regex of '[/]' to '\/' so that our test script is as backward
compatible as possible.

Bug: 188862155
Test: Run adb-remount-test.sh on CI
Change-Id: Ia4fbce58a61325a5e5280ede0d5b7760832d8ec1
2021-05-31 17:52:07 +08:00
Wang Han
fe5b9cfec0 Fix androidboot.bootdevice test case for bootconfig
* This seems to be a typo.

Change-Id: Ibf1317e35090f4fcacf53dc311124d456384fa27
2021-05-31 09:40:30 +00:00
Andrew Walbran
89ddf50566 Merge "Create data directory for VirtualizationService." 2021-05-28 12:06:58 +00:00
Yi-Yo Chiang
a07ed968b5 Remove deprecated fs_mgr_overlayfs_required_devices()
It is unused since Ifc8720378259654472d3822e97059b6c366f601d

Bug: 188862155
Test: Build pass
Change-Id: I6304e0dedb36d03a87c556083e937b4a2ce30b1b
2021-05-28 08:30:55 +00:00
Arve Hjønnevåg
7c8ec7b33b Merge "trusty: apploader: Handle invalid version error" 2021-05-27 18:45:16 +00:00
Michael Butler
2e3dabc629 Merge "Revert "Add libneuralnetworks_shim.so to requireLibs."" 2021-05-27 18:05:25 +00:00
Andrew Walbran
2934ee0bcd Create data directory for VirtualizationService.
Bug: 184131523
Test: Built, flashed, ran microdroid VM via virtmanager
Change-Id: I1e6a5f7a304a02de1efb29e253d8bbd54f3f704d
2021-05-27 13:07:50 +00:00
Yo Chiang
869ab86944 Merge "Make fs_mgr_overlayfs_mount_fstab_entry() available for user builds" 2021-05-27 08:54:20 +00:00
Yi-Yo Chiang
7b81023e2a fs_mgr_fstab: Parse overlayfs options from fs flags
Parse the "lowerdir=" option from fs mount flags instead of fs_mgr flags
for consistency.

Before:

  none /mnt/product/test1 overlay ro lowerdir=/1:/2,first_stage_mount

After:

  none /mnt/product/test1 overlay ro,lowerdir=/1:/2 first_stage_mount

Bug: 188862155
Test: Boot to normal with overlayfs mount entries in first stage fstab
Change-Id: I6d6abd44ab32afadec428005f4aece834f9c8905
2021-05-27 16:37:53 +08:00
Andrew Walbran
f9bafc53b9 Merge "Rename VirtManager to VirtualizationService." 2021-05-26 21:43:54 +00:00
Nikita Ioffe
45acb369ee Merge "libdm: Add DeleteDeviceDeferred API" 2021-05-26 20:20:22 +00:00
Nikita Ioffe
d13cef7435 libdm: Add DeleteDeviceDeferred API
This can be useful in case when a device mapper device can't be deleted
straight away, and instead delete needs to be enqueued until last
reference to the device is closed.

Bug: 187864524
Bug: 188713178
Test: atest libdm_test
Change-Id: Ie8a130baa54e6e16d8d159389bd760bf873eca40
2021-05-26 19:29:07 +01:00
David Anderson
7e2d32bc06 Merge "KillZramBackingDevice: Return immediately if backing_dev is none." 2021-05-26 03:29:05 +00:00
Akilesh Kailash
18a307beb4 Merge "snapuserd: Add test case" 2021-05-26 02:29:53 +00:00
Kelvin Zhang
22d2c263a8 Merge "Add helptext for snapshotctl map" 2021-05-25 21:00:44 +00:00
Kelvin Zhang
c1e78883eb Add helptext for snapshotctl map
Test: no need
Change-Id: I709d02ccd478d6bed34808dc20cbba9ed89097c1
2021-05-25 14:43:52 -04:00
Yi-Yo Chiang
23816e84ca Make fs_mgr_overlayfs_mount_fstab_entry() available for user builds
Rename fs_mgr_overlayfs_mount_fstab_entry() to
fs_mgr_mount_overlayfs_fstab_entry() and move it out of
fs_mgr_overlayfs.cpp to make it available for user builds.

Add checks to unsure overlayfs mount point doesn't contain symbolic
link or /../.

Check the mount point with an allowlist if user build. The mount point
should either be /vendor, /product ... or their submounts, or strict
submounts of /mnt/vendor and /mnt/product.

Bug: 188862155
Test: Boot test with overlayfs mount entries on user build
Change-Id: I3b60dfa4b63cf2ae0754f53d1d08365aa7be1ee0
2021-05-25 22:10:30 +08:00
Yo Chiang
f7584a223c Merge changes I5058cbe8,Ia0b3f1c9
* changes:
  adb-remount-test: Strengthen skip_administrative_mounts
  fs_mgr_overlayfs_mount_fstab_entry(): Rename source device name
2021-05-25 05:01:17 +00:00
Andrew Walbran
3aedc7edc8 Rename VirtManager to VirtualizationService.
Bug: 188042280
Test: atest VirtualizationTestCases
Change-Id: I0e549ef02c7327f57c3d04853b3eefed7403d8e8
2021-05-24 11:41:13 +00:00
Yi-Yo Chiang
f931ad9446 adb-remount-test: Strengthen skip_administrative_mounts
Refactor skip_administrative_mounts so that it filters by device name,
mount point and filesystem type. (Was filtering by device name and mount
point.)

We need this because pseudo filesystems such as tmpfs and overlayfs can
have free-formed device name:

  blah /mnt/mnt_point overlay ro,lowerdir=...

However the filesystem type (third field of /proc/mounts) must be
reflecting the actual filesystem, so to robustly filter out
administrative filesystems, we have to check the filesystem type field.

Bug: 188862155
Test: adb-remount-test.sh
Change-Id: I5058cbe8a36920f25b73a5d5833e9fc5a096e90f
2021-05-23 16:42:11 +08:00
Akilesh Kailash
b3b264c15f snapuserd: Add test case
Add unit test to test reading dm-user block device
without user-space daemon. IO's should fail
with IO error.

Bug: 188362117
Test: cow_snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ida4efb4373904f6bb92f9904af9fe8443724bd2c
2021-05-22 17:57:48 +00:00