Commit graph

25020 commits

Author SHA1 Message Date
Treehugger Robot
0a25aa60a2 Merge "Always wrap waitpid in TEMP_FAILURE_RETRY." 2017-11-29 00:23:11 +00:00
Elliott Hughes
a34817457f Improve the _FILE_OFFSET_BITS docs and link to them.
We're still seeing lots of confusion. People do seem to look as far as
the headers, but stop there. So let's try a bit harder to point them in
the right direction.

Also explicitly state that removing _FILE_OFFSET_BITS=64 is the
behavior-preserving fix for compilation problems when upgrading to NDK
r15 or later.

Bug: N/A
Test: N/A
Change-Id: I2d5c65b2fb5cccb9977901e51fea1ad2ccc0fd95
2017-11-28 15:47:01 -08:00
Elliott Hughes
46248ecd53 Merge "Revert "Remove mips/mips64 headers from the NDK sysroot.""
am: 72dcf2340f

Change-Id: Ic23c7f98ebf6c0147cb7f81c53982526cc4d4aa1
2017-11-28 23:38:52 +00:00
Elliott Hughes
72dcf2340f Merge "Revert "Remove mips/mips64 headers from the NDK sysroot."" 2017-11-28 23:26:03 +00:00
Mark Salyzyn
71b81a2bb2 bionic: test: report kernel sha for clock_getcpuclockid failure
For aarch64 only.

Once we activate support for vdso call for clock_getres, we also will
have to deal with kernel bugs in the implementation. If the kernel is
prior to the vdso unification of arm, aarch64 and aarch32, estimated
to land in 4.15, then the assembler implementation for aarch64 will
need two upstream kernel fixes e1b6b6ce and c80ed088. We report the
required url for the upstream kernel fixes upon test failure.

Test: bionic-unit-tests --gtest_filter=time.*
Bug: 20045882
Bug: 63737556
Bug: 69626243
Change-Id: Id93056f432491679e349545cbd1d682074634c58
2017-11-28 14:09:09 -08:00
Elliott Hughes
cabc77f917 Always wrap waitpid in TEMP_FAILURE_RETRY.
Strictly not needed in the WNOHANG case, but it's probably best to have
every waitpid wrapped for future copy & pasters.

Bug: https://issuetracker.google.com/69525592
Test: ran tests
Change-Id: I013b0a52d2753e3d32638e9b84c79af7327fb405
2017-11-28 12:55:19 -08:00
dimitry
58554ccb8a Fix bug with double unload on unsuccessful dlopen
In the case of unsuccessful dlopen the failure guard is triggered
for two namespaces which leads to double unload.

Also update soinfo_free to abort in case when linker tries to free same
soinfo for the second time - this makes linker behavior less undefined.

Test: bionic-unit-tests
Bug: http://b/69787209
Change-Id: I886787ee021b050667f967bce7aa2708390886ea
2017-11-28 21:47:01 +01:00
Elliott Hughes
a034ba2d34 Merge "Fix vdso system call fallback failures."
am: 7d5777ef15

Change-Id: Id21c390ae782cac39e98a4a3e01cfae73b214578
2017-11-28 19:14:15 +00:00
Mark Salyzyn
4ef1ab7d4d Merge "bionic: test: add clock_getres"
am: 26b80da44a

Change-Id: I592828ac6f6ed0e38a487ea44f328f9c5498f052
2017-11-28 19:14:03 +00:00
Treehugger Robot
7d5777ef15 Merge "Fix vdso system call fallback failures." 2017-11-28 19:05:18 +00:00
Treehugger Robot
26b80da44a Merge "bionic: test: add clock_getres" 2017-11-28 19:05:18 +00:00
Elliott Hughes
eaca0154b5 Merge "Document bionic's targetSdkVersion-specific behavior."
am: be1bbb1e44

Change-Id: Ib61a9dc055441c546e42811d71350e81a1ed5be9
2017-11-28 17:58:20 +00:00
Elliott Hughes
be1bbb1e44 Merge "Document bionic's targetSdkVersion-specific behavior." 2017-11-28 17:51:01 +00:00
Elliott Hughes
9591df5294 Fix vdso system call fallback failures.
When a vdso call falls back to making a regular system call, the inline
code for the system call doesn't know about errno and just leaves the
usual kernel result to be translated. Add the missing translation.

Also fix the defaults for non-vdso systems so we actually take the
fallback path (and so avoid unintentionally doing the errno translation
twice in those cases).

Bug: http://b/69626243
Test: ran new tests from http://b/63737556
Change-Id: If379632ea2e059e3d3bc3ff41bf3608dc05fb0a3
2017-11-28 09:09:01 -08:00
Jiyong Park
9a051ec31a Merge "Fix: dl#disable_ld_config_file"
am: f5a6fd2001

