Commit graph

26200 commits

Author SHA1 Message Date
android-build-team Robot
245e08f39e Snap for 5450365 from dad73ef232 to pi-platform-release
Change-Id: I289817ccda4f870697efe5a044376a43988fad1f
2019-05-07 21:53:27 +00:00
android-build-team Robot
1863ecbca3 Snap for 5240760 from 68f7efc044 to pi-platform-release
Change-Id: Iac928067526678a9d70c44466d67cdf477332e64
2019-03-08 18:38:43 +00:00
android-build-team Robot
d307fa248c Snap for 5180536 from b32be3f072 to pi-platform-release
Change-Id: I75a97c71db475898cbe477b3048846574a89f97a
2019-02-09 02:35:59 +00:00
android-build-team Robot
68f7efc044 Merge cherrypicks of [6086654] into pi-qpr2-release
Change-Id: I978a6db494532b84be98221b8cf413ca266cab59
2019-01-17 21:08:24 +00:00
Tim Murray
973b64c3e5 Remove some PR_SET_VMAs during pthread_create
PR_SET_VMA takes mmap_sem, which can cause contention and reduce
performance any time many threads are created at the same time,
like app startup.

Test: camera launch performance
Bug: 122471935
Change-Id: If7fa7ad99654c01d503f694976fd92bfd30d2afd
Merged-in: If7fa7ad99654c01d503f694976fd92bfd30d2afd
(cherry picked from commit dad73ef232)
2019-01-17 21:08:20 +00:00
Tim Murray
dad73ef232 Remove some PR_SET_VMAs during pthread_create
PR_SET_VMA takes mmap_sem, which can cause contention and reduce
performance any time many threads are created at the same time,
like app startup.

Test: camera launch performance
Bug: 122471935
Change-Id: If7fa7ad99654c01d503f694976fd92bfd30d2afd
Merged-in: If7fa7ad99654c01d503f694976fd92bfd30d2afd
2019-01-08 13:31:57 -08:00
Bill Rassieur
796198ff34 Merge PQ1A.181205.006 from Pi-QPR1-Release into ToT for Pi-Platform release.\n\nBUG: 120448245
Change-Id: I41ecc8195f43208cb694877a8be2f8d86ed05312
2018-12-04 16:59:10 +00:00
Bill Yi
814964e054 Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: Ic9f65be968a41b3419a655102838a432f8d3b62d
2018-11-28 18:33:28 -08:00
android-build-team Robot
b32be3f072 Snap for 5130385 from c466fe95dc to pi-qpr2-release
Change-Id: Id68db454c90563ae1659a8600f37f885c661a53f
2018-11-14 04:14:05 +00:00
Ken Chen
c466fe95dc Free memory when it is no more used
Memory leak happen when Android data framework updates identical DNS
information to netd.

Bug: 115595601
Test: netd_unit_test, netd_integration_test
Change-Id: Idcc0956729286563603f482258f488a1ccd75e6a
2018-11-08 19:53:34 +08:00
android-build-team Robot
0a382a4844 Snap for 5087486 from 8a07791fbf to pi-qpr2-release
Change-Id: Ib52d553135d65e0679e2a1bd699256dd4be99da7
2018-10-24 03:09:03 +00:00
android-build-team Robot
88aacf8b28 Merge cherrypicks of [5317808, 5317809, 5318498, 5317873, 5318338, 5318195, 5318499, 5317874, 5317875, 5317876, 5318243, 5318244, 5318537, 5318538, 5318539, 5318540, 5318541, 5318542, 5318543, 5318544, 5318545, 5318546, 5315210, 5317756, 5318557, 5318558, 5318559, 5318560, 5318561, 5318339, 5318547, 5318548, 5318549, 5318562, 5318563, 5318564, 5318565, 5318566, 5318172, 5318173, 5318174, 5318550, 5318401, 5318196, 5317889, 5318175, 5318176, 5318577, 5318578, 5318579, 5318580, 5318581, 5318503, 5318390, 5318505, 5318341, 5318551] into pi-qpr1-release
Change-Id: I91a3bf454e0eb31e4d34779e2ff1bf2783c6bf09
2018-10-20 00:19:25 +00:00
Tim Murray
5e8614d22e malloc: add M_PURGE mallopt flag
Add a new mallopt flag that purges any pending decaying pages.

Test: boots and works
bug 117795621

Merged-in: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
Change-Id: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
(cherry picked from commit 8a07791fbf)
2018-10-20 00:16:51 +00:00
Tim Murray
8a07791fbf malloc: add M_PURGE mallopt flag
Add a new mallopt flag that purges any pending decaying pages.

