Commit graph

86561 commits

Author SHA1 Message Date
Florian Mayer
f9566853bd Merge "Use scudo_stack_depot_size from process_info" into main 2023-12-11 23:38:13 +00:00
Tomasz Wasilczyk
6635431dc1 Merge "Introduce libutils_binder_sdk" into main 2023-12-09 03:43:07 +00:00
Xin Li
e32254c1ac Merge "Merge Android 14 QPR1" into main 2023-12-09 00:11:40 +00:00
Xin Li
c1b0f4d6b1 Merge Android 14 QPR1
Merged-In: Ifcc3872348c125e547a40156f9cb69fb079cb13e
Bug: 315507370
Change-Id: I41f0bd8df172924b88ddd32f67396a24e9230102
2023-12-08 13:14:38 -08:00
Treehugger Robot
f587bda852 Merge "Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."" into main am: 053e75b946
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2862614

Change-Id: Ifcc3872348c125e547a40156f9cb69fb079cb13e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 17:03:32 +00:00
Treehugger Robot
053e75b946 Merge "Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."" into main 2023-12-08 16:24:15 +00:00
Xin Li
286b10a4cc Merge "Merge UQ1A.231205.015" into aosp-main-future 2023-12-08 08:02:42 +00:00
T.J. Mercier
236e74a3cb Merge changes from topic "revert-2819069-LYZVLDOFQA" into main am: b73d41c50b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2865117

Change-Id: I72d439019c70beeb88058133591453f1c9d46114
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 02:13:38 +00:00
T.J. Mercier
b73d41c50b Merge changes from topic "revert-2819069-LYZVLDOFQA" into main
* changes:
  Revert "libprocessgroup: Poll on cgroup.events"
  Revert "libprocessgroup: Use cgroup.kill"
2023-12-08 01:50:41 +00:00
Android Culprit Assistant
a72332f953 Revert "libprocessgroup: Poll on cgroup.events"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/91da3c52-9b76-498b-bdbd-a9de7d7ff53b).

Change-Id: I996c595bee9acc15aedaf0a912f67fa027f33cd0
2023-12-08 01:48:25 +00:00
Android Culprit Assistant
c0ce178640 Revert "libprocessgroup: Use cgroup.kill"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/91da3c52-9b76-498b-bdbd-a9de7d7ff53b).

Change-Id: I459265b9c9117d6006c1223947a202505d24c08f
2023-12-08 01:48:30 +00:00
Xin Li
c5db6f6ca0 Merge UQ1A.231205.015
Bug: 308969284
Merged-In: I856c812d22363cc1d1e8aa88706d4d3b89044f52
Change-Id: I678b5d4e8418a905a7ca167a41888dcba5af2367
2023-12-07 15:48:04 -08:00
Justin Yun
29192395bc Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."
Revert submission 2863786-trunk_vendor_api_level

Reason for revert: Reland the ro.vendor.api_level update

Reverted changes: /q/submissionid:2863786-trunk_vendor_api_level

Change-Id: I1f380e04f673eb4570e598a6e2013fce6e69213e
2023-12-07 22:22:53 +00:00
Tomasz Wasilczyk
1578cb3c14 Introduce libutils_binder_sdk
Bug: 285204695
Test: mma in Binder directory
Change-Id: I430b81594167940cb47897e4261ad87c75ac3783
2023-12-07 14:04:16 -08:00
Treehugger Robot
e30ca0f169 Merge changes from topic "cgroup.events" into main am: 1b44b8c6d6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2819069

Change-Id: Ic26f89109f6a75a7c438096a1eff8c4607023d91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 20:08:59 +00:00
Treehugger Robot
1b44b8c6d6 Merge changes from topic "cgroup.events" into main
* changes:
  libprocessgroup: Use cgroup.kill
  libprocessgroup: Poll on cgroup.events
2023-12-07 19:40:11 +00:00
Treehugger Robot
f60bfa296a Merge "trusty: apploader: fail specifically if app package is 0 bytes" into main am: e5bb7ef272
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2863846

Change-Id: Ia4d2f281d64499405537661e25f42cc9aafbae6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 19:20:59 +00:00
Treehugger Robot
e5bb7ef272 Merge "trusty: apploader: fail specifically if app package is 0 bytes" into main 2023-12-07 18:53:08 +00:00
Mike McTernan
b22e5bcf60 trusty: apploader: fail specifically if app package is 0 bytes
Replace assert with check and log message.  Also log more about the request if DMA heap allocation fails.