Change-Id: I6edd4db7064b96ff0bbcbca562e841e94404ba50
2017-11-28 09:42:30 +00:00
Treehugger Robot
f5a6fd2001 Merge "Fix: dl#disable_ld_config_file" 2017-11-28 09:36:34 +00:00
Jiyong Park
9828386bd4 Fix: dl#disable_ld_config_file
linker now quits with exit(1) instead of abort().
This is a leftover of
https://android-review.googlesource.com/c/platform/bionic/+/497893

Bug: 69635156
Test: run dl#disable_ld_config_file in a user build
Change-Id: If65c50805ffe89a601f4a9bfc1c6f0bb8dc16b77
2017-11-28 13:37:03 +09:00
Mark Salyzyn
6a5a99faf3 bionic: test: add clock_getres
Add clock_getres test combinations. Add clock_gettime_unknown test
to ensure the errno is propagated correctly for that call as well.

Test: bionic-unit-tests --gtest_filter=time.*
Bug: 63737556
Bug: 69626243
Change-Id: I0256b7f03ac7e57bc5b36069b13fe576c29b9c75
2017-11-27 20:36:41 -08:00
Elliott Hughes
6347acec09 Document bionic's targetSdkVersion-specific behavior.
Bug: N/A
Test: N/A
Change-Id: I367edc592203e585a1d84a10ff3437ea3f2edd91
2017-11-27 18:12:04 -08:00
Lazar Trsic
790d2f7161 Revert "Remove mips/mips64 headers from the NDK sysroot."
This reverts commit 050f046d3d.

Change-Id: I2549dfccced02b61383cd9e534bfd34cf1d6dba1
2017-11-27 16:48:14 +01:00
Isaac Chen
c7b573c868 Merge "Optimize libc for generic armv7/armv8 neon cores"
am: b7d6df2b61

Change-Id: Ib9620dbe949c68cc3f976425fa88548f8f62b1c2
2017-11-23 09:11:56 +00:00
Isaac Chen
b7d6df2b61 Merge "Optimize libc for generic armv7/armv8 neon cores" 2017-11-23 09:08:24 +00:00
Yabin Cui
0c0fd96f1d Merge "Improve pty unit test to catch the bug more easily."
am: 8fb8c61e48

Change-Id: If75ed98331b3205ce053f07ec242c566a272ed18
2017-11-22 18:03:28 +00:00
Yabin Cui
8fb8c61e48 Merge "Improve pty unit test to catch the bug more easily." 2017-11-22 17:58:56 +00:00
Yabin Cui
57a4006c10 Improve pty unit test to catch the bug more easily.
Bug: http://b/69260651
Test: run bionic-unit-tests.

Change-Id: Ifb89cc2952508b6e5a093c57053fb93cb61cd28c
2017-11-21 18:04:15 -08:00
Yabin Cui
6c7651f380 Merge "Fix support for typed tests and parameterized tests."
am: f40402a39f

Change-Id: I22d108267a6de4fb8d92cb9e53557de7691f3f0f
2017-11-17 02:54:34 +00:00
Treehugger Robot
f40402a39f Merge "Fix support for typed tests and parameterized tests." 2017-11-17 02:40:35 +00:00
Chih-Hung Hsieh
c24a5b12ed Merge "Use -Werror in bionic/tests"
am: e070051254

Change-Id: I0185c176163b05792d17d613d02551939b67c955
2017-11-17 00:26:21 +00:00
Yabin Cui
5e235c85bb Fix support for typed tests and parameterized tests.
Bug: http://b/69425095
Test: run bionic_unit_tests --bionic-selftest
Change-Id: Ifa23288f2ad84978b7748da0ea93d650fae926a8
2017-11-16 16:20:28 -08:00
Treehugger Robot
e070051254 Merge "Use -Werror in bionic/tests" 2017-11-17 00:19:33 +00:00
Chih-Hung Hsieh
38997e4aed Use -Werror in bionic/tests
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I64a0458c787054a0694c736be20dc53772ff3781
2017-11-16 13:51:17 -08:00
Elliott Hughes
ff279d0f7a Merge "Change ARG_MAX/_SC_ARG_MAX back to a constant."
am: 8c75675ec6

Change-Id: I87d269067bd40e600dbb4e804ed952fdce861473
2017-11-16 21:49:11 +00:00
Elliott Hughes
8c75675ec6 Merge "Change ARG_MAX/_SC_ARG_MAX back to a constant." 2017-11-16 21:46:49 +00:00
Christopher Ferris
7090e0c0a5 Merge "Update to kernel headers v4.14."
am: e0dfad4504

Change-Id: I039c92a8eef289a11660ef09730ef857070c19bb
2017-11-16 19:31:12 +00:00
Christopher Ferris
e0dfad4504 Merge "Update to kernel headers v4.14." 2017-11-16 19:28:13 +00:00
Elliott Hughes
e5ff4dee46 Merge "Simplify the posix_spawn sigdefault logic."
am: c3f1b6a23d