Test: boots and works
bug 117795621

Merged-in: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
Change-Id: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
2018-10-18 23:25:49 +00:00
android-build-team Robot
dbf4b11b11 Snap for 4920102 from fbe26c723a to pi-qpr1-release
Change-Id: Ifd7027234368d31d675303934b1f0f8b6e23d714
2018-07-30 03:00:37 +00:00
TreeHugger Robot
fbe26c723a Merge "remove bionic-compile-time-tests-g++" into pi-dev 2018-07-27 19:36:50 +00:00
android-build-team Robot
252878e889 Snap for 4916303 from 6fffb2332c to pi-qpr1-release
Change-Id: If8971618ca5839bb3044dd35acbd31189ebb613e
2018-07-27 03:03:53 +00:00
Sajid Dalvi
4959932899 remove bionic-compile-time-tests-g++
make checkbuild gives the following error:
bionic/tests/fortify_filecheck_diagnostics_test.cpp:1:0: error: unknown value 'cortex-a55' for -mcpu

The error is because we have a clang to support the new architecture,
but not a corresponding GCC. It is not trivial to filter out an invalid
CPU, and since there is no platform code built with GCC any more, its
better to remove bionic-compile-time-tests-g++

Bug: 74404306
Change-Id: I6aa181c652abeef782fec6380dfadd066140b8b9
2018-07-24 10:29:50 -05:00
Christopher Ferris
6fffb2332c Disable malloc debug intercepts when exiting.
There is a hang when enabling leak_track since the dumping of the
leak data can wind up doing an allocation.

Add new system unit test to make sure this doesn't happen again.

Bug: 111146059

Test: Test program that leaks does not hang forever.
Test: Unit tests pass.
Change-Id: Icf99be58ba5db98ee124a471b957a086045f5870
Merged-In: Icf99be58ba5db98ee124a471b957a086045f5870
(cherry picked from commit 97b4747102)
2018-07-18 14:30:28 -07:00
Tom Cherry
866374163a Merge "Reland "Remove a check for AIDs in the OEM range."" into pi-dev 2018-07-02 16:02:52 +00:00
Tom Cherry
9893d6d0ff Reland "Remove a check for AIDs in the OEM range."
There may be vendor extensions to the system image which would need to
use these IDs.

This reverts commit 41986a013a.

Bug: 110856218
Test: these tests
2018-06-29 10:44:17 -07:00
android-build-team Robot
196632fb3c Snap for 4810559 from 03cb53a17d to pi-release
Change-Id: I8e7369bec8396f574ac8f74f6e471f38c0f95971
2018-05-30 07:21:55 +00:00
Christopher Ferris
03cb53a17d DO NOT MERGE: Move to version v1.1.
The new malloc debug sets the num allocations field to non-zero.
Unfortunately, an old version of malloc debug incorrectly set this field.
In order to differentiate between the broken output, increment the version
number.

Bug: 74361929

Test: Ran unit tests.
Change-Id: Ia88300e324fe9d46aae0c93079ee926e088e675e
2018-05-30 02:06:15 +00:00
android-build-team Robot
926be82e7c Snap for 4807121 from dac8340c43 to pi-release
Change-Id: I4b803b5233ed4a824267473b2cc8449092966890
2018-05-27 07:20:48 +00:00
Ryan Prichard
dac8340c43 Reenable __work_around_b_24465209__ for x86 linker
Bug: b/80258696
Test: build aosp_x86-userdebug ; run emulator
Change-Id: If7de24c3fc91a143c0bd17c6364c56ec04dfb08e
2018-05-24 14:42:30 -07:00
android-build-team Robot
21297d5a51 Snap for 4787078 from 7b405f8b98 to pi-release
Change-Id: I8aea358b26f1ad7c96bb0961e536696dedc84c9f
2018-05-17 07:23:07 +00:00
Tom Cherry
7b405f8b98 Merge "Require vendor users and groups to start with vendor_" into pi-dev 2018-05-16 21:03:53 +00:00
Tom Cherry
f64d31c875 Require vendor users and groups to start with vendor_
Require that users and groups found in /vendor/etc/{passwd,group}
start with vendor_.  This is needed to compliance with Treble as
without this prefix, it is possible for a new system image to create a
user/group name that a vendor has already used, causing a collision.

Bug: 79528966
Test: new unit test
Merged-In: I07500641e165f41526a8101592d83fa174e7a711
Change-Id: I07500641e165f41526a8101592d83fa174e7a711
(cherry picked from commit c2b9fec50b)
2018-05-16 20:18:46 +00:00
Logan Chien
3962060761 Merge changes from topic "single-gsi" into pi-dev
* changes:
  Use ro.vndk.lite to determine the ld.config.txt
  Extract ld.config.txt lookup code
