Commit graph

72820 commits

Author SHA1 Message Date
Colin Cross
376f2cfa82 Merge "libpropertyinfoparser: only use system_shared_libs for bionic variant" 2021-09-14 23:31:50 +00:00
David Anderson
819e302a1e Merge "libsnapshot: Fix new partitions not transitioning in second-stage init." am: 4d18ab25f6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1817816

Change-Id: Ie98dac109e849facedecca7e51f9a902b31a6f79
2021-09-14 19:54:14 +00:00
David Anderson
4d18ab25f6 Merge "libsnapshot: Fix new partitions not transitioning in second-stage init." 2021-09-14 19:35:06 +00:00
Colin Cross
80e34e3017 Fix compiling libprocessgroup against musl
Include sys/cdefs.h before using __BEGIN_DECLS.

Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: Iac009275f7198476dd83ac70dbbc626b70f88ed1
2021-09-14 12:35:01 -07:00
Akilesh Kailash
3ad55a9690 libsnapshot: Error handling after QuerySnapshotStatus
QuerySnapshotStatus will capture the error codes
from dm-snapshot if there are any snapshot related
failure. Handle the error codes and fail the
QuerySnapshotStatus call.

Validate snapshot status in MapSnapshot(). If
the mode is set to Persistent and snapshot status
is in Merging state, then forcefully set the
mode to Merge state.

Bug: 198265278
Test: Full/incremental OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I779184f1998b23edacd6e780acf2676442004340
2021-09-14 06:47:06 +00:00
David Anderson
7f994f4cfb libsnapshot: Fix new partitions not transitioning in second-stage init.
Bug: 196922070
Test: vts_libsnapshot_test
Change-Id: If8a7afde218fd719e4426dc1dda41f53a4e6544b
2021-09-13 19:42:58 -07:00
Tri Vo
3a0d176e8d [automerger skipped] Merge "Revert^2 "Activate KeyMint."" am: 11ffd99154 -s ours
am skip reason: Merged-In I85d9e57fe83627992ddaa705946893a4b9890001 with SHA-1 5dfd44ed5c is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1822571

Change-Id: Ia9bb794786768d431e6d3bfc139da416e58d6f46
2021-09-13 23:42:00 +00:00
Tri Vo
11ffd99154 Merge "Revert^2 "Activate KeyMint."" 2021-09-13 23:31:49 +00:00
Akilesh Kailash
e24e5bf0a9 Merge "snapuserd: I/O request on sectors not mapping to any COW op" am: db3c0a4a51
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1824032

Change-Id: I96932acbe2d995908da4285484578f9b51fb97f1
2021-09-13 20:48:50 +00:00
Akilesh Kailash
db3c0a4a51 Merge "snapuserd: I/O request on sectors not mapping to any COW op" 2021-09-13 20:37:39 +00:00
Treehugger Robot
7dc38fe273 Merge "Looper: Use sequence numbers in epoll_event to track requests" am: 663c692a2d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1795650

Change-Id: Id4072ec03cbd6f0c5eb6a54d8c37d9dd453cf989
2021-09-13 12:11:00 +00:00
Treehugger Robot
663c692a2d Merge "Looper: Use sequence numbers in epoll_event to track requests" 2021-09-13 11:58:45 +00:00
Akilesh Kailash
542bf0bfed snapuserd: I/O request on sectors not mapping to any COW op
If there is an I/O request which doesn't map to any
COW Operation in the vector mapping, then that request
is an EOF request and should not be discarded with an
I/O error.

Bug: 198787355
Test: Incremental OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I241ee11d7cf540854aa4a232bc1b18da43d41e05
2021-09-11 06:06:25 +00:00
Treehugger Robot
da434b5f77 Merge "Skipping CompareVBMeta() in VerifyVBMetaDataError test case" am: 237ec60d0b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1821976

Change-Id: Ifcf390bed825af9082c0c1c5649ae36425067daf
2021-09-10 04:33:44 +00:00
Treehugger Robot
237ec60d0b Merge "Skipping CompareVBMeta() in VerifyVBMetaDataError test case" 2021-09-10 04:16:02 +00:00
Christopher Ferris
1a80414f99 Merge "Add executable bit to tests directories." am: bc4944c10f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1821635

