Commit graph

31398 commits

Author SHA1 Message Date
Treehugger Robot
bcf07a70f5 Merge "Add METADATA to bionic: BSD+Apache2+MIT+ISC=NOTICE" am: 7204ad8cc8
Change-Id: Iff2becb02f81934e79ae18a1bad185897e43c55f
2020-04-29 23:55:02 +00:00
Treehugger Robot
7204ad8cc8 Merge "Add METADATA to bionic: BSD+Apache2+MIT+ISC=NOTICE" 2020-04-29 23:40:01 +00:00
Bob Badour
76474c95b0 Add METADATA to bionic: BSD+Apache2+MIT+ISC=NOTICE
Bug: 68860345
Bug: 69058154
Bug: 151953481

Test: no code changes
Change-Id: Ie25de7ff63fca903030702f6b811fd37f4cade12
2020-04-29 13:08:49 -07:00
Martin Stjernholm
77b03e7a1a Merge "Revert "Make bionic_platform_headers available only for Bionic t..."" am: d20571efe1
Change-Id: I8498d83b2293921d74ba9abf1f92c3617543fc1f
2020-04-29 12:44:54 +00:00
Martin Stjernholm
d20571efe1 Merge "Revert "Make bionic_platform_headers available only for Bionic t..."" 2020-04-29 12:27:37 +00:00
Martin Stjernholm
ed95d0134d Revert "Make bionic_platform_headers available only for Bionic t..."
Reason for revert: Breaks rvc-d1-dev-plus-aosp: http://ab/6443190
Reverted Changes:
Ide447b89a:bionic_libc_platform_headers is only available whe...
Ia93cd3ec8:bionic_libc_platform_headers is only available whe...
Icdc495588:Make bionic_platform_headers available only for Bi...
Idfd7c87dc:bionic_libc_platform_headers is only available whe...

Bug: 152255951
Bug: 155269399
Change-Id: I214f1165bb0a7e59d3b35a13b3cceb1965be922b
2020-04-29 12:18:36 +00:00
Martin Stjernholm
0d0fc0b774 Merge "Make bionic_platform_headers available only for Bionic targets." am: 38d0a7d9dc
Change-Id: I7d308e1a1545d5b3dbf1b73842738d9d64a5b523
2020-04-29 10:42:19 +00:00
Martin Stjernholm
38d0a7d9dc Merge "Make bionic_platform_headers available only for Bionic targets." 2020-04-29 10:30:23 +00:00
Treehugger Robot
ff84e37ac1 Merge "[NFC] Align pointer to type." am: cbc67b3051
Change-Id: If7f138edf1011d0df25c6cc6e294f35969629a07
2020-04-28 20:24:22 +00:00
Treehugger Robot
cbc67b3051 Merge "[NFC] Align pointer to type." 2020-04-28 20:02:52 +00:00
Mitch Phillips
ba1e921294 [NFC] Align pointer to type.
Typo fix.

Bug: N/A
Test: N/a
Change-Id: Ia19076da9ea19fc7629e625023e969105d2f8786
2020-04-28 11:33:48 -07:00
Treehugger Robot
2231771931 Merge "malloc_hooks README.md: fix example compilation failures" am: 5057c42012
Change-Id: I3264f36b6ea8459b5f968530de12fd5a4b8abb66
2020-04-27 23:43:24 +00:00
Treehugger Robot
5057c42012 Merge "malloc_hooks README.md: fix example compilation failures" 2020-04-27 23:29:41 +00:00
Martin Stjernholm
249f726583 Make bionic_platform_headers available only for Bionic targets.
The triggering reason for this change is that the SDK snapshot
generation cannot readily handle header libraries that are required for
targets that the SDK itself isn't available for. However, these include
files shouldn't be used without Bionic anyway.

Test: m checkbuild (on aosp_taimen)
Test: m (on aosp_taimen_hwasan)
Test: atest CtsBionicTestCases
Test: lunch fvp-userdebug && mmm bionic
Bug: 152255951
Change-Id: Icdc49558893c5355860f78d23275c49ba0119900
2020-04-27 19:07:01 +01:00
Jooyung Han
38a9ad96a9 Merge "libc: Add stubs.versions=R" am: 1d9ccdfb1a
Change-Id: I773712dd2bf6ee938dabde5c5a1327d1ba034a50
2020-04-25 04:53:35 +00:00
Jooyung Han
1d9ccdfb1a Merge "libc: Add stubs.versions=R" 2020-04-25 04:41:43 +00:00
Steven Moreland
6cdeed3124 malloc_hooks README.md: fix example compilation failures
Bug: N/A
Test: N/A
Change-Id: I017f47990417446f1bff5fc7a5bf7e53e8e1f85e
2020-04-25 00:46:45 +00:00
Elliott Hughes
a86558a0df Merge "Block all signals in ScopedSignalBlocker." am: 317a2e588b
Change-Id: I51871297e32b0544f3799aed15951a5db8cfd33c
2020-04-24 16:00:40 +00:00
Elliott Hughes
317a2e588b Merge "Block all signals in ScopedSignalBlocker." 2020-04-24 15:50:15 +00:00
Elliott Hughes
3093e71811 Block all signals in ScopedSignalBlocker.
When a thread calls pthread_exit(3), ScopedSignalBlocker blocks all
user-visible signals, but leaves internal-use signals 33/34/36/36/37.
Signal 33 is used to unwind a thread for a backtrace, which can cause us
to access the stack after it's been unmapped. (Avoiding this was the
reason why we have the ScopedSignalBlocker in pthread_exit(3)!)