2018-05-16 09:38:57 +00:00
android-build-team Robot
fcf2ebc892 Snap for 4778776 from 9b76571684 to pi-release
Change-Id: I531b181a4752c9ca17d3396058c65c9141ac98a1
2018-05-13 07:25:59 +00:00
Dimitry Ivanov
9b76571684 Merge changes I8eae0c98,I09d32dcb into pi-dev
* changes:
  vdso should be available in all namespaces
  Unhardcode /system/lib
2018-05-12 08:55:08 +00:00
Christopher Ferris
3f54e7dc6f Add support for cortex-a55/cortex-a75.
Bug: 78133793

Test: Builds and ran to verify best libc routines.
Change-Id: I2299b8f0f6379c9003072764978ea917b74aee4f
(cherry picked from commit 3162eb3b81)
2018-05-11 11:22:05 -07:00
dimitry
69c68c46ac vdso should be available in all namespaces
vdso should be available in all namespaces when present. This
bug went undetected because the way libc currently uses vdso (it
does all the lookups itself). This makes it available for the
programs that want to take advantage by dlopening it.

Bug: http://b/73105445
Bug: http://b/79561555
Test: adb shell /data/nativetest/arm/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl.exec_with_ld_config_file
Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl*
Change-Id: I8eae0c9848f256190d1c9ec85d10dc6ce383a8bc
2018-05-11 12:51:39 +02:00
Lorenzo Colitti
5089e87559 fchown DNS lookup sockets to AID_DNS.
Currently DNS lookups are all sent as UID 0. In N we added an
AID_DNS user, but we never used it. A separate UID allows us to
account for and route DNS traffic differently from other UID 0
traffic such as kernel-originated traffic.

(cherry picked from commit 5f02720c88)

Fix: 29420831
Bug: 70673901
Test: DNS lookups continue to work
Test: netd_{unit,integration}_test pass
Change-Id: Ife3ca7df45de51b92437d2cfe627fb4703b672fb
Merged-In: I1c76fac51bdd4804620fe8a8567c9a650b8734d9
2018-05-11 00:56:51 +09:00
Logan Chien
dd18472e56 Use ro.vndk.lite to determine the ld.config.txt
This commit adds an extra check on `ro.vndk.lite`.  If `ro.vndk.lite` is
true, the linker will pick `/system/etc/ld.config.vndk_lite.txt`.

The purpose of this change is to distinguish:

1. Master-GSI + Master-VENDOR (w/o BOARD_VNDK_VERSION for upgrading devices)
2. Master-GSI + O-MR1-VENDOR (w/ BOARD_VNDK_VERSION)

Bug: 78605339
Test: aosp_sailfish Master-SYSTEM + Master-VENDOR boots
Test: aosp_sailfish Master-GSI    + Master-VENDOR boots
Test: aosp_walleye  Master-SYSTEM + Master-VENDOR boots
Test: aosp_walleye  Master-GSI    + Master-VENDOR boots
Test: aosp_walleye  Master-GSI    + O-MR1-VENDOR boots
Change-Id: I34f243f73c173ca2e882d3738ccb81e3fad3a9da
2018-05-10 21:17:49 +08:00
Logan Chien
21e496cf29 Extract ld.config.txt lookup code
This commit extracts ld.config.txt lookup code into
`get_ld_config_file_path()`.

Bug: 78605339
Test: aosp_walleye-userdebug builds and boots
Change-Id: I129f19cd032de02a56bda57231521c02a4b4e4c0
2018-05-10 21:17:46 +08:00
dimitry
1280cf5fd8 Unhardcode /system/lib
Default search path may be different for native bridged enviroments

Bug: http://b/73105445
Test: adb shell /data/nativetest/arm/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl.exec_with_ld_config_file
Change-Id: I09d32dcb8a7a3f161ccc6d58c29252e79ea5fd3e
2018-05-09 14:37:47 +02:00
android-build-team Robot
33c964f5fe Snap for 4767765 from 775fb09621 to pi-release
Change-Id: I5751f0e466bf7ea8abbb09beec054ec5b7e4222d
2018-05-08 07:23:52 +00:00
Evgeny Eltsin
775fb09621 Add a warm up pass to pthread_leak.join test
Bug: 73105445
Bug: 37920774
Test: bionic-unit-tests --gtest_filter=pthread_leak*
Change-Id: I227c999ecc13ee0a2136ff6b00a722f135dd48fe
2018-05-04 20:10:35 +02:00
android-build-team Robot
f76eaf901d Snap for 4759746 from a9001ceb0a to pi-release
Change-Id: Ia99d1bfbbf089c6398d4b8918a785fb18547a8d1
2018-05-03 07:20:27 +00:00
Christopher Ferris
a9001ceb0a Fix nullptr dereference during sort.
Add new unit test that will crash without this fix.

