OSDN Git Service

android-x86/bionic.git
8 years agoFix the stack-protector test for x86/x86-64.
Elliott Hughes [Sat, 2 Apr 2016 02:23:55 +0000 (02:23 +0000)]
Fix the stack-protector test for x86/x86-64.
am: 6f90c1a

* commit '6f90c1ac59eb4e7811b7b0e408615049c935c0a9':
  Fix the stack-protector test for x86/x86-64.

Change-Id: If14fb81849b3bc05a72a3f3abd0ffb4b1bcefc1c

8 years agoFix the stack-protector test for x86/x86-64.
Elliott Hughes [Fri, 1 Apr 2016 21:51:10 +0000 (14:51 -0700)]
Fix the stack-protector test for x86/x86-64.

Built for fugu this was working fine, but built for generic x86/x86-64
the compiler was (a) optimizing out all the stack writes and (b) inserting
enough padding on x86-64 for the canary to be safely out of the way.

While here, let's tighten up this test so we test that it's sufficient to
only overwrite the buffer by one byte...

Bug: http://b/27815668
Change-Id: I80a646de4b30fd5c78df20fdaa7e3eb163585caf

8 years agoresolve merge conflicts of 38b88a4 to nyc-dev-plus-aosp
Elliott Hughes [Fri, 1 Apr 2016 21:05:42 +0000 (14:05 -0700)]
resolve merge conflicts of 38b88a4 to nyc-dev-plus-aosp

Change-Id: I5257d0e03723d7a89f7efbe7134ae35a917bfece

8 years agoMerge "Ensure only mips is using GCC to build bionic." am: 1e89584
Elliott Hughes [Fri, 1 Apr 2016 20:50:11 +0000 (20:50 +0000)]
Merge "Ensure only mips is using GCC to build bionic." am: 1e89584
am: 5411c4f

* commit '5411c4f3c1dbe481bdc1ea39edf42c4471d04f7b':
  Ensure only mips is using GCC to build bionic.

Change-Id: I8b53f619ea7451d29384399efa477b554c08eb86

8 years agoMerge "Ensure only mips is using GCC to build bionic."
Elliott Hughes [Fri, 1 Apr 2016 20:45:22 +0000 (20:45 +0000)]
Merge "Ensure only mips is using GCC to build bionic."
am: 1e89584

* commit '1e8958448a94753dec9c070ef011628c0b230d98':
  Ensure only mips is using GCC to build bionic.

Change-Id: If1873f46cbbe3fbc39488dbdbb94fa3f13357af0

8 years agoMerge "Ensure only mips is using GCC to build bionic."
Elliott Hughes [Fri, 1 Apr 2016 20:30:11 +0000 (20:30 +0000)]
Merge "Ensure only mips is using GCC to build bionic."

8 years agoMerge "Check current pid at libc initialization for 32-bit build." am: af39abd
Yabin Cui [Fri, 1 Apr 2016 18:14:03 +0000 (18:14 +0000)]
Merge "Check current pid at libc initialization for 32-bit build." am: af39abd
am: 384ccaa

* commit '384ccaad47284b0736e8a36de3cda3eea45fdca3':
  Check current pid at libc initialization for 32-bit build.

Change-Id: Ic2bfa6384444bc855be4c08404f95152839b7eee

8 years agoMerge "Check current pid at libc initialization for 32-bit build."
Yabin Cui [Fri, 1 Apr 2016 18:09:35 +0000 (18:09 +0000)]
Merge "Check current pid at libc initialization for 32-bit build."
am: af39abd

* commit 'af39abdef53062c9bbc246371ac49ef5412eeb80':
  Check current pid at libc initialization for 32-bit build.

Change-Id: Ib9b032752a88ad58f8f82dc91185e4cf1167e37c

8 years agoMerge "Check current pid at libc initialization for 32-bit build."
Yabin Cui [Fri, 1 Apr 2016 17:56:33 +0000 (17:56 +0000)]
Merge "Check current pid at libc initialization for 32-bit build."

8 years agoEnsure only mips is using GCC to build bionic.
Elliott Hughes [Fri, 1 Apr 2016 17:54:27 +0000 (10:54 -0700)]
Ensure only mips is using GCC to build bionic.

MIPS still have ld128 and 16-bit atomics issues with clang, so we can't
just remove this yet.

Bug: http://b/25291096
Change-Id: I2645ebf3af04e1a4008d70da780c04240e3d7a85

8 years agoMerge "Tell GCC that sometimes we have to build deprecated functions." am: 538bdf9
Elliott Hughes [Fri, 1 Apr 2016 17:37:38 +0000 (17:37 +0000)]
Merge "Tell GCC that sometimes we have to build deprecated functions." am: 538bdf9
am: 0069b9b

* commit '0069b9b82b6afde8fb44a22ed099ac3ef5e60c88':
  Tell GCC that sometimes we have to build deprecated functions.

Change-Id: I9f8811f43a64883a4df3120abf2476e109c448d2

8 years agoMerge "Tell GCC that sometimes we have to build deprecated functions."
Elliott Hughes [Fri, 1 Apr 2016 17:32:47 +0000 (17:32 +0000)]
Merge "Tell GCC that sometimes we have to build deprecated functions."
am: 538bdf9

* commit '538bdf96231d05ff36f67cad4f3daba1087523e1':
  Tell GCC that sometimes we have to build deprecated functions.