Bug: 315283243
Test: boot to home
Test: touch x && trusty_apploader x
Change-Id: Ic075809fd2a6b09d9c4e8dff986709c4deae8fb7
2023-12-07 12:16:09 +00:00
Massimo Carli
7a4c47e3ac Merge "Revert "Calculate ro.vendor.api_level with the new vendor API format"" into main am: 367d732f3c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2863786

Change-Id: I56698526a558eef80cce7c09f0f0795d46344fa9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 12:08:19 +00:00
Massimo Carli
367d732f3c Merge "Revert "Calculate ro.vendor.api_level with the new vendor API format"" into main 2023-12-07 11:22:17 +00:00
Massimo Carli
08534b8d0b Revert "Calculate ro.vendor.api_level with the new vendor API format"
This reverts commit e267e31d73.

Reason for revert: b/315246126

Change-Id: I456858c6f4c528158c0826efcdc1509b701c32f7
2023-12-07 09:19:24 +00:00
Justin Yun
dfeb7be11f Merge "Calculate ro.vendor.api_level with the new vendor API format" into main am: 698c6f9035
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2839486

Change-Id: I146f0afe3feea591548ff373fbac9bb8ade70b82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 04:30:18 +00:00
Justin Yun
698c6f9035 Merge "Calculate ro.vendor.api_level with the new vendor API format" into main 2023-12-07 03:54:45 +00:00
T.J. Mercier
38b8bb1e4a libprocessgroup: Use cgroup.kill
By using cgroup.kill we don't need to read cgroup.procs at all for
SIGKILLs, which is more efficient and should help reduce CPU contention
and cgroup lock contention. Fallback to cgroup.procs if we encounter an
error trying to use cgroup.kill, but if cgroup.kill fails it's likely
that cgroup.procs will too.

Bug: 239829790
Change-Id: I44706faccfb7c4611b512a3642b913f06d30c1dc
2023-12-07 00:12:07 +00:00
T.J. Mercier
3b5bb3a364 libprocessgroup: Poll on cgroup.events
In killProcessGroup we currently read cgroup.procs to find processes to
kill, send them kill signals until cgroup.procs is empty, then remove
the cgroup directory. The cgroup cannot be removed until all processes
are dead, otherwise we'll get an EBUSY error from the kernel.

There is a race in the kernel where cgroup.procs can read empty even
though the cgroup is pinned by processes which are still exiting, and
can't be removed yet. [1]

Let's use the populated field of cgroup.events instead of an empty
cgroup.procs file to determine when the cgroup is removable. In
addition to functioning like we expect, this is more efficient because
we can poll on cgroup.events instead of retrying kills and rereading
cgroup.procs every 5ms which should help reduce CPU contention and
cgroup lock contention.

It's still possible that it takes longer for a cgroup to become
unpopulated than our timeout allows, in which case we will fail to
remove the cgroup and leak kernel memory. But this change should help
reduce the probability of that happening.

[1] https://lore.kernel.org/all/CABdmKX3SOXpcK85a7cx3iXrwUj=i1yXqEz9i9zNkx8mB=ZXQ8A@mail.gmail.com/

Bug: 301871933
Change-Id: If7dcfb331f47e06994c9ac85ed08bbcce18cdad7
2023-12-07 00:12:00 +00:00
Siim Sammul
85f22598ff Merge "Move tombstone_proto_to_text out of libdebuggerd." into main am: 73ade16187
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2836598

Change-Id: Ibf7fec2cde55607330624a6535e160005bb82121
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 11:00:59 +00:00
Siim Sammul
73ade16187 Merge "Move tombstone_proto_to_text out of libdebuggerd." into main 2023-12-06 10:13:18 +00:00
Treehugger Robot
cefc3e1584 Merge "Fix cow v3 size estimation errors" into main am: 442990fc5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861265

Change-Id: I342e92d27e701dab65d14ba595b37ef83d49f33e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 07:45:26 +00:00
Treehugger Robot
522ebe90cf Merge "Fix -Wunused-variable compiler warning" into main am: e5524c0669
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861269

Change-Id: I0de12b886e4b3ab6a823e72368fc8ea1ae2d3f8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 07:44:45 +00:00
Treehugger Robot
442990fc5c Merge "Fix cow v3 size estimation errors" into main 2023-12-06 06:32:13 +00:00
Treehugger Robot
e5524c0669 Merge "Fix -Wunused-variable compiler warning" into main 2023-12-06 06:17:34 +00:00
Kelvin Zhang
d45c50911f Fix cow v3 size estimation errors
Current cow size estimation is computed by taking the offset of next
data write. However, during COW size estimation we repeatdly increment
op_count_max. Since data section is placed right after op section,
incrementing  op_count_max has the effect of moving the beginning of
data section. next_data_pos_ is never updated in this process, causing
the final estiamte to be off.