Bug: 78900050

Test: Ran unit tests.
Change-Id: I73e1b89e965a7b399822c3a6f25cbc70d2d355e2
(cherry picked from commit c151bc3078)
2018-05-02 14:42:33 -07:00
android-build-team Robot
f7a8450e78 Snap for 4752322 from 94f7a87510 to pi-release
Change-Id: I70e5251c6edc8da691072e47887deb4306ef4010
2018-04-30 07:22:10 +00:00
dimitry
94f7a87510 Libraries without dt_soname are inaccessible
When linker tries to check if a library without dt_soname is accessible
it crashes. This change fixes this problem to return false instead
(making them inaccessible from other namespaces)

This went unnoticed because vendor libraries on current
devices all have dt_soname set. This was only discovered
on one of the newer devices which has a vendor prebuilt
library without a soname.

Bug: http://b/78661414
Bug: https://issuetracker.google.com/77287902
Test: cts-tradefed run commandAndExit cts -m CtsJniTestCases
Change-Id: Idb192b4ed7a810840ba2a9177bad2360ffbb75e2
2018-04-27 21:19:33 +02:00
android-build-team Robot
a5614676e6 Snap for 4736748 from 592bf711fd to pi-release
Change-Id: I2b8905c0a6fddf86f7baf6597f939c529c130004
2018-04-22 07:26:14 +00:00
Jeremy Compostella
592bf711fd Revert "Add 64-bit slm optimized strlcpy and srlcat."
This reverts commit 2e7145c048.

When src is at the end page, the sse2 strlcpy SSE2 optimized version
can issue a movdqu instruction that can cross the page boundary.  If
the next page is not allocated to that process, it leads to
segmentation fault.  This is a rare but has be caught multiple times
during robustness testing.

We isolated a way to reproduce that issue outside of an Android device
and we have been able to resolve this particular case.  However, we
ran some additional compliance and robustness tests and found several
other similar page crossing issues with this implementation.

In conclusion, this optimization needs to be re-written from scratch
because its design is at cause.  In the meantime, it is better to
remove it.

Bug: http://b/78355649
Change-Id:  If90450de430ba9b7cd9282a422783beabd701f3d
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>

(cherry picked from commit 611ad621c6)
2018-04-20 17:33:12 -07:00
Evgeny Eltsin
4c9504aa6c Add __libc_add_main_thread and mark it weak
This complements __libc_init_main_thread in setting up main thread
under native bridge.

Test: run_tests
Bug: 77877742
Change-Id: I53efab66f285a1b9f0ab36d44386fa1e2621e4ba
2018-04-19 18:39:48 +02:00
android-build-team Robot
b7dcc08e92 Snap for 4728508 from 9302cf2526 to pi-release
Change-Id: I713b6fc698af14a79ec2db841662fb565622b7bd
2018-04-18 07:27:55 +00:00
Andreas Gampe
9302cf2526 Bionic: Always use fortified versions of FD_X macros
When compiling on/for at least Lollipop, always use the fortified
versions of FD_X macros. This works around side-effect issues (which
are explicitly called out in the specification) and generally
increases robustness of code.

(cherry picked from commit 00a6d5fe0a)

Bug: 77986327
Test: mmma bionic
Test: m
Test: bionic_unit_tests
Merged-In: I9096c6872770e46ba5ab64e7375ff83fc0518e07
Change-Id: I9096c6872770e46ba5ab64e7375ff83fc0518e07
2018-04-16 11:06:27 -07:00
android-build-team Robot
038059d235 Snap for 4713750 from 5a0fe3e8bf to pi-release
Change-Id: I39ff678543b66c3d424b29e3a3a392c292812c5b
2018-04-11 07:24:18 +00:00
Ryan Prichard
5a0fe3e8bf spawn.signal_stress: reap spawned children on exit
Test: adb shell \
  /data/nativetest64/bionic-unit-tests-static/bionic-unit-tests-static \
  --gtest_filter=spawn.signal_stress
Bug: b/77824306
Change-Id: I970d1a4d0f8ac9621e676f32f838fc2f638d9750
(cherry picked from commit 344969c849)
2018-04-10 14:42:46 -07:00