Change-Id: Ic810be7db6cb92376b3100246eff9180c2cafc74

8 years agoMerge "Tell GCC that sometimes we have to build deprecated functions."
Elliott Hughes [Fri, 1 Apr 2016 17:26:53 +0000 (17:26 +0000)]
Merge "Tell GCC that sometimes we have to build deprecated functions."

8 years agoTell GCC that sometimes we have to build deprecated functions.
Elliott Hughes [Fri, 1 Apr 2016 17:25:19 +0000 (10:25 -0700)]
Tell GCC that sometimes we have to build deprecated functions.

We're the C library. Nothing could be more deprecated.

bionic/libc/bionic/pthread_cond.cpp:243:10: error: 'int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const timespec*)' is deprecated (declared at bionic/libc/bionic/pthread_cond.cpp:227): use pthread_cond_timedwait instead [-Werror=deprecated-declarations]
   return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
          ^
bionic/libc/bionic/pthread_cond.cpp:243:71: error: 'int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const timespec*)' is deprecated (declared at bionic/libc/bionic/pthread_cond.cpp:227): use pthread_cond_timedwait instead [-Werror=deprecated-declarations]
   return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
                                                                       ^

Change-Id: Idb3d445e053c44180773f59774df19b324f6817f

8 years agoMerge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE." am: e9daecf
Elliott Hughes [Fri, 1 Apr 2016 17:14:57 +0000 (17:14 +0000)]
Merge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE." am: e9daecf
am: afc5767

* commit 'afc5767acad3c9f2b2a959cd663597127820dbf6':
  Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE.

Change-Id: I4e4e82884794f629bddc03676d450a68a6ff31eb

8 years agoUse consistent quoting in linker messages.
Elliott Hughes [Fri, 1 Apr 2016 17:10:54 +0000 (10:10 -0700)]
Use consistent quoting in linker messages.

Using single quotes can be more convenient -- because there's no need to
escape -- but the vast majority of existing quoting was done with double
quotes, so move in that direction.

Bug: http://b/27524191
Change-Id: I8f58593120e4c8aeaec45e16fc0178e9c162454d

8 years agoMerge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE."
Elliott Hughes [Fri, 1 Apr 2016 16:57:17 +0000 (16:57 +0000)]
Merge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE."
am: e9daecf

* commit 'e9daecf74b276c780d65ded0c340193691dc69e5':
  Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE.

Change-Id: I71bbe3770a0488c1590813f61dd9aea31ccfa400

8 years agoMerge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE."
Elliott Hughes [Fri, 1 Apr 2016 16:43:42 +0000 (16:43 +0000)]
Merge "Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE."

8 years agoMerge "Differentiate the MNTTYPE_* and MNTOPT_* constants." am: 4e764a0
Elliott Hughes [Fri, 1 Apr 2016 02:23:19 +0000 (02:23 +0000)]
Merge "Differentiate the MNTTYPE_* and MNTOPT_* constants." am: 4e764a0
am: 4b0c68f

* commit '4b0c68f8cc773fe0e215cf72d24de7b6e2f4c132':
  Differentiate the MNTTYPE_* and MNTOPT_* constants.

Change-Id: I028d429d48f2cc60e57eaac92a716996e130b724

8 years agoMerge "Differentiate the MNTTYPE_* and MNTOPT_* constants."
Elliott Hughes [Fri, 1 Apr 2016 02:19:11 +0000 (02:19 +0000)]
Merge "Differentiate the MNTTYPE_* and MNTOPT_* constants."
am: 4e764a0

* commit '4e764a0f98be37b32bd6b92967e54124e6aeb150':
  Differentiate the MNTTYPE_* and MNTOPT_* constants.

Change-Id: I1b807c6afad1d6fd282fbbbe96a3be07d09839c6

8 years agoMerge "Differentiate the MNTTYPE_* and MNTOPT_* constants."
Elliott Hughes [Fri, 1 Apr 2016 02:11:49 +0000 (02:11 +0000)]
Merge "Differentiate the MNTTYPE_* and MNTOPT_* constants."

8 years agoMerge "Add a few missing types and constants to headers." am: a30e19d
Elliott Hughes [Fri, 1 Apr 2016 01:26:04 +0000 (01:26 +0000)]
Merge "Add a few missing types and constants to headers." am: a30e19d
am: c4991fa

* commit 'c4991fabb26b16c5759f803de6ed124b2f4f9310':
  Add a few missing types and constants to headers.

Change-Id: I4b1e5bfcb37beb58ceb531abda2064b3039aa168

8 years agoMerge "Add a few missing types and constants to headers."
Elliott Hughes [Fri, 1 Apr 2016 01:21:36 +0000 (01:21 +0000)]
Merge "Add a few missing types and constants to headers."
am: a30e19d

* commit 'a30e19da564deda466e3fe79784f51d2fc6adb51':
  Add a few missing types and constants to headers.

Change-Id: Ib6d78642e8a28482eac2acb656fb8e996a57307c

8 years agoDifferentiate the MNTTYPE_* and MNTOPT_* constants.
Elliott Hughes [Fri, 1 Apr 2016 01:20:01 +0000 (18:20 -0700)]
Differentiate the MNTTYPE_* and MNTOPT_* constants.

Bug: http://b/27952303
Change-Id: I926593c16143f76b21a65af7f6e1979d0fb44cac

