Commit graph

35521 commits

Author SHA1 Message Date
Florian Mayer
5d077fdeb0 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" am: bc1b267454 am: ff9895bde5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1781388

Change-Id: Ib5ef42971118ae58040e5d6bd24d2e48adf22dea
2021-07-29 11:13:53 +00:00
Florian Mayer
ff9895bde5 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" am: bc1b267454
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1781388

Change-Id: Ia7165cbe6527a5db7d469b2dd05cce549b2474f6
2021-07-29 11:03:11 +00:00
Florian Mayer
bc1b267454 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" 2021-07-29 10:48:57 +00:00
Florian Mayer
b4ab4f6d43 Revert "Fix GWP hooks not being restored, leading to crashes."
This reverts commit 9db8f2bc87.

Reason for revert: b/194806683

Change-Id: If6a91f26af17ae7510417eb0d65a79dc7ae2e04e
2021-07-29 09:57:37 +00:00
Christopher Ferris
1ae77d0dbe Merge "Allow retry of test if log missing." am: 1e9af0f339 am: 7f3f153abd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780491

Change-Id: Iebbf9d433a25d23192a18c15d8e6dccde61dbf2d
2021-07-28 21:01:06 +00:00
Christopher Ferris
7f3f153abd Merge "Allow retry of test if log missing." am: 1e9af0f339
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780491

Change-Id: I3394d3831075c2bc4721220c6b3d9e8a53d7e3df
2021-07-28 20:45:15 +00:00
Christopher Ferris
1e9af0f339 Merge "Allow retry of test if log missing." 2021-07-28 20:25:38 +00:00
Christopher Ferris
d9d9ee8466 Allow retry of test if log missing.
Refactor the code a bit to allow retrying if a log message is missing.
This is because there is a possibility of a log message getting dropped.
If that happens, merely rerun up to three times and pass if the missing
message is present.

Also fix a race condition that can occur if the LogReader threads are
being terminated but happen to be allocating memory while they are
in the signal handler. This situation causes aborts in the memory
allocator or a deadlock. Before this change, the verify_leak*
tests would fail in less than twenty iterations. After, I could run
for hundreds of iterations.

Bug: 193898572

Test: Ran unit tests in a loop.
Change-Id: I0fb5beab6041dcf3e3fd19f6748bb20bb81a2506
2021-07-27 18:39:56 -07:00
Florian Mayer
a47916052a Merge "Fix GWP hooks not being restored, leading to crashes." am: 0f75a5a416 am: bc5138280a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1772825

Change-Id: I3bb37c8807e128799d40f51f949c4e5c5f87bb1e
2021-07-27 17:19:36 +00:00
Florian Mayer
bc5138280a Merge "Fix GWP hooks not being restored, leading to crashes." am: 0f75a5a416
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1772825

Change-Id: I9d896e108bd8b7edf59c8801df6b33fea7a07472
2021-07-27 17:00:24 +00:00
Florian Mayer
0f75a5a416 Merge "Fix GWP hooks not being restored, leading to crashes." 2021-07-27 16:41:30 +00:00
Florian Mayer
9db8f2bc87 Fix GWP hooks not being restored, leading to crashes.
If the DispatchReset fails, the subsequent iteration has the wrong
idea of what the "original" table is, and if a subsequent DispatchReset
succeeds it unhooks them.

Repro in https://r.android.com/1767868.

Bug: 193012939
Bug: 189776979
Change-Id: Ie0644412291d3b53dcf89cdd056e542d32822975
2021-07-27 13:00:23 +01:00
Colin Cross
f4a3f4bbf7 Merge "Export kernel headers for musl" am: a0f3478e75 am: ff4ecb5ddb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1777005

Change-Id: I3f3cc0ee8de2405e43d65a12ed35e464c06f5854
2021-07-26 20:05:02 +00:00
Colin Cross
ff4ecb5ddb Merge "Export kernel headers for musl" am: a0f3478e75
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1777005

Change-Id: I953a7cf2990d3cb6f83d4ed15beb9c4b25387bff
2021-07-26 19:47:06 +00:00
Colin Cross
a0f3478e75 Merge "Export kernel headers for musl" 2021-07-26 19:31:54 +00:00
Christopher Ferris
653df690bb Merge "Read the log while test runs instead of after." am: e397e49aa7 am: 41c20fb8d7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I713b646236a10a309234d3dfcd7bd7c627dbc0c1
2021-07-23 22:47:39 +00:00
Christopher Ferris
41c20fb8d7 Merge "Read the log while test runs instead of after." am: e397e49aa7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I19f7634402b2c3faca0813578d4749550ee014b3
2021-07-23 22:15:35 +00:00
Colin Cross
5d50dbb5f0 Export kernel headers for musl
Musl will reuse bionic's kernel headers.