Change-Id: Ia9c639c5f26a64a67eb49b80854eb4a909700834
2021-09-09 23:43:50 +00:00
Christopher Ferris
bc4944c10f Merge "Add executable bit to tests directories." 2021-09-09 23:20:41 +00:00
Shawn Willden
9863dd3c10 Revert^2 "Activate KeyMint."
81cdd3f3da

Bug: 177729159
Test: VtsAidlKeyMintTargetTest & CtsKeystoreTestCases
Change-Id: I85d9e57fe83627992ddaa705946893a4b9890001
Merged-In: I85d9e57fe83627992ddaa705946893a4b9890001
2021-09-09 14:27:41 -07:00
Christopher Ferris
2163bbbd34 Add executable bit to tests directories.
In order for crashes when executables are run from the
/data/local/tests directory, set the executable bit for that
directory and sub-directories. Without this, neither the root
user nor shell user can read any executables or shared libraries in
the tests directory.

Bug: 197229540

Test: Used the crasher executable and copied it to /data/local/tests
Test: and verified that running it as root and shell results in
Test: tombstones that have full unwinds with function names.
Change-Id: Ice669358decad9766e0496c156aa84d4ecacd124
2021-09-09 20:07:31 +00:00
Yiming Pan
55a4e105dc Merge "Add OWNERS for VTS module vts_core_liblp_test" am: 15a97fc951
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1793780

Change-Id: I48ce6918565a99ede944547db03a4626c55dd4f1
2021-09-09 19:46:01 +00:00
Yiming Pan
15a97fc951 Merge "Add OWNERS for VTS module vts_core_liblp_test" 2021-09-09 19:19:32 +00:00
Treehugger Robot
c04e5ea14d Merge "doc: verity_update_state has no args" am: 4759545abb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1821977

Change-Id: I5766c3007cebf1f4263f1426dbeeed0644bd3ca3
2021-09-09 09:18:53 +00:00
Treehugger Robot
4759545abb Merge "doc: verity_update_state has no args" 2021-09-09 09:02:58 +00:00
Jooyung Han
f0e03fdac3 doc: verity_update_state has no args
`verity_update_state` command doesn't have a <mount-point> arg.

Bug: n/a
Test: n/a (documentation updated)
Change-Id: I6a807f8cce05c8669e85fe5cea935fbd668aa678
2021-09-09 15:46:41 +09:00
Bowgo Tsai
ccd4b77440 Skipping CompareVBMeta() in VerifyVBMetaDataError test case
It has some random errors on the cloud, so skpping them for now.

Bug: 187303962
Test: atest --host \
      libfs_avb_internal_test:libfs_avb_internal_test.AvbUtilTest#VerifyVBMetaDataError
Change-Id: I658e3f052f99af645bdd44087f519d58acbe5641
2021-09-09 12:44:06 +08:00
Treehugger Robot
2f8528e0f7 Merge changes I928ddebc,Iade322a2 am: 4fd0ff9756
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1799827

Change-Id: I2a4075fe28f6001471bae67dae94cd6a3a2863ec
2021-09-08 20:18:54 +00:00
Treehugger Robot
4fd0ff9756 Merge changes I928ddebc,Iade322a2
* changes:
  storageproxyd: Add logging of failed RPMB transactions
  storageproxyd: Add file handle param to debug buffer print
2021-09-08 20:01:31 +00:00
Stephen Crane
310d805d96 storageproxyd: Add logging of failed RPMB transactions
Adds parsing and logging of SCSI errors from SG_IO calls for RPMB. Does
not alter behavior of the RPMB proxy in response to these errors.

Test: m storageproxyd
Bug: 195544379
Change-Id: I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa
2021-09-07 19:54:16 -07:00
Stephen Crane
dd3f7b867d storageproxyd: Add file handle param to debug buffer print
Adds a file handle parameter to the debug print_buf function to allow
printing to either stdout or stderr.