Test: th
Bug: 313962438
Change-Id: I250dff54c470c9c20d6db33d91bac898358dee31
2023-12-05 21:27:38 -08:00
Yi Kong
90f6cb4b2c Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: Ia6d0a735c94c7be39994fb9c8ae4d3b65d6f4301
2023-12-06 14:07:36 +09:00
Jaegeuk Kim
28623a220f Merge "Use target path when handling dm-bow" into main am: 2f56ec931a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2860710

Change-Id: Idd3168510ac124007742a17fcd4424995e9c652e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:59:16 +00:00
Jaegeuk Kim
2f56ec931a Merge "Use target path when handling dm-bow" into main 2023-12-06 02:34:37 +00:00
Treehugger Robot
037e20d349 Merge "Match upstream API change" into main am: 1772cd427c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861266

Change-Id: I2b8f99495f5ccf12179f881c9c5d337c4a0bf2f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:34:10 +00:00
Treehugger Robot
1772cd427c Merge "Match upstream API change" into main 2023-12-06 01:28:10 +00:00
Jaegeuk Kim
995dd0385e Use target path when handling dm-bow
Refactor getting sysfs directory.

Bug: 312817490
Change-Id: Icc12002d3f5a2e24f86ce88e5e602cf7a71b0f84
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2023-12-05 17:16:17 -08:00
Florian Mayer
6757ecd2a3 Match upstream API change
Change was done in
e68c265543

Change-Id: Id1a288dfdb5edb7cb7d639ec4548926cc4085d8c
2023-12-06 00:16:43 +00:00
Kelvin Zhang
0c6bfd49c9 Merge "Fix multiple calls to set_[source/type]" into main am: ad51f09b05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2860565

Change-Id: Ic7f011fd8bb33a4b87616e48fa2c3622415ad239
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 21:20:44 +00:00
Kelvin Zhang
ad51f09b05 Merge "Fix multiple calls to set_[source/type]" into main 2023-12-05 20:15:41 +00:00
Kelvin Zhang
12e0531224 Fix multiple calls to set_[source/type]
Since currently implementation just does an bitwise or with the
storage unit, multiple calls to set_source would result in overlapping
bits. Fix by first clear the existing storage.

Test: th
Bug: 313962438
Change-Id: Iecfe8dd244c0f65ecd3cacb0404fdc39ef836d97
2023-12-05 10:28:12 -08:00
Yi Kong
b3062ab360 Merge "Fix -Wunused-variable compiler warning" into main am: 96fd39c228
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2858392

Change-Id: Ie98b0e4184d6aff26476a4ee654c38fce9c10ea1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 15:39:51 +00:00
Lucas Henneman
f362c2d600 Merge "TEST_MAPPING: fix syntax of TODO tag" into main am: eadaf5faff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2854047

Change-Id: Ia1caa7a642c13c9bf7b88cc9f2841df8f4d1cc63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 15:39:02 +00:00
Yi Kong
96fd39c228 Merge "Fix -Wunused-variable compiler warning" into main 2023-12-05 15:01:46 +00:00
Lucas Henneman
eadaf5faff Merge "TEST_MAPPING: fix syntax of TODO tag" into main 2023-12-05 14:29:55 +00:00
Siim Sammul
c08a34e3dc Move tombstone_proto_to_text out of libdebuggerd.
This is done so that we could depend on it elsewhere without needing all the unrelated methods.
Needed for ag/24553347

Bug: 296207744
Test: refactoring build
Change-Id: I7c6733208f3ae63ba9559753a24cffcb8e1b9d1e
2023-12-05 10:14:27 +00:00
Yi Kong
b8bbc43489 Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: I63b1625decd3dcdb9f405c8825203e04810c282c
2023-12-05 18:36:00 +09:00
Florian Mayer
e8fcfee409 Use scudo_stack_depot_size from process_info
This is a no-op but will be used in upcoming scudo changes that allow to
change the depot size at process startup time, and as such we will no
longer be able to call __scudo_get_stack_depot_size in debuggerd.

We already did the equivalent change for the ring buffer size in
https://r.android.com/q/topic:%22scudo_ring_buffer_size%22

Bug: 309446692
Change-Id: I761a7602c54a1f8f2d0575c5e011820d8dbaab63
2023-12-04 16:48:45 -08:00