Bug: 190084016
Test: m libc_musl
Change-Id: Ie750556f9a055984eb9bab41fa61faa965f037e5
2021-07-23 15:01:58 -07:00
Christopher Ferris
e397e49aa7 Merge "Read the log while test runs instead of after." 2021-07-23 21:53:32 +00:00
Treehugger Robot
63e3f9b200 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412 am: 86c150bea1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I63c089274e6e90965117497de054e7e9a4cfba35
2021-07-23 21:28:09 +00:00
Treehugger Robot
86c150bea1 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I2d563a61b147b46cc479363058864c063f93257b
2021-07-23 21:25:06 +00:00
Treehugger Robot
3367bf3412 Merge "Rename cc_object default_shared_libs to system_shared_libs" 2021-07-23 21:18:51 +00:00
Christopher Ferris
4990c2dcbb Read the log while test runs instead of after.
These tests can be flaky if something is spamming the log and
expiring messages. Previously, the log wasn't read until the
forked process was complete. Now, two threads are spawned right
after the process forks to read the log while running. This
should avoid any problems if the log is being spammed while the
test runs.

In addition, fixed some potential flakiness in the test that might
occur if the test incorrectly gets stale log data.

Bug: 193898572

Test: All unit tests pass on cuttlefish (both 32 bit and 64 bit).
Test: Forced an abort and verified that the crash log reader sees
Test: the message.
Test: Verified that the log reader for the main and crash log properly
Test: read data.
Test: Verified the test passes while swamping the log by running
Test: the log unit tests while running two copies of the system
Test: tests.
Change-Id: I68bd92a8c483eac0146ada87dd4201dda0902c49
2021-07-23 11:48:29 -07:00
Bowgo Tsai
b6cb168674 [automerger skipped] Revert "Adding system property tracing" am: c75fbc7b8a -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 61a5a8380d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353073

Change-Id: Ifc84eb104986969ff7f5da61adf2713e75d28d57
2021-07-23 18:12:40 +00:00
Bowgo Tsai
9a2d3cac37 [automerger skipped] Revert "bionic_systrace: moving global static variables" am: 2ebdb61620 -s ours
am skip reason: Merged-In If59e3dc25684a3c2b1d3ff74f995311afe6c6e89 with SHA-1 3ec21f527a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353072

Change-Id: Ied2856102c8310ccae1d63e213b602e0e5ab4b5c
2021-07-23 18:12:39 +00:00
Joel Galenson
11fa022647 Merge changes from topic "rust-property-bindings" am: a67c7fdca8 am: 0504d629aa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I396b2c42804abf0b3f260db2610aa2158a6fd90d
2021-07-23 15:22:21 +00:00
Joel Galenson
75989112f5 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310 am: 13e81f8712
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: Ic13580d7167049288dbb0c30bf6cd3718fcd2543
2021-07-23 15:22:19 +00:00
Joel Galenson
0504d629aa Merge changes from topic "rust-property-bindings" am: a67c7fdca8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I89e98a821a6ca7735b0f7e1e2b24e9a8836d9f76
2021-07-23 15:04:57 +00:00
Joel Galenson
13e81f8712 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: I6e088ac03ce5e98a81b335456fd6f6a43269ac05
2021-07-23 15:04:54 +00:00
Joel Galenson
a67c7fdca8 Merge changes from topic "rust-property-bindings"
* changes:
  Improve the Rust property bindings.
  Migrate keystore2's Rust system library bindings to bionic.
2021-07-23 14:46:55 +00:00
Christopher Ferris
b7b14b73b0 Merge "Fix NOTICE file." am: e780ad0c24 am: 103efe0c08
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I0e84b6e3899f790009f42445f8d074905442a2a5
2021-07-23 05:57:17 +00:00
Christopher Ferris
103efe0c08 Merge "Fix NOTICE file." am: e780ad0c24
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I55dc3bb98b057fe0e2b257dada9c142b58d40d67
2021-07-23 05:38:42 +00:00
Christopher Ferris
e780ad0c24 Merge "Fix NOTICE file." 2021-07-23 05:19:07 +00:00
Christopher Ferris
5c49616f70 Fix NOTICE file.
Test: Uploads.
Change-Id: I23fb9413dd62aa06ffa26e5e7fc0f7e26fa8cde4
2021-07-22 22:37:19 +00:00
Colin Cross
02f813703a Rename cc_object default_shared_libs to system_shared_libs
default_shared_libs has been removed, go back to the system_shared_libs
property that now has the same behavior.