Test: m storageproxyd
Bug: 195544379
Change-Id: Iade322a21312a676b3599bddafdfc43b599617ea
2021-09-07 19:53:04 -07:00
Colin Cross
207ea516d6 libpropertyinfoparser: only use system_shared_libs for bionic variant
libpropertyinfoparser is a dependency of libc, and so cannot use the
default system_shared_libs that includes libc.  It's not a dependency
of musl's libc though, and it needs to use musl's libc headers,
not the bionic libc headers provided by the libc_headers module.  Move
system_shared_libs and libc_headers into a target.bionic clause.

Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: Ie1f908c02fc69ae7d46b10e2fdb5dafbc3ad8557
2021-09-07 15:14:35 -07:00
Yifan Hong
96146d1108 Merge "charger: fix charger display stuck" am: e026eff9af
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1813694

Change-Id: I4db565498062a459f8df180a01d02588772c917d
2021-09-07 20:25:43 +00:00
Yifan Hong
e026eff9af Merge "charger: fix charger display stuck" 2021-09-07 19:24:55 +00:00
Treehugger Robot
492e972c8d Merge changes I4fba1982,Ia0812a11 am: 7e8a9d9f33
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1818255

Change-Id: I0efbd258ca7b331fc56026773e3686a948c16835
2021-09-02 22:35:16 +00:00
Treehugger Robot
7e8a9d9f33 Merge changes I4fba1982,Ia0812a11
* changes:
  snapuserd: Fix PrepareReadAhead
  Fix a typo
2021-09-02 22:19:42 +00:00
Daniel Rosenberg
0518f8cb19 snapuserd: Fix PrepareReadAhead
When checking the instead of current, and when checking the position, we could underflow,
which would get caught by UBSAN

Bug: 177104308
Test: Map cow file with xor op or copy op at position 0
Change-Id: I4fba1982419e08b58759ec893e238175d245dbfc
2021-09-02 14:13:29 -07:00
Kelvin Zhang
bb0a7642d6 Fix a typo
this check should be performed on newly returned `op` instead of
`cow_op`

Test: th
Change-Id: Ia0812a1126d3e0bdfaff82859eb4b4a066a73bff
2021-09-02 14:12:19 -07:00
Martin Stjernholm
343cb321eb Merge "Add libdexfile runtime dependency of libdexfile_support (reland)." am: 7b0ae4ba7d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1815784

Change-Id: I0804c7a7a43f765eeefa3fdccb8aba153037d93d
2021-09-02 16:49:07 +00:00
Martin Stjernholm
7b0ae4ba7d Merge "Add libdexfile runtime dependency of libdexfile_support (reland)." 2021-09-02 16:36:43 +00:00
Xiaohui Niu
a40d872989 charger: fix charger display stuck
1.Retry charger when gr init fail caused
by display not ready.
2.Remove meaningless logs which occupy log lines,
the logs that really need to be printed cannot be
output due to printk suppresses kernel logs.

Bug: 197604278
Change-Id: Id9465a0a9c994986192fd39c124d05aed8caa862
Test: Manual. Power off charging.
2021-09-02 03:17:58 +00:00
Christopher Ferris
b04ae2d400 Merge "Remove double check of fd value." am: 4418778882
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1817116

Change-Id: Ie6f020dff0c98d9e604cf2f8e55bcf20c9f1d3dc
2021-09-01 22:40:24 +00:00
Christopher Ferris
4418778882 Merge "Remove double check of fd value." 2021-09-01 22:29:32 +00:00
Christopher Ferris
ab9f0cd759 Remove double check of fd value.
The output.text.fd value is only ever -1 when there is a failure.
There is no need to check both < 0 or -1, so only check for -1.

Test: Unit tests pass.
Test: Verified the message is seen on intercept and not on
Test: regular crashes.
Change-Id: I1eddcd5d2342b268ceb261b246c98b10cee85bb4
2021-09-01 13:36:03 -07:00
Tianjie Xu
7cb8e25a9f Merge "Dump the root digest of hashtree for dm-verity partitions" am: 055abbb4d6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1814305