Fix this (and other potential issues) by changing ScopedSignalBlocker to
call __rt_sigprocmask(2) directly, so we don't mask out the internal-use
signals.

Bug: https://issuetracker.google.com/153624226
Test: not trivially reproducible
Change-Id: I9b125ed41ddee4c5d33b45920f1d142e52db47cb
2020-04-23 15:57:58 -07:00
Treehugger Robot
557a2616dc Merge "Add AOSP preupload hook." am: c33ad20258
Change-Id: I85526a8732ad4deab11053d4268858480905ca6f
2020-04-23 20:29:25 +00:00
Treehugger Robot
c33ad20258 Merge "Add AOSP preupload hook." 2020-04-23 20:15:00 +00:00
Elliott Hughes
ed2889fc4d Add AOSP preupload hook.
Test: repo upload in internal master
Change-Id: I8c3604dfa2701d2d82bc60d62562a65a62d7e05e
2020-04-23 11:05:06 -07:00
Tom Cherry
b73907ccf5 Merge "Include log/log_read.h for reading logs" am: 8e384fff82
Change-Id: I136fdd92242e2fd9c382560d6a4e0d2b6407f757
2020-04-23 15:07:37 +00:00
Tom Cherry
8e384fff82 Merge "Include log/log_read.h for reading logs" 2020-04-23 14:58:44 +00:00
Tom Cherry
ad9e99dad7 Include log/log_read.h for reading logs
log/log.h is concerned with writing logs.

Bug: 78370064
Test: build
Change-Id: I03d35f47acaa6eb0c8865836767d855be0203e92
2020-04-22 19:00:42 -07:00
Ryan Prichard
8baf87c79a Merge changes I59024a0a,Iafd12e5a am: 19377a55c5
Change-Id: I11e0c744eade40f2c270e9241863e94ec22f84a0
2020-04-21 23:18:39 +00:00
Ryan Prichard
19377a55c5 Merge changes I59024a0a,Iafd12e5a
* changes:
  __loader_cfi_fail: acquire g_dl_mutex
  android_get_exported_namespace: acquire g_dl_mutex
2020-04-21 23:01:13 +00:00
Ryan Prichard
172611f5ce __loader_cfi_fail: acquire g_dl_mutex
CfiFail calls find_containing_library, which searches the linker's
internal soinfo list, which could be modified by another thread.

Bug: http://b/150372650
Test: bionic-unit-tests
Change-Id: I59024a0a47913caa75702f15ec058b0a360727b5
2020-04-20 18:14:51 -07:00
Ryan Prichard
c2a93792fc android_get_exported_namespace: acquire g_dl_mutex
android_get_exported_namespace searches g_exported_namespaces, which
isn't modified after process initialization, but it does the search
using a new std::string object, and the linker's malloc/free functions
aren't thread-safe. (They're protected by the same lock (g_dl_mutex) as
the rest of the linker's state.)

Bug: http://b/150372650
Test: bionic-unit-tests
Change-Id: Iafd12e5ab36ae61f0642aad59939f528d31bda16
2020-04-20 17:59:43 -07:00
Ryan Prichard
c9f574f689 Merge "x86: Switch get_pc_thunk to comdat" am: f3110d6840
Change-Id: I493a05d1304ab7d8a1eb53147590aad01b159669
2020-04-20 23:17:25 +00:00
Ryan Prichard
f3110d6840 Merge "x86: Switch get_pc_thunk to comdat" 2020-04-20 23:02:12 +00:00
Ryan Prichard
a992a06701 x86: Switch get_pc_thunk to comdat
Switch the __x86.get_pc_thunk.{bx,cx} functions from .gnu.linkonce to
comdat section groups. lld doesn't implement .gnu.linkonce and will
instead discard the input sections. Currently, it might produce a
faulty binary that has no get_pc_thunk function in it, which would
crash.