8 years agoMerge "Add a few missing types and constants to headers."
Elliott Hughes [Fri, 1 Apr 2016 01:14:23 +0000 (01:14 +0000)]
Merge "Add a few missing types and constants to headers."

8 years agoAdd a few missing types and constants to headers.
Elliott Hughes [Fri, 1 Apr 2016 00:05:30 +0000 (17:05 -0700)]
Add a few missing types and constants to headers.

This (and other stuff still to come) prevented xfstests from building out
of the box.

Bug: http://b/27952303
Change-Id: Id38fd37386d43fc351c56dca18785a465e3e6145

8 years agoCheck current pid at libc initialization for 32-bit build.
Yabin Cui [Tue, 29 Mar 2016 19:25:12 +0000 (12:25 -0700)]
Check current pid at libc initialization for 32-bit build.

Although there is a test pthread.pthread_mutex_owner_tid_limit
to check pid_max, but bionic-unit-tests hangs before reaching
that test. So abort at libc initialization if not able to reach
the test when running bionic-unit-tests32. It is more friendly
for debugging.

Bug: 24016357
Change-Id: Ia70c2e36fd8a3a040d41ea5722c7b48a6134e102

8 years agoMerge "CloseArchive() to free memory when OpenArchive fails." into nyc-dev
Yabin Cui [Wed, 30 Mar 2016 19:41:05 +0000 (19:41 +0000)]
Merge "CloseArchive() to free memory when OpenArchive fails." into nyc-dev
am: 78a3d39

* commit '78a3d39aa997acd92fa838568287507c75e4a8a5':
  CloseArchive() to free memory when OpenArchive fails.

Change-Id: I3154d0b5679c91ef6ad832c2a223f6d42bc1d212

8 years agoMerge "CloseArchive() to free memory when OpenArchive fails." into nyc-dev
Yabin Cui [Wed, 30 Mar 2016 19:29:21 +0000 (19:29 +0000)]
Merge "CloseArchive() to free memory when OpenArchive fails." into nyc-dev

8 years agoCloseArchive() to free memory when OpenArchive fails.
Yabin Cui [Tue, 22 Mar 2016 00:10:12 +0000 (17:10 -0700)]
CloseArchive() to free memory when OpenArchive fails.

Bug: 26962895
Change-Id: I42418eee320ddae857b42572690316c53f638e85
(cherry picked from commit 722072d65abb1b9fa709f5c7ae8afd98ef5ab7af)

8 years agoStop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE.
Elliott Hughes [Wed, 30 Mar 2016 17:33:54 +0000 (10:33 -0700)]
Stop defining HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE.

Bug: http://b/27918161
Change-Id: I21d4dfa4636aa06a93b3c8a215113f66f37f0bc7

8 years agoMerge "Copy the entire zero-separated DNS seach domain string." into nyc-dev
Pierre Imai [Wed, 30 Mar 2016 07:43:44 +0000 (07:43 +0000)]
Merge "Copy the entire zero-separated DNS seach domain string." into nyc-dev
am: 9b33108

* commit '9b331089db29d5ffa9909d27b17b96e0d45bda51':
  Copy the entire zero-separated DNS seach domain string.

Change-Id: Iaf939a3b69f171c19c8f9c083da6ca22a2ce0ce4

8 years agoMerge "Copy the entire zero-separated DNS seach domain string." into nyc-dev
Pierre Imai [Wed, 30 Mar 2016 07:38:26 +0000 (07:38 +0000)]
Merge "Copy the entire zero-separated DNS seach domain string." into nyc-dev

8 years agoMerge "Add a checksum to jmp_buf on mips and mips64." am: eaf50be
Predrag Blagojevic [Wed, 30 Mar 2016 02:37:35 +0000 (02:37 +0000)]
Merge "Add a checksum to jmp_buf on mips and mips64." am: eaf50be
am: a9b6bfb

* commit 'a9b6bfbb4c696ff8c9c78d18eab0373eb4a9ab79':
  Add a checksum to jmp_buf on mips and mips64.

Change-Id: I1212798aa6eecb664ec75c6ac28944ca64bceb2c

8 years agoMerge "Add a checksum to jmp_buf on mips and mips64."
Predrag Blagojevic [Wed, 30 Mar 2016 02:33:50 +0000 (02:33 +0000)]
Merge "Add a checksum to jmp_buf on mips and mips64."
am: eaf50be

* commit 'eaf50be332f015bd90e45d4f9d111b24cd230f00':
  Add a checksum to jmp_buf on mips and mips64.

Change-Id: I40992a1fc36bbe31fd3fa4c3b82b1ca62452f74b

8 years agoMerge "Add a checksum to jmp_buf on mips and mips64."
Josh Gao [Wed, 30 Mar 2016 02:27:00 +0000 (02:27 +0000)]
Merge "Add a checksum to jmp_buf on mips and mips64."