Change-Id: I7b7895da336fb2389d243d5d67c7ea5a19d0731f
2021-09-01 17:59:04 +00:00
Tianjie Xu
055abbb4d6 Merge "Dump the root digest of hashtree for dm-verity partitions" 2021-09-01 17:47:11 +00:00
Prabir Pradhan
729057ab8c Looper: Use sequence numbers in epoll_event to track requests
Previously, Looper internally kept track of the requests to add fds
using the fd value itself. It used an internal sequence number
associated with each request to add a callback to avoid a situation
where a callback is unexpectedly called. However, since it used the fd
value rather than the sequence number to register events into epoll,
there was still a way where unintended hangups could occur.

This exact sequence of events caused unintended behavior in Looper:
- An fd (FD) is added to the looper.
- Looper registers FD into epoll using its FD number.
- FD is closed.
- A hangup event arrives from epoll_wait while the Looper is polling.
Looper is waiting for the lock to process the callback for FD, because
it is blocked by:
- A new fd is created and added to the looper. Since the lowest number
fd is reused, this new fd has the same value as FD.
- The poll request for Looper is now unblocked, so it looks up the
callback associated with FD to process the hangup.
- Since FD is already associated with the new callback, the new callback
is called unintentionally.

This CL uses the sequence number to register fds into epoll. That way,
when we get a hangup from epoll that is associated with a sequence
number, there is no way an unexpected callback will called.

This CL also adds a test to verify this behavior. Due to the
nondeterministic nature of this multi-thread scenario, the test verifies
this scenario repeatedly. Without the fix in Looper, the test is flaky,
but should never fail after the fix.

Bug: 195020232
Bug: 189135695
Test: atest libutils_test --rerun-until-failure
Ignore-AOSP-First: Topic CL aosp/1799831 has a merge conflict with
internal master, resolved in ag/15613419.

Change-Id: Ib4edab7f2407adaef6a1708b29bc52634f25dbb6
2021-09-01 14:52:52 +00:00
Martin Stjernholm
3784b9de46 Add libdexfile runtime dependency of libdexfile_support (reland).
Necessary since static_libs doesn't propagate transitive dependencies
in Soong.

Test: m droid
Bug: 197856821
Bug: 169779783
Change-Id: Ia70f8596228770451c95610be0e97783dabf3af3
2021-09-01 13:27:48 +01:00
Rex Lin
0c232198f7 Merge "Revert "Add libdexfile runtime dependency of libdexfile_support."" am: 2eaa82ea5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1815311

Change-Id: Ic1a59403a32f18b9da4df487aa016e875cd0d305
2021-09-01 06:16:04 +00:00
Rex Lin
2eaa82ea5c Merge "Revert "Add libdexfile runtime dependency of libdexfile_support."" 2021-09-01 06:03:48 +00:00
Rex Lin
dc14d16f80 Revert "Add libdexfile runtime dependency of libdexfile_support."
Revert "Allow visibility on libdexfile for all libdexfile_suppor..."

Revert "Add libdexfile runtime dependency of libdexfile_support."

Revert "Add libdexfile runtime dependency of libdexfile_support."

Revert submission 1810760-libdexfile-runtime-2

Reason for revert: DroidMonitor: Potential culprit for Bug 198352910 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
If4da968e4:Add libdexfile runtime dependency of libdexfile_su...
I80162942a:Allow visibility on libdexfile for all libdexfile_...
Iab18abc8e:Add libdexfile runtime dependency of libdexfile_su...
I473d146d8:Add libdexfile runtime dependency of libdexfile_su...

Change-Id: Iacab8e0a5c74e0c3185a155e35c28903aa9acb4a
2021-09-01 01:57:17 +00:00
Treehugger Robot
b3212d41bb Merge changes I3968ff53,I0029838d am: d95a49f555
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1811862

Change-Id: I89de5c87bab9e7739d61d9668d0f140b7a5d42b7
2021-09-01 00:50:42 +00:00