Normally, these functions are generated by GCC and are present in many
object files compiled with PIC. Clang doesn't use them, and instead
initializes the PIC base register with a "call 1f; 1: pop %ebx" pair.

Bug: http://b/154376560
Bug: https://bugs.llvm.org/show_bug.cgi?id=45594
Test: bionic-unit-tests
Change-Id: I3e4857aecdc281b32232270bff4880433e5b6afa
2020-04-20 14:28:10 -07:00
Mitch Phillips
13af63673d Merge "Set the top bit for tagged pointers." am: c8480193db
Change-Id: I8ab0e0fd5bedc33d76bd54acb44bd03c93727f36
2020-04-20 21:18:39 +00:00
Mitch Phillips
c8480193db Merge "Set the top bit for tagged pointers." 2020-04-20 20:57:41 +00:00
Elliott Hughes
a77458c6f4 Merge "tmpfile(3): use O_TMPFILE where available." am: 0361a4f867
Change-Id: I0ca34240eccd9f294d3eeffd1cc889232ad9083b
2020-04-18 00:01:45 +00:00
Elliott Hughes
0361a4f867 Merge "tmpfile(3): use O_TMPFILE where available." 2020-04-17 23:29:24 +00:00
Mitch Phillips
b125ca48de Set the top bit for tagged pointers.
Some applications may incorrectly assume that a "negative" pointer
indicates error. By setting the top bit in TBI mode, we catch these
cases as well. Although they don't directly indicate incompatibility
with MTE (as MTE uses the 2nd-highest nibble) - this ensures we catch
HWASan errors as well as reserve the bits for future MTE expansion.

Bug: 154272452
Test: Boot flame, device boots successfully.
Change-Id: I94a6821a82ce7ead59e6ca2dd113a5a50ee9e56b
2020-04-17 22:04:27 +00:00
Peter Collingbourne
58b990e7a5 Merge "Add PTRACE_PEEKTAG to mte_kernel.h." am: 23ec1421b5
Change-Id: Icbc413c0f528cf225897692b249ba136bccd2d0b
2020-04-17 18:33:05 +00:00
Peter Collingbourne
23ec1421b5 Merge "Add PTRACE_PEEKTAG to mte_kernel.h." 2020-04-17 18:16:05 +00:00
Treehugger Robot
42f1ceb60a Merge "arc4random.h: remove some cruft." am: a06df5faef
Change-Id: Iaa6f7d7be22d3e55d15e81c7ea0b92b6257b7b23
2020-04-17 15:56:31 +00:00
Treehugger Robot
a06df5faef Merge "arc4random.h: remove some cruft." 2020-04-17 15:32:47 +00:00
Elliott Hughes
bb575d93c4 arc4random.h: remove some cruft.
This hasn't been used since the code was rewritten years ago.

Test: builds
Change-Id: I2c4bccb3fffb15115083afbb178519bd133c64de
2020-04-16 23:14:38 +00:00
Elliott Hughes
a4c2f33fc7 tmpfile(3): use O_TMPFILE where available.
This also removes the ScopedSignalBlocker, which doesn't seem to have
made any sense since threads were invented.

Test: treehugger
Change-Id: I9a323ab4a0b43f14fd5d1f0df1f80184aef63770
2020-04-16 16:12:03 -07:00
Elliott Hughes
b202efb087 Merge "Fix ifunc_test for hwasan builds." am: 38558bad85
Change-Id: I72ac610eb8c46ad7194bf9da861c3144fa8c73fb
2020-04-14 23:13:24 +00:00
Elliott Hughes
38558bad85 Merge "Fix ifunc_test for hwasan builds." 2020-04-14 22:57:21 +00:00
Elliott Hughes
19b2ce8f38 Fix ifunc_test for hwasan builds.
This actually breaks *all* the tests, because the bionic-unit-tests
binary crashes while running this ifunc before hwasan is set up.

A longer term fix would be to have the compiler insert a call to
__hwasan_init at the start of any ifunc resolvers.

Bug: 135772972
Test: ran tests on a hwasan build
Change-Id: I424b3035e1f76aa4b98c11346825b9ed140584ba
2020-04-13 14:16:17 -07:00
Treehugger Robot
1e3a20c094 Merge "Set apex_available property" am: 1ddfe48a9c
Change-Id: Id5b2b5d99ed792d1e36261c09370dc5cfce2b37d
2020-04-11 05:16:50 +00:00
Treehugger Robot
1ddfe48a9c Merge "Set apex_available property" 2020-04-11 04:59:53 +00:00
Tom Cherry
bce3ddda58 Merge changes I6c9c2bf5,I23991692 am: 03581d7aa9
Change-Id: Ia040ffb6c1d347d67a923804ed2d2857ac5c6569
2020-04-10 23:28:28 +00:00