Bug: 193559105
Test: m checkbuild
Change-Id: I9edac93f7e6d9d4b99883b7a7b14ab52942c0ef2
2021-07-22 12:02:10 -07:00
Treehugger Robot
a9519cd8bc Merge "Move system_shared_libs into target.bionic clause" am: 2ffa0eb7d3 am: 9328d2f1d8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1764658

Change-Id: Ie784751c7ec83aea0a00b2133e0402a7877d30e6
2021-07-22 19:00:11 +00:00
Treehugger Robot
9328d2f1d8 Merge "Move system_shared_libs into target.bionic clause" am: 2ffa0eb7d3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1764658

Change-Id: I0b2facf4a49d0683683be9ba12f5f975fa7018b5
2021-07-22 18:28:58 +00:00
Treehugger Robot
2ffa0eb7d3 Merge "Move system_shared_libs into target.bionic clause" 2021-07-22 17:44:32 +00:00
Bowgo Tsai
c75fbc7b8a Revert "Adding system property tracing"
Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Test: build and boot a device
Change-Id: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
(cherry picked from commit 61a5a8380d)
2021-07-22 12:37:21 +08:00
Bowgo Tsai
2ebdb61620 Revert "bionic_systrace: moving global static variables"
This reverts commit 1e1c7845aa.

Reason for revert: makes property get/set non-reentrant

Bug: 193050299
Test: build and boot a device
Change-Id: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
Merged-In: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
(cherry picked from commit 3ec21f527a)
2021-07-22 12:37:00 +08:00
Joel Galenson
4aebf55257 Improve the Rust property bindings.
Add a utility function to get the current value of a property and
remove some keystore2-specific strings.

Bug: 182498247
Test: Build
Change-Id: Ie7e9903546a4d4cd6c54a118c42257a23510dda6
2021-07-21 15:21:29 -07:00
Joel Galenson
e1f1e79310 Migrate keystore2's Rust system library bindings to bionic.
This is purely a port: it does not add or change any functionality
(other than renaming the library).

Bug: 182498247
Test: Use library.
Change-Id: I4cb8f1c22ca4ca5a398116952fb9957d283d235b
2021-07-21 15:21:27 -07:00
Treehugger Robot
17b40a00de [automerger skipped] Merge changes from topic "revert_sysprop_trace" am: dc42a98763 -s ours am: 7d657de0bd -s ours
am skip reason: Merged-In Id2b93acb2ce02b308c0e4889f836159151af3b46 with SHA-1 16d5161a43 is already in history. Merged-In was found from reverted change.

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1767728

Change-Id: I731f62c5dac391e5dddb2dbdf53839859cca2bf1
2021-07-21 12:05:51 +00:00
Treehugger Robot
7d657de0bd [automerger skipped] Merge changes from topic "revert_sysprop_trace" am: dc42a98763 -s ours
am skip reason: Merged-In Id2b93acb2ce02b308c0e4889f836159151af3b46 with SHA-1 16d5161a43 is already in history. Merged-In was found from reverted change.

Reverted change: https://android-review.googlesource.com/c/platform/bionic/+/1403568

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1767728

Change-Id: Iec76c426cc183b92f9d4efca62c886c101129ddd
2021-07-21 11:56:23 +00:00
Treehugger Robot
dc42a98763 Merge changes from topic "revert_sysprop_trace"
* changes:
  Revert "Adding system property tracing"
  Revert "bionic_systrace: moving global static variables"
2021-07-21 11:43:39 +00:00
Bowgo Tsai
8f14b65032 Revert "Adding system property tracing"
Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Test: build and boot a device
Change-Id: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
(cherry picked from commit 61a5a8380d)
2021-07-21 09:15:41 +08:00
Bowgo Tsai
13a960f0ed Revert "bionic_systrace: moving global static variables"
This reverts commit 1e1c7845aa.

Reason for revert: makes property get/set non-reentrant

Bug: 193050299
Test: build and boot a device
Change-Id: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
Merged-In: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89
(cherry picked from commit 3ec21f527a)
2021-07-21 09:10:41 +08:00
TreeHugger Robot
b285176e58 Merge changes from topic "revert_sysprop_trace-sc-dev-plus-aosp" into sc-dev-plus-aosp
* changes:
  Revert "Adding system property tracing"
  Revert "bionic_systrace: moving global static variables"
2021-07-20 16:30:20 +00:00
Christopher Ferris
f9be3797de Merge "Avoid undefined compiler behavior" am: 98115b7494 am: d5baa2bffa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768648

Change-Id: I2ccd631366762d384b230af78d4f022e199a84cf
2021-07-16 06:45:53 +00:00
Christopher Ferris
d5baa2bffa Merge "Avoid undefined compiler behavior" am: 98115b7494
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1768648

Change-Id: Ic248dc211231afb7792bc459407b1d41efa783a9
2021-07-16 06:30:57 +00:00