Commit Graph

71759 Commits

Author SHA1 Message Date
Nikita Ioffe a35d50c234 Merge "libdm: Add DeleteDeviceDeferred API" into sc-dev 2021-06-04 10:15:39 +00:00
Mitch Phillips b9637b0a87 [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.

Fixes: 187881237
Test: atest debuggerd_test # on QEMU w/ MTE.
Change-Id: Icc17ea45bda7628331cc4812eaad3bc5c949b7a7
Merged-In: Icc17ea45bda7628331cc4812eaad3bc5c949b7a7
2021-06-03 13:13:15 -07:00
Nikita Ioffe 8c427b9f67 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
Merged-In: Ie8a130baa54e6e16d8d159389bd760bf873eca40
(cherry picked from commit d13cef743545c6de7b5122cb515bb82b508d019e)
2021-06-02 16:13:45 +01:00
Chavi Weingarten d04966a2fd Merge "Fix implicit cast from ssize_t to size_t in KeyedVector.h" into sc-dev 2021-05-24 14:25:56 +00:00
Michael Butler 229c46569e Merge "Revert "Add libneuralnetworks_shim.so to requireLibs."" into sc-dev 2021-05-21 17:57:00 +00:00
Vishnu Nair 51b958d57c Fix implicit cast from ssize_t to size_t in KeyedVector.h
Fixes a compiler warning for implicit conversion changes from signed
to unsigned which surfaced when refactoring native input libraries.
Add an explicit cast to avoid adding -Wno-sign-conversion compile
flags.

Test: b libsurfaceflinger_unittest
Bug: b/188792659

Change-Id: I1b9309c3530d6063d5cefcaa31af84d9cebc3f5d
Merged-In: I8866aef7f09ca5173604abe18c586b68bbf12ed6
2021-05-21 16:49:07 +00:00
TreeHugger Robot cab42d2b23 Merge "tombstoned: fix file creation for ANRs." into sc-dev 2021-05-20 19:02:05 +00:00
Michael Butler 2a8dbee2fc Revert "Add libneuralnetworks_shim.so to requireLibs."
This reverts commit 14f6751df1.

Reason for revert: Removing libneuralnetworks_shim.so from Android S

Ignore-AOSP-First: This change is being submitted to sc-dev, which no
longer automerges from AOSP. The AOSP change is separately being
submitted in aosp/1711709

Bug: 188587379
Test: mma
Change-Id: I23acbdc31ddc488ad59225b483936905fa3652ee
2021-05-20 00:24:54 +00:00
Josh Gao 35a45b20c2 tombstoned: fix file creation for ANRs.
Bug: http://b/188315622
Test: manual
Change-Id: I2948b929beb3093b59c8d37b706c857e7422a3cc
Merged-In: I2948b929beb3093b59c8d37b706c857e7422a3cc
(cherry picked from commit 931274862fc55bc723ee72c0c989984c4ffb7776)
2021-05-19 17:09:59 -07:00
Akilesh Kailash 24305239d6 snapuserd: Send header-response once per entire IO request
Header response from daemon is sent once at the
beginning of the payload. This is a corner case
when the IO request can get broken into multiple chunks
if the IO is un-aligned.

Additionally, add error checks in the IO path
to validate sector information when the read
requests are merged.

Bug: 188361387
Test: Simulate an IO request to forcefully break the IO
response into multiple chunks and verify the correctness.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I1f4fa7a79c60493f4bbed3ad49e257098b930beb
Merged-In: I1f4fa7a79c60493f4bbed3ad49e257098b930beb
2021-05-19 01:01:52 +00:00
Wei Wang 1d14bd3c1a Merge "libprocessgroup: remove failure log for aggregate profiles" into sc-dev 2021-05-18 05:43:15 +00:00
Wei Wang f9d426b4c6 libprocessgroup: remove failure log for aggregate profiles
The inner profile should print error message if needed.

Bug: 178070122
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I2d9d54e21fb064678feccdbae453a398806d51d6
(cherry picked from commit 8722e4d21903c56b65d7dea53bc4bc44ca85de34)
2021-05-14 22:51:57 -07:00
Peter Collingbourne 5b457453c9 Merge "Run MTE tests on zero-sized allocations." am: 93406da189 am: 4bd1c5c8ac am: 5edd60e418
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1706267

Change-Id: Ic491afecc907e064ccda33141ae9c3510335efcd
2021-05-14 05:11:04 +00:00
Peter Collingbourne 5edd60e418 Merge "Run MTE tests on zero-sized allocations." am: 93406da189 am: 4bd1c5c8ac
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1706267

Change-Id: I6ed23d7342e0b9d6b2c9e7ee9ff5fba4c330aa09
2021-05-14 04:53:54 +00:00
Peter Collingbourne 4bd1c5c8ac Merge "Run MTE tests on zero-sized allocations." am: 93406da189
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1706267

Change-Id: Iad5541d6126cf79bdbc257172078017b8684d935
2021-05-14 04:37:57 +00:00
Peter Collingbourne 93406da189 Merge "Run MTE tests on zero-sized allocations." 2021-05-14 03:58:13 +00:00
Treehugger Robot 29b7532fe8 Merge "Add missing //apex_available:platform to debuggerd" am: a9d1799d3f am: a41e8af148 am: b03c107c52
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705255

Change-Id: I1e163ad41e2d088f3b73f522dd5d6c3906d196c4
2021-05-14 03:02:46 +00:00
Treehugger Robot b03c107c52 Merge "Add missing //apex_available:platform to debuggerd" am: a9d1799d3f am: a41e8af148
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705255

Change-Id: I208c95f655e49d92fb26bec1875f67ec830f3c19
2021-05-14 02:46:02 +00:00
Treehugger Robot a41e8af148 Merge "Add missing //apex_available:platform to debuggerd" am: a9d1799d3f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705255

Change-Id: I4784edb91d9d27e943562e505dfb2a462cb8c284
2021-05-14 02:21:08 +00:00
Treehugger Robot a9d1799d3f Merge "Add missing //apex_available:platform to debuggerd" 2021-05-14 01:34:03 +00:00
David Anderson 6a4c173e2d Merge "libsnapshot: Move ImageManager creation to DeviceInfo." am: 9ac43f5421 am: 260c7f6e3d am: 57a440d2a2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705662

Change-Id: Ia0693f37e48000e7943f4b3f89f9e22fa5fcf7a3
2021-05-14 01:16:06 +00:00
David Anderson 57a440d2a2 Merge "libsnapshot: Move ImageManager creation to DeviceInfo." am: 9ac43f5421 am: 260c7f6e3d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705662

Change-Id: I88c8587d38550e8d33834fba6359a7344e8f2c8f
2021-05-14 00:44:30 +00:00
David Anderson 260c7f6e3d Merge "libsnapshot: Move ImageManager creation to DeviceInfo." am: 9ac43f5421
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705662

Change-Id: I29ed378aa7c22664156572452184172f6044a368
2021-05-14 00:29:31 +00:00
David Anderson 9ac43f5421 Merge "libsnapshot: Move ImageManager creation to DeviceInfo." 2021-05-14 00:12:41 +00:00
Peter Collingbourne aa544796ae Run MTE tests on zero-sized allocations.
Bug: 187879470
Change-Id: I9547f3032af9d1a921f8597a53389d25af33b369
2021-05-13 14:08:41 -07:00
Elliott Hughes 1056bd564e Merge "Remove String16::remove." am: e9c7c5c80c am: 50d6fc417e am: 203cdf89fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1704013

Change-Id: I5e718c0920791a41ee4a5638b81465a406d783e1
2021-05-13 19:44:55 +00:00
Elliott Hughes 203cdf89fc Merge "Remove String16::remove." am: e9c7c5c80c am: 50d6fc417e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1704013

Change-Id: If8fa89c9dd4a726d3599a486eb78649da24acd7c
2021-05-13 19:34:16 +00:00
Elliott Hughes 50d6fc417e Merge "Remove String16::remove." am: e9c7c5c80c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1704013

Change-Id: I52be9e6ce3fbdefca14317ad12ea3e536e73c704
2021-05-13 19:19:01 +00:00
Elliott Hughes e9c7c5c80c Merge "Remove String16::remove." 2021-05-13 19:04:33 +00:00
David Anderson b2ee4c14c9 libsnapshot: Move ImageManager creation to DeviceInfo.
This refactoring moves ImageManager creation out of SnapshotManager,
where it had always been rather awkward, and into IDeviceInfo so it can
participate in dependency injection.

The "first-stage init" state is now part of IDeviceInfo as well.

Bug: 187396878
Test: vts_libsnapshot_test
      libsnapshot_fuzzer_test
Change-Id: Ic4b3e93527cc074ec18c0c26440dbdb2504d0d5e
2021-05-13 11:33:38 -07:00
David Srbecky 160270690b Merge "Update API of MapInfo from libunwindstack" am: 1cbdc2a530 am: 17191002b7 am: 55e24d1340
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705307

Change-Id: I646c25bef6a2bb392a2c5da7a0323f4638d0aaf9
2021-05-13 10:40:57 +00:00
David Srbecky 55e24d1340 Merge "Update API of MapInfo from libunwindstack" am: 1cbdc2a530 am: 17191002b7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705307

Change-Id: I2c0d03b7e8ec134fef4716e2eb20116b2512f826
2021-05-13 10:23:45 +00:00
David Srbecky 17191002b7 Merge "Update API of MapInfo from libunwindstack" am: 1cbdc2a530
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705307

Change-Id: I2a6925ede88a55f75279489443fca2d6acca844a
2021-05-13 10:08:14 +00:00
David Srbecky 1cbdc2a530 Merge "Update API of MapInfo from libunwindstack" 2021-05-13 09:49:52 +00:00
Peter Collingbourne d6a4575224 Merge "Test that out-of-bounds UAF is not detected with MTE." am: fc7852b741 am: 4e122e057c am: 8958c32319
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705657

Change-Id: Ibaebbbded90dca299acc9e8e07ad532e0738b4c1
2021-05-13 04:32:26 +00:00
Peter Collingbourne 8958c32319 Merge "Test that out-of-bounds UAF is not detected with MTE." am: fc7852b741 am: 4e122e057c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705657

Change-Id: I90ff2584a0ced92170730c9173c31472dd87f66d
2021-05-13 03:29:30 +00:00
Peter Collingbourne 4e122e057c Merge "Test that out-of-bounds UAF is not detected with MTE." am: fc7852b741
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705657

Change-Id: I7ab42ac3206660ba073dd4d06d30a3d9ce7bb095
2021-05-13 03:15:47 +00:00
Peter Collingbourne fc7852b741 Merge "Test that out-of-bounds UAF is not detected with MTE." 2021-05-13 02:53:23 +00:00
David Srbecky d8ab48b4db Update API of MapInfo from libunwindstack
Use accessors to for all the fields.

Test: build
Change-Id: I68d149d914d4a4b088aaf822fe222a5d9e56ae80
2021-05-13 01:51:58 +01:00
Peter Collingbourne dc47634ec4 Test that out-of-bounds UAF is not detected with MTE.
This type of error is unlikely and attempting to detect it with MTE
is likely to produce false positive reports. Make sure that this type
of error is not detected by the allocator.

Change-Id: I90676d1a031411d6b725890311317802bc24b459
2021-05-12 15:56:43 -07:00
Elliott Hughes 2cf0411910 Remove String16::remove.
This function, ironically, is being removed.

Even more amusing, it was never "remove" anyway --- it literally did
the opposite, and removed everything *except* the range you passed to
it, and should probably have been called "keep"!

I'm looking at reimplementing much of libutils, but first I'm improving
test coverage, and literally every test I wrote for this failed. And
then when I fixed the "obvious bugs" in the implementation, I found
there actually were a couple of existing unit tests --- that mostly
served to demonstrate just how counter-intuitive this function was.

Bug: http://b/156999009
Test: treehugger
Change-Id: I41fd85f7c0988070f4039f607d2e57523d862ed9
2021-05-12 20:24:26 +00:00
Akilesh Kailash 3055d4b780 Merge "snapuserd: Remove assertions from daemon" am: fcd105d5dd am: c362b175df am: d46c4a6c21
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705025

Change-Id: Ieb6667f77900d3e3607ca05352a00efcc1b5535c
2021-05-12 19:00:14 +00:00
Treehugger Robot 70673be9dd Merge "libutils: remove the unused StopWatch lap functionality." am: 0839837fa4 am: 5c28af9897 am: 038077c1c5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1703652

Change-Id: If73e10e9321af420ff32b992a6df4f8dd9e5a911
2021-05-12 19:00:08 +00:00
Akilesh Kailash d46c4a6c21 Merge "snapuserd: Remove assertions from daemon" am: fcd105d5dd am: c362b175df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705025

Change-Id: Ic10634d55539e3752d7349971f6dc97031f72223
2021-05-12 18:40:21 +00:00
Treehugger Robot 038077c1c5 Merge "libutils: remove the unused StopWatch lap functionality." am: 0839837fa4 am: 5c28af9897
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1703652

Change-Id: I0d1cd112e189c18e43f1e0bc3b53e2b95455c6c5
2021-05-12 18:40:16 +00:00
Akilesh Kailash c362b175df Merge "snapuserd: Remove assertions from daemon" am: fcd105d5dd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705025

Change-Id: Ic0ecea6937a49ed7fae18dabcf720eb9461ba834
2021-05-12 18:23:12 +00:00
Treehugger Robot 5c28af9897 Merge "libutils: remove the unused StopWatch lap functionality." am: 0839837fa4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1703652

Change-Id: I85025cf1cb2e990d6a0ed9d70642e33f6bb67f35
2021-05-12 18:21:43 +00:00
Akilesh Kailash fcd105d5dd Merge "snapuserd: Remove assertions from daemon" 2021-05-12 18:04:22 +00:00
Akilesh Kailash 2a89cf82fa snapuserd: Remove assertions from daemon
Assertions in daemon will terminate the daemon.
This can bring the entire device to halt as the mount partitions
are mounted of snapshot devices and IO's will be hung in
"D" (uninterruptible state) eventually leading to sysrq crash.

Convert the relevant assertions into appropriate error codes and
propagate the error code back to dm-user.
IO will eventually fail but should not impact the overall usage of the device.

Bug: 187903835
Test: vts_libsnapshot, cow_snapuserd_test, full OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Iaf093898837d2aff5703ea1e615aecf7c1e53a8f
2021-05-12 17:31:38 +00:00
Paul Duffin 69caa70145 Add missing //apex_available:platform to debuggerd
This does not currently cause any problems but it does block progress
on the referenced bugs.

Bug: 187910671
Bug: 187914588
Test: m droid
Change-Id: I977cd842101187441ddbc873eac25598295aab06
2021-05-12 11:22:55 +01:00