TreeHugger Robot
eb5f5d8db6
Merge "Disable return PAC in __pthread_start." into sc-dev
2021-06-09 16:14:18 +00:00
Peter Collingbourne
9a1b7d1243
Disable return PAC in __pthread_start.
...
This function doesn't return, but it does appear in stack traces. Avoid
using return PAC in this function because we may end up resetting IA,
which may confuse unwinders due to mismatching keys.
Bug: 189808795
Change-Id: I953da9078acd1d43eb7a47fb11f75caa0099fa12
Merged-In: I953da9078acd1d43eb7a47fb11f75caa0099fa12
2021-06-08 18:41:36 -07:00
TreeHugger Robot
381ed8f9d2
Merge "Use ro.build.type instead of ro.debuggable" into sc-dev
2021-06-08 23:39:29 +00:00
Ryan Prichard
686a21937b
Use ro.build.type instead of ro.debuggable
...
The LD_CONFIG_FILE test needs to match how Bionic was compiled, and
Bionic only enables LD_CONFIG_FILE for debug builds (i.e. ro.build.type
is "user"). ro.debuggable can be forced on without recompiling Bionic.
Bug: http://b/140324381
Bug: http://b/189422994
Test: bionic unit tests
Change-Id: I139059a7f94d15a5447dab292927606a6bcc48ef
(cherry picked from commit 546723b2b8
)
2021-06-08 14:04:57 -07:00
Florian Mayer
b887dc0b5c
Fix dangling pointer in heapprofd API.
...
We would dlopen heapprofd_client.so, which has a static initializer [1]
that passes a pointer to of its functions to heapprofd_client_api.so.
If we dlclose heapprofd_client.so, this pointer is dangling.
[1]: https://cs.android.com/android/platform/superproject/+/master:external/perfetto/src/profiling/memory/malloc_interceptor_bionic_hooks.cc?q=symbol:g_heap_id
This is a cherry-pick of 85c7838bd9
.
Bug: 189332777
Change-Id: Ia4a9d9dd7c89eceec86c6fac5f4b66de85d7604e
2021-06-04 11:15:27 +01:00
David Srbecky
a3b1926d75
Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0
am: defbe6bfbd
am: 7b89804d8a
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416
Change-Id: I83c0ee90b3763476f9497139cf838e70b3348dbc
2021-05-13 10:40:57 +00:00
David Srbecky
7b89804d8a
Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0
am: defbe6bfbd
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416
Change-Id: Iab72065969294c1259351272ba8eab78a5591f6d
2021-05-13 10:23:44 +00:00
David Srbecky
defbe6bfbd
Merge "Update API of MapInfo from libunwindstack" am: 453076b8d0
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1705416
Change-Id: If4599131c1ba63f1c9eb938483b78b2375baac7a
2021-05-13 10:08:14 +00:00
David Srbecky
453076b8d0
Merge "Update API of MapInfo from libunwindstack"
2021-05-13 09:49:52 +00:00
David Srbecky
92b8d64f41
Update API of MapInfo from libunwindstack
...
Use accessors to for all the fields.
Test: build
Change-Id: I6ae458002e059ef2f9d73931cc68f2f698f85d7e
2021-05-13 01:50:00 +01:00
Christian Wailes
6b7cecc5ea
Merge "Clear the stack frame pointer in _start and __bionic_clone" am: b1270fdd54
am: 98a50fa503
am: e7bc7bde23
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1695053
Change-Id: Id9d2a02f0f96760f52e4dd18a5a08763680bdbf1
2021-05-12 23:56:29 +00:00
Christian Wailes
e7bc7bde23
Merge "Clear the stack frame pointer in _start and __bionic_clone" am: b1270fdd54
am: 98a50fa503
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1695053
Change-Id: I6e0abad919598aa6ac097306bc19d2bd17dfc89d
2021-05-12 23:31:44 +00:00
Christian Wailes
98a50fa503
Merge "Clear the stack frame pointer in _start and __bionic_clone" am: b1270fdd54
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1695053
Change-Id: Ib41092b668a8b5bdf177c56fa1ac46ebf8759799
2021-05-12 23:07:24 +00:00
Christian Wailes
b1270fdd54
Merge "Clear the stack frame pointer in _start and __bionic_clone"
2021-05-12 22:52:59 +00:00
Collin Fijalkovich
733895f673
Merge "Add cc_defaults for hugepage alignment of shared libraries" am: 13d267e77e
am: fef6f7bcc5
am: 74e4a617aa
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1691208
Change-Id: I026d8a8c69ea9de5eb1b71a5f90b8cb2e16baf69
2021-05-11 17:06:07 +00:00
Collin Fijalkovich
74e4a617aa
Merge "Add cc_defaults for hugepage alignment of shared libraries" am: 13d267e77e
am: fef6f7bcc5
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1691208
Change-Id: I30175a55a06a40170294665fbd0f0e094b445aea
2021-05-11 16:48:50 +00:00
Collin Fijalkovich
fef6f7bcc5
Merge "Add cc_defaults for hugepage alignment of shared libraries" am: 13d267e77e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1691208
Change-Id: Iacab3396fab8fe7dddb996c93adbc1bed5c3f001
2021-05-11 16:21:01 +00:00
Collin Fijalkovich
13d267e77e
Merge "Add cc_defaults for hugepage alignment of shared libraries"
2021-05-11 16:13:58 +00:00
Collin Fijalkovich
d6c5f93cae
Merge "Bionic: Mark PMD aligned text segments huge page eligible" am: 20ab1b7b47
am: be2927bf2f
am: e20122b90e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1652592
Change-Id: Icd962b28b78acfbc185ac71a30fe297ba53e5f41
2021-05-10 20:34:06 +00:00
Collin Fijalkovich
e20122b90e
Merge "Bionic: Mark PMD aligned text segments huge page eligible" am: 20ab1b7b47
am: be2927bf2f
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1652592
Change-Id: I6b57627bdae52e073f533a2713f05e4d9249a6a9
2021-05-10 20:15:46 +00:00
Collin Fijalkovich
be2927bf2f
Merge "Bionic: Mark PMD aligned text segments huge page eligible" am: 20ab1b7b47
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1652592
Change-Id: I9ea5cd0ba509d44081f92fbf59163113a87f5f38
2021-05-10 19:57:27 +00:00
Collin Fijalkovich
20ab1b7b47
Merge "Bionic: Mark PMD aligned text segments huge page eligible"
2021-05-10 16:11:41 +00:00
Chris Wailes
559f27828c
Clear the stack frame pointer in _start and __bionic_clone
...
This CL adds an instruction to the _start label that clears the frame
pointer. This allows stack walking code to determine when it has
reached the end of the stack.
The __bionic_clone function is similarly modified, for architectures
that weren't already doing both.
Test: bionic-unit-tests
Test: CtsBionicTestCases
Change-Id: Iea3949f52c44f7931f9fff2d60d4d9e5c742c120
2021-05-07 15:00:55 -07:00
Collin Fijalkovich
47d27aa79c
Bionic: Mark PMD aligned text segments huge page eligible
...
To take advantage of file-backed huge pages for the text segments of key
shared libraries (go/android-hugepages), the dynamic linker must load
candidate ELF files at an appropriately aligned address and mark
executable segments with MADV_HUGEPAGE.
This patches uses segments' p_align values to determine when a file is
PMD aligned (2MB alignment), and performs load operations accordingly.
Bug: 158135888
Test: Verified PMD aligned libraries are backed with huge pages on
supporting kernel versions.
Change-Id: Ia2367fd5652f663d50103e18f7695c59dc31c7b9
2021-05-06 13:15:11 -07:00
Christopher Ferris
968e896777
Merge "Update to v5.12 kernel headers." am: 3e0defac5d
am: 9f53cf2c62
am: cb695228f9
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1694549
Change-Id: Ie51fb5f053e3614d8b5d832a057feb33858e231e
2021-05-04 19:01:51 +00:00
Christopher Ferris
cb695228f9
Merge "Update to v5.12 kernel headers." am: 3e0defac5d
am: 9f53cf2c62
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1694549
Change-Id: Iaa40067243b77b89c13a0f141d2631876940e2c3
2021-05-04 18:38:16 +00:00
Christopher Ferris
9f53cf2c62
Merge "Update to v5.12 kernel headers." am: 3e0defac5d
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1694549
Change-Id: I7c65defa70f1dda2c94fd39ea32b683f0d141cb3
2021-05-04 18:12:30 +00:00
Christopher Ferris
3e0defac5d
Merge "Update to v5.12 kernel headers."
2021-05-04 17:50:59 +00:00
Christopher Ferris
a9750eda0d
Update to v5.12 kernel headers.
...
Kernel headers coming from:
Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.12
Test: Boots flame device and runs bionic unit tests.
Test: Boots acloud device and runs bionic unit tests.
Change-Id: I8ac107ce9d4978be3ef9517b90ad6ecafd06785a
2021-05-03 15:01:39 -07:00
Collin Fijalkovich
c9521e08ce
Add cc_defaults for hugepage alignment of shared libraries
...
Introduces a cc_defaults category hugepage_aligned that passes the
requisite linker flags to produce shared object files with 2MB-aligned
sections. This enables supporting platforms to back the text segments of
these libraries with hugepages.
Bug: 158135888
Test: Built and confirmed ELF layout
Change-Id: I5c8ce35d8f8bf6647ec19d58398740bd494cc89c
2021-04-29 11:32:43 -07:00
Colin Cross
623add1acd
Merge "Replace llndk_library with llndk clause in cc_library" am: 48166a4eaf
am: 6cac53807a
am: b2e9a0b1c0
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613420
Change-Id: Ia3672e72b3b52b5d1e9593118450a2734810f234
2021-04-28 18:28:38 +00:00
Colin Cross
b2e9a0b1c0
Merge "Replace llndk_library with llndk clause in cc_library" am: 48166a4eaf
am: 6cac53807a
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613420
Change-Id: I561879583a05c06dbb0241bade67cf738c207733
2021-04-28 18:09:01 +00:00
Colin Cross
6cac53807a
Merge "Replace llndk_library with llndk clause in cc_library" am: 48166a4eaf
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613420
Change-Id: I084aefdf9a56f839b14bdfec74ef218b9693c094
2021-04-28 17:52:01 +00:00
Colin Cross
48166a4eaf
Merge "Replace llndk_library with llndk clause in cc_library"
2021-04-28 16:21:43 +00:00
Colin Cross
a0a4a6c296
Replace llndk_library with llndk clause in cc_library
...
Remove the vestigial llndk_library and replace it with properties
in the llndk clause of the implementation cc_library.
In order to reduce duplication of the arch-specific headers used
by the implementation and LLNDK, rename libc_headers_arch to
libc_llndk_headers and hoist the "include" directory out of it,
since that directory is preproccessed separately for LLNDK
libraries.
Bug: 170784825
Test: m checkbuild
Test: compare out/soong/build.ninja
Change-Id: I75f0ff9129d910640da55eee6a6387467e6e4a9d
2021-04-26 17:45:57 -07:00
Treehugger Robot
9c2d769b1e
Merge "Reorder libc.llndk headers to match libc_headers_arch" am: 4b42ad753e
am: 454fceca01
am: ab02a1a59d
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613419
Change-Id: If616286fb3a14e7bc37e719ef03700803d2da567
2021-04-23 03:55:24 +00:00
Treehugger Robot
ab02a1a59d
Merge "Reorder libc.llndk headers to match libc_headers_arch" am: 4b42ad753e
am: 454fceca01
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613419
Change-Id: I12e70807c2248c73dcd43bd4805938d1beb8cf9b
2021-04-23 03:27:34 +00:00
Treehugger Robot
454fceca01
Merge "Reorder libc.llndk headers to match libc_headers_arch" am: 4b42ad753e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613419
Change-Id: Ibc7ab03738b88e0d87cc13532fb92f1ada795713
2021-04-23 03:07:47 +00:00
Treehugger Robot
4b42ad753e
Merge "Reorder libc.llndk headers to match libc_headers_arch"
2021-04-23 02:51:32 +00:00
Peter Collingbourne
9771fbf1b8
Merge "Avoid prctl(PR_PAC_RESET_KEYS) on devices without PAC support." am: 2f62c26bcb
am: c30eb0ff47
am: f412f0892a
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1684248
Change-Id: I28e541b4d776f1f9e2617d98df2e133d32e54c84
2021-04-22 22:13:29 +00:00
Peter Collingbourne
f412f0892a
Merge "Avoid prctl(PR_PAC_RESET_KEYS) on devices without PAC support." am: 2f62c26bcb
am: c30eb0ff47
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1684248
Change-Id: Ib8f8f568ae02438fadfcaf543a387114f67f37b6
2021-04-22 21:52:49 +00:00
Peter Collingbourne
c30eb0ff47
Merge "Avoid prctl(PR_PAC_RESET_KEYS) on devices without PAC support." am: 2f62c26bcb
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1684248
Change-Id: I58f3880830675df536bf79561dba685d223bade6
2021-04-22 21:32:04 +00:00
Peter Collingbourne
2f62c26bcb
Merge "Avoid prctl(PR_PAC_RESET_KEYS) on devices without PAC support."
2021-04-22 21:02:42 +00:00
Peter Collingbourne
dcbacd676f
Avoid prctl(PR_PAC_RESET_KEYS) on devices without PAC support.
...
Processes loaded from vendor partitions may have their own sandboxes
that would reject the prctl. Because no devices launched with PAC
enabled before S, we can avoid issues on upgrading devices by checking
for PAC support before issuing the prctl.
Bug: 186117046
Change-Id: I9905b963df01c9007d9fb4527273062ea87a5075
2021-04-22 12:17:01 -07:00
Rupert Shuttleworth
40db2eb3bf
Merge "Add missing liblog_headers dependency to libc_defaults." am: 2a79326a80
am: c284c40f07
am: 81e51240aa
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1677126
Change-Id: Iab10e74cadacd217c2b8bceff0f65030a2a297b7
2021-04-22 17:22:08 +00:00
Rupert Shuttleworth
81e51240aa
Merge "Add missing liblog_headers dependency to libc_defaults." am: 2a79326a80
am: c284c40f07
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1677126
Change-Id: I8a593921f7c43c34cbcd2833fec70ea30377ae7b
2021-04-22 17:00:24 +00:00
Rupert Shuttleworth
c284c40f07
Merge "Add missing liblog_headers dependency to libc_defaults." am: 2a79326a80
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1677126
Change-Id: I4c660cbe216258809cde895a0e770b14bdf6237f
2021-04-22 16:25:25 +00:00
Rupert Shuttleworth
2a79326a80
Merge "Add missing liblog_headers dependency to libc_defaults."
2021-04-22 16:07:20 +00:00
Rupert Shuttleworth
ed80dcd775
Add missing liblog_headers dependency to libc_defaults.
...
This unblocks several targets building with Bazel, see https://android-review.googlesource.com/c/platform/build/soong/+/1677125 .
Test: bp2build; bazel build //bionic/...
Change-Id: I4206241fc56cf4df5d5f1e65a367844da85a1360
2021-04-22 01:52:53 -04:00
Colin Cross
96be371187
Reorder libc.llndk headers to match libc_headers_arch
...
Ease later comparisons by making libc.llndk match libc_headers_arch.
Bug: 170784825
Test: m checkbuild
Change-Id: I90162c0bc5f6f0e79fe974208fde47cca7489fa1
2021-04-21 16:29:50 -07:00