8 years agoMerge "Fix test getauxval.arm_has_AT_HWCAP2." into nyc-dev
Yabin Cui [Wed, 30 Mar 2016 01:48:18 +0000 (01:48 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2." into nyc-dev
am: 26e33ec

* commit '26e33ec1b9ce42accc0bea9ae9fdc9bf9b4d2d5d':
  Fix test getauxval.arm_has_AT_HWCAP2.

Change-Id: Ice7954946f700c88a7d17f6bfc3f1be70053658f

8 years agoAdd a checksum to jmp_buf on x86_64.
Josh Gao [Wed, 30 Mar 2016 01:48:18 +0000 (01:48 +0000)]
Add a checksum to jmp_buf on x86_64.
am: 89c41d6

* commit '89c41d68edd53189a006d7b7f21cdf0066b70711':
  Add a checksum to jmp_buf on x86_64.

Change-Id: Ifb9e940c5eb6e37060936c202e433c5e102ded57

8 years agoDelete lies from x86_64 setjmp implementation.
Josh Gao [Wed, 30 Mar 2016 01:48:17 +0000 (01:48 +0000)]
Delete lies from x86_64 setjmp implementation.
am: 95e789a  -s ours

* commit '95e789a30732ba9d51dc01a50b2e973e6330295f':
  Delete lies from x86_64 setjmp implementation.

Change-Id: I6e21a5675f33ab09bce236b6f186630c2a5a6a13

8 years agoAdd a checksum to jmp_buf on x86.
Josh Gao [Wed, 30 Mar 2016 01:26:33 +0000 (01:26 +0000)]
Add a checksum to jmp_buf on x86.
am: 7af64bd

* commit '7af64bd083a86df3ec2322892a5fcfcc075c2114':
  Add a checksum to jmp_buf on x86.

Change-Id: I5c166c1d7fc231298ebcdcd3d629d4f18ef08836

8 years agoMerge "Fix test getauxval.arm_has_AT_HWCAP2." into nyc-dev
Yabin Cui [Wed, 30 Mar 2016 01:24:12 +0000 (01:24 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2." into nyc-dev

8 years agoMerge changes from topic \'setjmp_checksum_x86\' am: a42789f
Josh Gao [Wed, 30 Mar 2016 01:19:14 +0000 (01:19 +0000)]
Merge changes from topic \'setjmp_checksum_x86\' am: a42789f
am: 47982ec

* commit '47982ec944fbf3256ed63487ef20d78706e4a986':
  Add a checksum to jmp_buf on x86_64.
  Delete lies from x86_64 setjmp implementation.
  Add a checksum to jmp_buf on x86.

Change-Id: Iae1dfe7c09f4ed219daa6992f4b6428631fa5423

8 years agoMerge changes from topic \'setjmp_checksum_x86\'
Josh Gao [Wed, 30 Mar 2016 01:11:57 +0000 (01:11 +0000)]
Merge changes from topic \'setjmp_checksum_x86\'
am: a42789f

* commit 'a42789f9d246097c6178dabf5ba0fd227e038d70':
  Add a checksum to jmp_buf on x86_64.
  Delete lies from x86_64 setjmp implementation.
  Add a checksum to jmp_buf on x86.

Change-Id: Ie985fd94f1f686d1335b3d898f3aee1973f2027e

8 years agoAdd a checksum to jmp_buf on x86_64.
Josh Gao [Tue, 29 Mar 2016 21:53:26 +0000 (14:53 -0700)]
Add a checksum to jmp_buf on x86_64.

Bug: http://b/27856501
Bug: http://b/27417786
Change-Id: I541f5a7ce4972ef56b3f69e73927ca7df362609a
(cherry picked from commit 686e5f6f69c5c30a09d73e42657cb502a261ad6a)

8 years agoDelete lies from x86_64 setjmp implementation.
Josh Gao [Tue, 29 Mar 2016 21:34:03 +0000 (14:34 -0700)]
Delete lies from x86_64 setjmp implementation.

Previously, the implementation of setjmp on x86_64 claimed that
sigprocmask would write to two longs' worth of bytes.

Bug: http://b/27856501
Change-Id: I9f32b40ac773a0cd91a976aace5bfba6e67fb0f8
(cherry picked from commit c244fcb8a3396f94976a56379cce144c4451c3d4)

8 years agoAdd a checksum to jmp_buf on x86.
Josh Gao [Tue, 29 Mar 2016 21:03:09 +0000 (14:03 -0700)]
Add a checksum to jmp_buf on x86.

Bug: http://b/27856501
Bug: http://b/27417786
Change-Id: Id5a0a81fc38e311bff678cbc7dc2219bc0074503
(cherry picked from commit 926078539346f5d3cc864c9ba25993e8c6437c07)

8 years agoMerge changes from topic 'setjmp_checksum_x86'
Josh Gao [Wed, 30 Mar 2016 00:58:30 +0000 (00:58 +0000)]
Merge changes from topic 'setjmp_checksum_x86'

* changes:
  Add a checksum to jmp_buf on x86_64.
  Delete lies from x86_64 setjmp implementation.
  Add a checksum to jmp_buf on x86.

8 years agoAdd a checksum to jmp_buf on x86_64.
Josh Gao [Tue, 29 Mar 2016 21:53:26 +0000 (14:53 -0700)]
Add a checksum to jmp_buf on x86_64.

Bug: http://b/27856501
Bug: http://b/27417786
Change-Id: I541f5a7ce4972ef56b3f69e73927ca7df362609a

8 years agoDelete lies from x86_64 setjmp implementation.
Josh Gao [Tue, 29 Mar 2016 21:34:03 +0000 (14:34 -0700)]
Delete lies from x86_64 setjmp implementation.

Previously, the implementation of setjmp on x86_64 claimed that
sigprocmask would write to two longs' worth of bytes.

Bug: http://b/27856501
Change-Id: I9f32b40ac773a0cd91a976aace5bfba6e67fb0f8

8 years agoAdd a checksum to jmp_buf on x86.
Josh Gao [Tue, 29 Mar 2016 21:03:09 +0000 (14:03 -0700)]
Add a checksum to jmp_buf on x86.

Bug: http://b/27856501
Bug: http://b/27417786
Change-Id: Id5a0a81fc38e311bff678cbc7dc2219bc0074503

8 years agoMerge "Fix test getauxval.arm_has_AT_HWCAP2." am: c03e8ce
Yabin Cui [Tue, 29 Mar 2016 23:56:36 +0000 (23:56 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2." am: c03e8ce
am: e485131

* commit 'e485131e968baddbad6eb754ee718e62de216495':
  Fix test getauxval.arm_has_AT_HWCAP2.

Change-Id: Ibe52a6067ca191c75122ccd85ab4dcd29074ef3a

8 years agoMerge "Fix test getauxval.arm_has_AT_HWCAP2."
Yabin Cui [Tue, 29 Mar 2016 23:53:27 +0000 (23:53 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2."
am: c03e8ce

* commit 'c03e8ceec233494ae1248247c5a1f4a374e70ae5':
  Fix test getauxval.arm_has_AT_HWCAP2.

Change-Id: I13ec050d894c7626fc74327cf0b9e1e3e6528b0a

8 years agoFix test getauxval.arm_has_AT_HWCAP2.
Yabin Cui [Tue, 29 Mar 2016 22:41:49 +0000 (15:41 -0700)]
Fix test getauxval.arm_has_AT_HWCAP2.

Bug: 27874785
Change-Id: Ibb39087c5353a0cca7783d39498b370e478fe91c
(cherry picked from commit 78f5eb0498e0bae7f64f749b252aee7e56621b34)

8 years agoMerge "Update Android.bp with getdomainname" am: 8ac6611
Dan Willemsen [Tue, 29 Mar 2016 23:47:16 +0000 (23:47 +0000)]
Merge "Update Android.bp with getdomainname" am: 8ac6611
am: 6c67077

* commit '6c67077abd6974289532417ab6d345fa5121d6fb':
  Update Android.bp with getdomainname

Change-Id: I69888502b466fca540aa1adbce1c125e9d025cbd

8 years agoMerge "Fix test getauxval.arm_has_AT_HWCAP2."
Yabin Cui [Tue, 29 Mar 2016 23:44:59 +0000 (23:44 +0000)]
Merge "Fix test getauxval.arm_has_AT_HWCAP2."

8 years agoMerge "Update Android.bp with getdomainname"
Dan Willemsen [Tue, 29 Mar 2016 23:44:10 +0000 (23:44 +0000)]
Merge "Update Android.bp with getdomainname"
am: 8ac6611

* commit '8ac6611e7fc8df8ea90f22cc21398ab64f4da16c':
  Update Android.bp with getdomainname

Change-Id: I49657f3d713ba17e67da32f3eb103544934ea041

8 years agoMerge "Update Android.bp with getdomainname"
Dan Willemsen [Tue, 29 Mar 2016 23:36:41 +0000 (23:36 +0000)]
Merge "Update Android.bp with getdomainname"

8 years agoFix test getauxval.arm_has_AT_HWCAP2.
Yabin Cui [Tue, 29 Mar 2016 22:41:49 +0000 (15:41 -0700)]
Fix test getauxval.arm_has_AT_HWCAP2.

Bug: 27874785
Change-Id: Ibb39087c5353a0cca7783d39498b370e478fe91c

8 years agoUpdate Android.bp with getdomainname
Dan Willemsen [Tue, 29 Mar 2016 22:21:38 +0000 (15:21 -0700)]
Update Android.bp with getdomainname

Change-Id: I32383162acd16430089708fdce8927be43d1bc5a

8 years agoresolve merge conflicts of 9ce09e4 to nyc-dev-plus-aosp
Elliott Hughes [Tue, 29 Mar 2016 18:27:27 +0000 (11:27 -0700)]
resolve merge conflicts of 9ce09e4 to nyc-dev-plus-aosp

Change-Id: I0b5ac686e45c685e5168a0870570589e2eb82488

8 years agolibc: implement kernel vdso syscalls for i386
Mingwei Shi [Thu, 12 Nov 2015 07:02:14 +0000 (07:02 +0000)]
libc: implement kernel vdso syscalls for i386

This patch uses __kernel_vsyscall instead of "int 0x80"
as the syscall entry point. AT_SYSINFO points to
an adapter to mask the arch specific difference and gives a
performance boost on i386 architecture.

Bug: http://b/27533895
Change-ID: Ib340c604d02c6c25714a95793737e3cfdc3fc5d7
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
(cherry picked from commit be910529322b461148debefd50b9e0d67ae84f8e)

8 years agoCopy the entire zero-separated DNS seach domain string.
Pierre Imai [Mon, 29 Feb 2016 07:31:55 +0000 (16:31 +0900)]
Copy the entire zero-separated DNS seach domain string.

The DNS search string contains zeros as domain separator. The resolver
code erroneously used strlcpy(), which resulted in only the first domain
to be copied. The code uses pointers into this string to access the
individual domains. Since the structure is zero-initialized, this bug only
resulted in zero-length domains instead of accessing unitialized memory.

BUG: 27312811
Change-Id: Ia9d066c405dfcc5e82d6766d93ead2ce574e7b0d
(cherry picked from commit 0967fc7e59cda0ea2561b0eaa58ed842da7c0eb9)

8 years agoMerge "linker: hide the pointer to soinfo" into nyc-dev
Dimitry Ivanov [Mon, 28 Mar 2016 23:57:50 +0000 (23:57 +0000)]
Merge "linker: hide the pointer to soinfo" into nyc-dev
am: 79e9228

* commit '79e92282240e9e09568f3138b5f8caa6b85cb1c6':
  linker: hide the pointer to soinfo

8 years agoMerge "linker: hide the pointer to soinfo" into nyc-dev
Dimitry Ivanov [Mon, 28 Mar 2016 23:36:40 +0000 (23:36 +0000)]
Merge "linker: hide the pointer to soinfo" into nyc-dev

8 years agoresolve merge conflicts of cba377a to nyc-dev-plus-aosp
Dimitry Ivanov [Mon, 28 Mar 2016 23:20:34 +0000 (16:20 -0700)]
resolve merge conflicts of cba377a to nyc-dev-plus-aosp

Change-Id: Ib34a674f071228b528e8bca1cfae63a60d638572

8 years agoMerge "linker: hide the pointer to soinfo"
Dimitry Ivanov [Mon, 28 Mar 2016 22:47:22 +0000 (22:47 +0000)]
Merge "linker: hide the pointer to soinfo"
am: 19f5f6f

* commit '19f5f6fcb7f0edc41b2889649620f287458466f0':
  linker: hide the pointer to soinfo

8 years agoMerge changes Idd0fb06a,Ia17dd540,I96c6592a,I0eacb3f0,I8e2895ec, ... into nyc-dev
Dimitry Ivanov [Mon, 28 Mar 2016 22:39:39 +0000 (22:39 +0000)]
Merge changes Idd0fb06a,Ia17dd540,I96c6592a,I0eacb3f0,I8e2895ec, ... into nyc-dev

* changes:
  Do not add linker the _r_debug.r_map on link_image
  Improvements to dynamic linker messages
  Move gdb support functions to a separate file
  Use insert_link_map_into_debug_map for executable
  Update a comment for init_linker_info_for_gdb
  Initialize linker link_map for gdb directly

8 years agolinker: hide the pointer to soinfo
Dimitry Ivanov [Thu, 24 Mar 2016 22:30:30 +0000 (15:30 -0700)]
linker: hide the pointer to soinfo

Handle no longer is a pointer to soinfo of
a corresponding library. This is done to
prevent access to linker internal fields.

Bug: http://b/25593965
Change-Id: I62bff0d0e5b2dc842e6bf0babb30fcc4c000be24
(cherry picked from commit d88e1f350111b3dfd71c6492321f0503cb5540db)

8 years agoMerge "linker: hide the pointer to soinfo"
Dimitry Ivanov [Mon, 28 Mar 2016 22:32:31 +0000 (22:32 +0000)]
Merge "linker: hide the pointer to soinfo"

8 years agoDon\'t bother insisting on AT_HWCAP2 for 32-bit devices.
Elliott Hughes [Mon, 28 Mar 2016 22:24:48 +0000 (22:24 +0000)]
Don\'t bother insisting on AT_HWCAP2 for 32-bit devices.
am: 5ca2bdd

* commit '5ca2bddae3c468cd37f028cdc2d5a5f5d98b3545':
  Don't bother insisting on AT_HWCAP2 for 32-bit devices.

8 years agoDo not add linker the _r_debug.r_map on link_image
Dimitry Ivanov [Tue, 1 Mar 2016 23:55:56 +0000 (15:55 -0800)]
Do not add linker the _r_debug.r_map on link_image

Bug: http://b/27533895
Change-Id: Idd0fb06a5d9f400c0608ae532cc4c575211810fa
(cherry picked from commit e97d8ed70e44db619de9975a43ed2d1509653d74)

8 years agoImprovements to dynamic linker messages
Dimitry Ivanov [Thu, 18 Feb 2016 22:37:44 +0000 (14:37 -0800)]
Improvements to dynamic linker messages

Error messages now include executable name,
also linker doesn't abort if called on itself.

Bug: http://b/27533895
Change-Id: Ia17dd540919544b28062ed71751a1d79ee865206
(cherry picked from commit 9f0a6954c602e63f85746237e1a333b4571d757d)

8 years agoMove gdb support functions to a separate file
Dimitry Ivanov [Thu, 18 Feb 2016 00:08:03 +0000 (16:08 -0800)]
Move gdb support functions to a separate file

Move gdb support functions and variables to
linker_gdb_support.h/cpp

Bug: http://b/27533895
Change-Id: I96c6592a7055715b18f1137367470fe80987263f
(cherry picked from commit 6b788eeff2ea0019849517e796b762ae790ca142)

8 years agoUse insert_link_map_into_debug_map for executable
Dimitry Ivanov [Wed, 17 Feb 2016 23:25:25 +0000 (15:25 -0800)]
Use insert_link_map_into_debug_map for executable

Use insert_link_map_into_debug_map to insert the main
executable's link_map to r_debug

Bug: http://b/27533895
Change-Id: I0eacb3f030ea3eb16ed50ad2011d604beece2d03
(cherry picked from commit f3064e4bc7f4dee351bc2eb9272db3e9792dc683)

8 years agoUpdate a comment for init_linker_info_for_gdb
Dimitry Ivanov [Wed, 17 Feb 2016 22:13:06 +0000 (14:13 -0800)]
Update a comment for init_linker_info_for_gdb

Bug: http://b/27533895
Change-Id: I8e2895ecfcc6f77a180c3735342afc93be5923d3
(cherry picked from commit 6400129628ef24adb57fc4822d4fd54b8967701b)

8 years agoInitialize linker link_map for gdb directly
Dimitry Ivanov [Tue, 16 Feb 2016 21:43:35 +0000 (13:43 -0800)]
Initialize linker link_map for gdb directly

Remove unnecessary construction of soinfo when
initializing linker link_map for gdb.

Bug: http://b/27533895
Change-Id: Idf32cee56309aa9c9cf260efbd17a9deae9a756b
(cherry picked from commit 8d22dd53feddcc7a84e1cc481f171fd4dfe095a1)

8 years agolinker: hide the pointer to soinfo
Dimitry Ivanov [Thu, 24 Mar 2016 22:30:30 +0000 (15:30 -0700)]
linker: hide the pointer to soinfo

Handle no longer is a pointer to soinfo of
a corresponding library. This is done to
prevent access to linker internal fields.

Bug: http://b/25593965
Change-Id: I62bff0d0e5b2dc842e6bf0babb30fcc4c000be24

8 years agoMerge "Don\'t bother insisting on AT_HWCAP2 for 32-bit devices."
Elliott Hughes [Mon, 28 Mar 2016 19:46:31 +0000 (19:46 +0000)]
Merge "Don\'t bother insisting on AT_HWCAP2 for 32-bit devices."
am: 33a6622

* commit '33a66222fa61e3eac5d9e76d550d104551042233':
  Don't bother insisting on AT_HWCAP2 for 32-bit devices.

8 years agoDon't bother insisting on AT_HWCAP2 for 32-bit devices.
Elliott Hughes [Mon, 28 Mar 2016 18:53:12 +0000 (11:53 -0700)]
Don't bother insisting on AT_HWCAP2 for 32-bit devices.

Bug: http://b/27874785

(cherry picked from commit 900a4dc5a8fcabcc85eb17a0d1ee2295cae7b180)

Change-Id: Ia8c3543c51861030b33f8a4e0c0b88d7cca6e11e

8 years agoMerge "Don't bother insisting on AT_HWCAP2 for 32-bit devices."
Elliott Hughes [Mon, 28 Mar 2016 19:33:48 +0000 (19:33 +0000)]
Merge "Don't bother insisting on AT_HWCAP2 for 32-bit devices."

8 years agoMerge "clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case"
Greg Hackmann [Mon, 28 Mar 2016 19:30:52 +0000 (19:30 +0000)]
Merge "clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case"
am: 8a8e0cf

* commit '8a8e0cf549249fd4040fbfa7f5e4f488db7ac8ad':
  clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case

8 years agoMerge "clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case"
Greg Hackmann [Mon, 28 Mar 2016 19:19:15 +0000 (19:19 +0000)]
Merge "clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case"

8 years agoDon't bother insisting on AT_HWCAP2 for 32-bit devices.
Elliott Hughes [Mon, 28 Mar 2016 18:53:12 +0000 (11:53 -0700)]
Don't bother insisting on AT_HWCAP2 for 32-bit devices.

Bug: http://b/27874785
Change-Id: I9dcf345ae1221f665f267cba3ed9279435671b75

8 years agoclock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case
Greg Hackmann [Sat, 26 Mar 2016 18:37:55 +0000 (11:37 -0700)]
clock_nanosleep: add CLOCK_THREAD_CPUTIME_ID special case

POSIX makes "the CPU-time clock of the calling thread" (i.e.,
CLOCK_THREAD_CPUTIME_ID) a special case which returns EINVAL instead of
ENOTSUP.

However, the clock_nanosleep syscall treats this clock just like any
other, and returns -EOPNOTSUPP to indicate an unimplemented nanosleep
handler.  So we need to handle this ourselves in userspace.

This change fixes the LTP clock_nanosleep01 testcase.

Change-Id: If3bed940d276834bcd114d8c17f96197e9384711
Signed-off-by: Greg Hackmann <ghackmann@google.com>
8 years agoAdd a checksum to jmp_buf on mips and mips64.
Predrag Blagojevic [Wed, 16 Mar 2016 14:49:12 +0000 (15:49 +0100)]
Add a checksum to jmp_buf on mips and mips64.

Make it easier to diagnose applications mucking with the contents of
jmp_buf by checksumming its contents.

Bug: http://b/27417786
Change-Id: I473bc2871dece23a9b9d02481945246160d671c6

8 years agoMerge "fixup x86 setdomainname.S"
Nick Kralevich [Mon, 28 Mar 2016 00:36:06 +0000 (00:36 +0000)]
Merge "fixup x86 setdomainname.S"
am: 7c59c70

* commit '7c59c70200a86387d3c97e9d7f34e2b8dbed88b3':
  fixup x86 setdomainname.S

8 years agoMerge "fixup x86 setdomainname.S"
Nick Kralevich [Mon, 28 Mar 2016 00:27:05 +0000 (00:27 +0000)]
Merge "fixup x86 setdomainname.S"

8 years agofixup x86 setdomainname.S
Nick Kralevich [Sun, 27 Mar 2016 21:52:58 +0000 (14:52 -0700)]
fixup x86 setdomainname.S

Both be910529322b461148debefd50b9e0d67ae84f8e and
e2faf07d659b1c824002e50b9cdfa9caae62a31b were submitted about
two days ago. The former changed how the syscalls stubs were
generated, but the latter was submitted using the old stub
format.

Use the new stub format for setdomainname.S

Change-Id: I578acd7053f57a275f6831dd2404ef04826c578e

8 years agoFix pthread.pthread_barrier_smoke test.
Yabin Cui [Sat, 26 Mar 2016 22:19:18 +0000 (22:19 +0000)]
Fix pthread.pthread_barrier_smoke test.
am: 0eed282

* commit '0eed2827ed707f22c6901f70a167b005a2ade262':
  Fix pthread.pthread_barrier_smoke test.

8 years agoFix pthread.pthread_barrier_smoke test.
Yabin Cui [Tue, 22 Mar 2016 20:45:55 +0000 (13:45 -0700)]
Fix pthread.pthread_barrier_smoke test.

pthread_barrier_smoke test uses WaitUntilThreadSleep() to wait until
BarrierTestHelper threads sleep in pthread_barrier_wait(). But this
is flaky as there a two futex_wait places in pthread_barrier_wait.
This patch modifies this test to avoid using WaitUntilThreadSleep().

Bug: 27780937
Bug: 27811377
Change-Id: I4c36b82cce9345d5088f8854b289dc5bf7a08e8c
(cherry picked from commit 81d2797e33d6f95c0b79e20ae8a04f2a4f3841cc)

8 years agoMerge "Add hasmntopt(3)"
Greg Hackmann [Fri, 25 Mar 2016 22:50:04 +0000 (22:50 +0000)]
Merge "Add hasmntopt(3)"
am: d132099

* commit 'd132099e0597276dea1faa30d674256309c99736':
  Add hasmntopt(3)

8 years agoMerge "Add hasmntopt(3)"
Greg Hackmann [Fri, 25 Mar 2016 22:43:00 +0000 (22:43 +0000)]
Merge "Add hasmntopt(3)"

8 years agoMerge "libc: implement kernel vdso syscalls for i386"
Mingwei Shi [Fri, 25 Mar 2016 22:29:02 +0000 (22:29 +0000)]
Merge "libc: implement kernel vdso syscalls for i386"
am: d81143d

* commit 'd81143df7196509596ede621d635f90421ad152b':
  libc: implement kernel vdso syscalls for i386

8 years agoMerge "libc: implement kernel vdso syscalls for i386"
Elliott Hughes [Fri, 25 Mar 2016 22:20:42 +0000 (22:20 +0000)]
Merge "libc: implement kernel vdso syscalls for i386"

8 years agoMerge "Add {get,set}domainname(2)"
Greg Hackmann [Fri, 25 Mar 2016 22:12:53 +0000 (22:12 +0000)]
Merge "Add {get,set}domainname(2)"
am: 76640d5

* commit '76640d5555a7c79d8025f5f0934afbf9f539e6a7':
  Add {get,set}domainname(2)

8 years agoMerge "Add {get,set}domainname(2)"
Greg Hackmann [Fri, 25 Mar 2016 22:02:06 +0000 (22:02 +0000)]
Merge "Add {get,set}domainname(2)"

8 years agoAdd hasmntopt(3)
Greg Hackmann [Fri, 4 Mar 2016 18:07:35 +0000 (10:07 -0800)]
Add hasmntopt(3)

bionic has the Linux-specific mntent.h but is missing hasmntopt().

Change-Id: I0ab7b83626c969704add4e64b37a6fc715d4a723
Signed-off-by: Greg Hackmann <ghackmann@google.com>
8 years agoAdd {get,set}domainname(2)
Greg Hackmann [Thu, 3 Mar 2016 16:37:53 +0000 (08:37 -0800)]
Add {get,set}domainname(2)

{get,set}domainname aren't in POSIX but are widely-implemented
extensions.

The Linux kernel provides a setdomainname syscall but not a symmetric
getdomainname syscall, since it expects userspace to get the domain name
from uname(2).

Change-Id: I96726c242f4bb646c130b361688328b0b97269a0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
8 years agolibc: implement kernel vdso syscalls for i386
Mingwei Shi [Thu, 12 Nov 2015 07:02:14 +0000 (07:02 +0000)]
libc: implement kernel vdso syscalls for i386

This patch uses __kernel_vsyscall instead of "int 0x80"
as the syscall entry point. AT_SYSINFO points to
an adapter to mask the arch specific difference and gives a
performance boost on i386 architecture.

Change-ID: Ib340c604d02c6c25714a95793737e3cfdc3fc5d7
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
8 years agoMerge "epoll_create: reject size <= 0"
Greg Hackmann [Fri, 25 Mar 2016 20:07:30 +0000 (20:07 +0000)]
Merge "epoll_create: reject size <= 0"
am: 2846ae7

* commit '2846ae70fb967269e8fcd2d854d04c9aeb5d01d3':
  epoll_create: reject size <= 0