Change-Id: I2d2e05a7d0177e28f583097c33c07029ee93291e
2017-11-16 00:13:47 +00:00
Elliott Hughes
c3f1b6a23d Merge "Simplify the posix_spawn sigdefault logic." 2017-11-16 00:08:31 +00:00
Elliott Hughes
baed51ee3a Change ARG_MAX/_SC_ARG_MAX back to a constant.
As per the lkml thread https://lkml.org/lkml/2017/11/1/946.

Bug: http://b/65818597
Test: ran tests
Change-Id: I7a0610e6903e6761f2b31416e2f5017bd7a60659
2017-11-15 15:14:35 -08:00
Elliott Hughes
1a24e07da9 Merge "Reduce unnecessary quoting for --gtest_filter."
am: de5f9a1c54

Change-Id: I8e35d3796e880a60e73f3dfe18ec412eacfded3c
2017-11-15 22:49:07 +00:00
Elliott Hughes
de5f9a1c54 Merge "Reduce unnecessary quoting for --gtest_filter." 2017-11-15 22:38:30 +00:00
Tom Cherry
fe21bf5e18 Merge "Only use uids and gids for which we've allocated AIDs"
am: 966f659d7f

Change-Id: I502117ac5afcd828ba74a23469718ae68867c99d
2017-11-15 21:47:44 +00:00
Tom Cherry
966f659d7f Merge "Only use uids and gids for which we've allocated AIDs" 2017-11-15 21:19:56 +00:00
Christopher Ferris
1308ad3ab3 Update to kernel headers v4.14.
Remove the hiding of the kernel structure binder_fd_array_object. This
structure now matches the structure used in the binder code.

Load the libclang_android.so shared library directly for parsing.
This file changed name in a recent update to the prebuilts.

Test: Compiles arm/arm64/x86/x86_64.
Test: Boots on hikey and boots on a sailfish.
Test: Ran bionic unit tests on hikey and sailfish.
Change-Id: I141a4b93ac3511cd58f4d12bb3c0d4efaa4c2742
2017-11-15 12:23:56 -08:00
Tom Cherry
4362f897f7 Only use uids and gids for which we've allocated AIDs
Currently, getpwnam, getpwent, etc return successfully for any uid
from AID_APP_START (10000) to AID_USER_OFFSET (100000) for each user.
This is not correct however, as only specific ranges above
AID_APP_START are reserved as valid ranges.  This change corrects this.

This is particularly important as the newly added AID_OVERFLOWUID is
65534, which is above AID_APP_START but not in any reserved range,
collided with the faulty returned values.

Bug: 69119022
Bug: 69128408
Test: pwd/grp bionic unit tests
Change-Id: I3dae97a90597915fa30a88fe27cda88b107e9c35
2017-11-15 10:31:49 -08:00
Elliott Hughes
10ba4bd6d1 Reduce unnecessary quoting for --gtest_filter.
Use posix_spawn rather than popen, to remove a surprising extra shell.

Bug: http://b/68949647
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=stdio.swprintf_1$ju_UINTMAX_MAX
Change-Id: Id90afab04ee799932de9f5ca7e580e61ecfde7a4
2017-11-15 09:30:16 -08:00
Elliott Hughes
2b8ab4b5da Simplify the posix_spawn sigdefault logic.
I don't think there's any observable difference, but this is certainly
simpler.

Bug: http://b/68707996
Test: ran tests
Change-Id: Id9e1a7d40533c90d073ebf391a72bbdfe79627de
2017-11-14 22:31:43 -08:00
Xin Li
74d57a37cb Merge commit 'e3d21c84af0b8e3244e4c67a873d2a16bfb85034' into HEAD
Change-Id: I09b21c2e27a0dfbef10633b20d8ee7adbedc1597
2017-11-14 13:14:23 -08:00
Tom Cherry
fe0a16fa38 Merge changes I39663cc3,Ie75ec6fe
am: 315dd896de

Change-Id: Ieec9084c2f9b2daee095180c8ff6a0c817dea98c
2017-11-14 21:04:36 +00:00
Tom Cherry
315dd896de Merge changes I39663cc3,Ie75ec6fe
* changes:
  Remove some globals from system_properties
  Split system_properties.cpp into its component pieces
2017-11-14 20:55:13 +00:00
Tom Cherry
f76bbf5384 Remove some globals from system_properties
pa_size should be static to prop_area, so make it so.

__system_property_area__ was reused for various purposes, but
realistically is a deprecated symbol and this finally separates us
from it.

Bug: 36001741
Test: boot bullhead, system property unit tests
Change-Id: I39663cc3b613093fa4c728b21d8ba58754f8e105
2017-11-14 08:55:27 -08:00