OSDN Git Service

android-x86/bionic.git
11 years agoMerge "libc: add timerfd calls"
Elliott Hughes [Tue, 14 May 2013 21:45:29 +0000 (21:45 +0000)]
Merge "libc: add timerfd calls"

11 years agolibc: add timerfd calls
Todd Poynor [Thu, 9 May 2013 03:21:00 +0000 (20:21 -0700)]
libc: add timerfd calls

(cherry-pick of 04c0ac14a49e0969333008a9522b64046d58fbdc.)

Change-Id: I06d0b6c2a8781602362b81f48faf1cca76b9ec05

11 years agoMerge "libc: remove obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR"
Elliott Hughes [Tue, 14 May 2013 21:44:28 +0000 (21:44 +0000)]
Merge "libc: remove obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR"

11 years agolibc: remove obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR
Todd Poynor [Sat, 11 May 2013 01:23:40 +0000 (18:23 -0700)]
libc: remove obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR

Add CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, and CLOCK_MONOTONIC_COARSE
as supported by recent linux kernels.

(cherry-pick of 60e5144ca312b210b54ac8e6966108da0c97ff80.)

Bug: 8895727
Change-Id: If79a4d05d1301108f49a37588f9416c4be19277a

11 years agoMerge "libc: add clock ids CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM"
Elliott Hughes [Tue, 14 May 2013 21:43:37 +0000 (21:43 +0000)]
Merge "libc: add clock ids CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM"

11 years agolibc: add clock ids CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
Todd Poynor [Thu, 9 May 2013 22:56:23 +0000 (15:56 -0700)]
libc: add clock ids CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM

(cherry-pick of b928bda83d4413b703329f607e2706602f15293f.)

Change-Id: Ica6aad84299819ffc5e57ae4891e057d2e401fa1

11 years agoMerge "Fix all printf warnings in res_send.c."
Elliott Hughes [Tue, 14 May 2013 17:10:20 +0000 (17:10 +0000)]
Merge "Fix all printf warnings in res_send.c."

11 years agoFix all printf warnings in res_send.c.
Kito Cheng [Sat, 11 May 2013 09:48:48 +0000 (17:48 +0800)]
Fix all printf warnings in res_send.c.

Change-Id: I4bf959140b5a5475897bd80704e64e3c4645fc3f

11 years agoMerge "Don't fail to run DT_INIT and DT_INIT_ARRAY constructors if a shared library...
Elliott Hughes [Thu, 9 May 2013 22:30:21 +0000 (22:30 +0000)]
Merge "Don't fail to run DT_INIT and DT_INIT_ARRAY constructors if a shared library has DT_PREINIT_ARRAY constructors."

11 years agoDon't fail to run DT_INIT and DT_INIT_ARRAY constructors if a shared library has...
Elliott Hughes [Thu, 9 May 2013 21:19:58 +0000 (14:19 -0700)]
Don't fail to run DT_INIT and DT_INIT_ARRAY constructors if a shared library has DT_PREINIT_ARRAY constructors.

The GNU dynamic linker silently ignores a DT_PREINIT_ARRAY section
in a shared library. We had ineffectual code that tried to report
an error, which I tried to fix but got wrong --- my version still
wouldn't report the error to the caller, but would prevent us from
continuing to call constructors.

Bug: 8825226
Change-Id: I4fd8450ecc44d8767a1cb808aeecfbfbfc77c070

11 years agoMerge "Remove a spurious FIXME and unnecessary type cast."
Ben Cheng [Tue, 7 May 2013 23:56:11 +0000 (23:56 +0000)]
Merge "Remove a spurious FIXME and unnecessary type cast."

11 years agoRemove a spurious FIXME and unnecessary type cast.
Ben Cheng [Tue, 7 May 2013 23:53:33 +0000 (16:53 -0700)]
Remove a spurious FIXME and unnecessary type cast.

Change-Id: I05dcefdec7f047bef7eef5c5ceb7453992d56c24

11 years agoMerge "Adjust PC value in ARM stack trace."
Ben Cheng [Tue, 7 May 2013 22:45:42 +0000 (22:45 +0000)]
Merge "Adjust PC value in ARM stack trace."

11 years agoAdjust PC value in ARM stack trace.
Ben Cheng [Tue, 7 May 2013 21:22:43 +0000 (14:22 -0700)]
Adjust PC value in ARM stack trace.

-2 for Thumb BLX(2) or -4 for the rest.

Change-Id: I804fdabfa1db4709bede222d4b432e8d42d53167

11 years agoMerge "Use restrict pointers for various libc functions."
Nick Kralevich [Tue, 7 May 2013 17:37:48 +0000 (17:37 +0000)]
Merge "Use restrict pointers for various libc functions."

11 years agoUse restrict pointers for various libc functions.
Nick Kralevich [Tue, 7 May 2013 17:00:21 +0000 (10:00 -0700)]
Use restrict pointers for various libc functions.

All the cool kids say this is the best thing since sliced bread.
http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html

For the most part, these changes match what glibc does.

Change-Id: I176268f27f82800162fe5f2515b08d5469ea2dfe

11 years agoMerge "Use __predict_false on some fortify methods."
Nick Kralevich [Thu, 2 May 2013 21:52:19 +0000 (21:52 +0000)]
Merge "Use __predict_false on some fortify methods."

11 years agoUse __predict_false on some fortify methods.
Nick Kralevich [Thu, 2 May 2013 21:31:51 +0000 (14:31 -0700)]
Use __predict_false on some fortify methods.

Give the compiler some hints that these error conditions
are unlikely to occur in practice.

Change-Id: Ifaf7322a12120ef663c8315c1a18c2dcbe4bda23

11 years agoMerge "libc: cleanup strchr"
Nick Kralevich [Thu, 2 May 2013 21:17:15 +0000 (21:17 +0000)]
Merge "libc: cleanup strchr"

11 years agolibc: cleanup strchr
Nick Kralevich [Fri, 19 Apr 2013 23:54:22 +0000 (16:54 -0700)]
libc: cleanup strchr

Move strchr to a .cpp file, and change to bionic directory.

Change-Id: I64ade7df326c0a9a714aca4caf5647b6833b1c97

11 years agoMerge "keep test names consistent with other tests."
Nick Kralevich [Wed, 1 May 2013 22:06:15 +0000 (22:06 +0000)]
Merge "keep test names consistent with other tests."

11 years agokeep test names consistent with other tests.
Nick Kralevich [Wed, 1 May 2013 22:05:01 +0000 (15:05 -0700)]
keep test names consistent with other tests.

Change-Id: I23dc4d963af40406b270af83cd17f6c8c95f1de3

11 years agoMerge "add strrchr -D_FORTIFY_SOURCE=2 test."
Nick Kralevich [Wed, 1 May 2013 22:01:19 +0000 (22:01 +0000)]
Merge "add strrchr -D_FORTIFY_SOURCE=2 test."

11 years agoadd strrchr -D_FORTIFY_SOURCE=2 test.
Nick Kralevich [Wed, 1 May 2013 21:55:33 +0000 (14:55 -0700)]
add strrchr -D_FORTIFY_SOURCE=2 test.

Change-Id: I1b95bb0086ae9f2f506f3cc90cee834c0ce3b1d8

11 years agoMerge "libc: upgrade strrchr to FORTIFY_SOURCE=2"
Nick Kralevich [Tue, 30 Apr 2013 23:13:04 +0000 (23:13 +0000)]
Merge "libc: upgrade strrchr to FORTIFY_SOURCE=2"

11 years agolibc: upgrade strrchr to FORTIFY_SOURCE=2
Nick Kralevich [Tue, 30 Apr 2013 21:19:23 +0000 (14:19 -0700)]
libc: upgrade strrchr to FORTIFY_SOURCE=2

Change-Id: I4c34c2ce22c5092c4446dc1ab55f37604c1c223f

11 years agoMerge "libc: upgrade some libc functions to _FORTIFY_SOURCE=2"
Nick Kralevich [Tue, 30 Apr 2013 18:51:22 +0000 (18:51 +0000)]
Merge "libc: upgrade some libc functions to _FORTIFY_SOURCE=2"

11 years agolibc: upgrade some libc functions to _FORTIFY_SOURCE=2
Nick Kralevich [Tue, 30 Apr 2013 18:31:35 +0000 (11:31 -0700)]
libc: upgrade some libc functions to _FORTIFY_SOURCE=2

Upgrade the following functions:

* vsnprintf
* vsprintf
* snprintf
* fgets
* strcpy
* strcat
* strncat
* strlcpy
* strlcat
* strlen
* strchr

Change-Id: Icc036fc7f0bb317e05f7c051617887a1601271aa

11 years agoMerge "libc: upgrade sprintf to _FORTIFY_SOURCE=2"
Nick Kralevich [Mon, 29 Apr 2013 23:50:46 +0000 (23:50 +0000)]
Merge "libc: upgrade sprintf to _FORTIFY_SOURCE=2"

11 years agolibc: upgrade sprintf to _FORTIFY_SOURCE=2
Nick Kralevich [Mon, 29 Apr 2013 23:29:37 +0000 (16:29 -0700)]
libc: upgrade sprintf to _FORTIFY_SOURCE=2

Upgrade sprintf to fortify_source level 2, to catch
additional security bugs.

Change-Id: Ibc957d65e4cb96152de84b3745a04e00fa22659e

11 years agoMerge "strncpy: implement _FORTIFY_SOURCE=2"
Nick Kralevich [Mon, 29 Apr 2013 23:07:33 +0000 (23:07 +0000)]
Merge "strncpy: implement _FORTIFY_SOURCE=2"

11 years agostrncpy: implement _FORTIFY_SOURCE=2
Nick Kralevich [Mon, 29 Apr 2013 21:07:06 +0000 (14:07 -0700)]
strncpy: implement _FORTIFY_SOURCE=2

Add support for fortify source level 2 to strncpy.
This will enable detection of more areas where strncpy
is used inappropriately. For example, this would have detected
bug 8727221.

Move the fortify_source tests out of string_test.cpp, and
put it into fortify1_test.cpp.

Create a new fortify2_test.cpp file, which copies all
the tests in fortify1_test.cpp, and adds fortify_source level
2 specific tests.

Change-Id: Ica0fba531cc7d0609e4f23b8176739b13f7f7a83

11 years agoMerge "[NETFILTER]: Fix iptables ABI breakage"
Nick Kralevich [Mon, 29 Apr 2013 19:44:29 +0000 (19:44 +0000)]
Merge "[NETFILTER]: Fix iptables ABI breakage"

11 years ago[NETFILTER]: Fix iptables ABI breakage
Nick Kralevich [Mon, 29 Apr 2013 19:31:01 +0000 (12:31 -0700)]
[NETFILTER]: Fix iptables ABI breakage

Pick up Linux kernel patch 2748e5dec7ca8a3804852c7c4171f9156384d15c
from 2007

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2748e5dec7ca8a3804852c7c4171f9156384d15c

[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
With the introduction of x_tables we accidentally broke compatibility
by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
XT_TABLE_MAXNAMELEN, which is two bytes larger.

On most architectures it doesn't really matter since we don't have
any tables with names that long in the kernel and the structure
layout didn't change because of alignment requirements of following
members. On CRIS however (and other architectures that don't align
data) this changed the structure layout and thus broke compatibility
with old iptables binaries.

Changing it back will break compatibility with binaries compiled
against recent kernels again, but since the breakage has only been
there for three releases this seems like the better choice.

Change-Id: Ie9552b25892109c7042b9752132dc8ebd3552dc3

11 years agoMerge "Remove redundant space within square brackets"
Andrew Hsieh [Fri, 26 Apr 2013 01:54:37 +0000 (01:54 +0000)]
Merge "Remove redundant space within square brackets"

11 years agoMerge "Improve diagnostics in the face of bad tzdata."
Elliott Hughes [Thu, 25 Apr 2013 22:31:13 +0000 (22:31 +0000)]
Merge "Improve diagnostics in the face of bad tzdata."

11 years agoImprove diagnostics in the face of bad tzdata.
Elliott Hughes [Thu, 25 Apr 2013 21:02:59 +0000 (14:02 -0700)]
Improve diagnostics in the face of bad tzdata.

Bug: 8373554
Change-Id: If8df5e956105e01cce95221ff0a7fa9d2b474db3

11 years agoMerge "linker: only re-open std* for setuid programs."
Nick Kralevich [Thu, 25 Apr 2013 20:31:41 +0000 (20:31 +0000)]
Merge "linker: only re-open std* for setuid programs."

11 years agolinker: only re-open std* for setuid programs.
Nick Kralevich [Thu, 25 Apr 2013 20:15:24 +0000 (13:15 -0700)]
linker: only re-open std* for setuid programs.

get_AT_SECURE() was getting called before linker_env_init() had
been called, and returning the default value ("true"). This was
causing us to reopen closed stdin, stdout, and stderr for ALL
processes, not just privileged (setuid) processes.

Calling path:
  - __linker_init
    - soinfo_link_image
      - get_AT_SECURE
    - __linker_init_post_relocation
      - linker_env_init

This change restores the intended behavior of only re-opening
stdin, stdout, and stderr for privileged processes.

Change-Id: I8b085ea6597710ac4c1a3c93f1bf8b81eecb08c0

11 years agoRemove redundant space within square brackets
Andrew Hsieh [Thu, 25 Apr 2013 07:05:03 +0000 (15:05 +0800)]
Remove redundant space within square brackets

The new "as" in binutils-2.23 (with gcc4.8) is more picky:
it expects register right after [

Change-Id: I876124841582070ab2083ffafe38bc333b5812d0

11 years agoMerge "Don't avoid IPv6 when looking for new tzdata."
Elliott Hughes [Wed, 24 Apr 2013 17:52:29 +0000 (17:52 +0000)]
Merge "Don't avoid IPv6 when looking for new tzdata."

11 years agoDon't avoid IPv6 when looking for new tzdata.
Elliott Hughes [Wed, 24 Apr 2013 17:50:45 +0000 (10:50 -0700)]
Don't avoid IPv6 when looking for new tzdata.

Our internal IPv6 FTP networking problems have been fixed.

Change-Id: I9949a13fa20a3b0f3845e565e1461320078d3f14

11 years agoMerge "Disable IPv6 when looking for tzdata updates."
Elliott Hughes [Mon, 22 Apr 2013 23:41:37 +0000 (23:41 +0000)]
Merge "Disable IPv6 when looking for tzdata updates."

11 years agoDisable IPv6 when looking for tzdata updates.
Elliott Hughes [Mon, 22 Apr 2013 20:44:50 +0000 (13:44 -0700)]
Disable IPv6 when looking for tzdata updates.

My problems connecting to ftp.iana.org are only via IPv6.

Change-Id: I42e4bae7981ec4b64822f745a7a15544d77ef22d

11 years agoMerge "Upgrade to tzdata2013c."
Elliott Hughes [Mon, 22 Apr 2013 19:10:08 +0000 (19:10 +0000)]
Merge "Upgrade to tzdata2013c."

11 years agoMerge "Add signature checking to HTTP tzdata updates."
Elliott Hughes [Mon, 22 Apr 2013 19:03:06 +0000 (19:03 +0000)]
Merge "Add signature checking to HTTP tzdata updates."

11 years agoAdd signature checking to HTTP tzdata updates.
Elliott Hughes [Mon, 22 Apr 2013 18:41:57 +0000 (11:41 -0700)]
Add signature checking to HTTP tzdata updates.

Change-Id: Idcfd217eb215d6a170e6884be8d8ad28cd4fe70d

11 years agoUpgrade to tzdata2013c.
Elliott Hughes [Mon, 22 Apr 2013 18:33:14 +0000 (11:33 -0700)]
Upgrade to tzdata2013c.

From the release notes:

  Changes affecting current and future time stamps:

    Palestine observed DST starting March 29, 2013.  (Thanks to
    Steffen Thorsen.)  From 2013 on, Gaza and Hebron both observe DST,
    with the predicted rules being the last Thursday in March at 24:00
    to the first Friday on or after September 21 at 01:00.

    Assume that the recent change to Paraguay's DST rules is permanent,
    by moving the end of DST to the 4th Sunday in March every year.
    (Thanks to Carlos Raúl Perasso.)

  Changes affecting past time stamps:

    Fix some historical data for Palestine to agree with that of
    timeanddate.com, as follows:

          The spring 2008 change in Gaza and Hebron was on 00:00 Mar 28, not
          00:00 Apr 1.

          The fall 2009 change in Gaza and Hebron on Sep 4 was at 01:00, not
          02:00.

          The spring 2010 change in Hebron was 00:00 Mar 26, not 00:01 Mar 27.

          The spring 2011 change in Gaza was 00:01 Apr 1, not 12:01 Apr 2.

          The spring 2011 change in Hebron on Apr 1 was at 00:01, not 12:01.

          The fall 2011 change in Hebron on Sep 30 was at 00:00, not 03:00.

    Fix times of habitation for Macquarie to agree with the Tasmania
    Parks & Wildlife Service history, which indicates that permanent
    habitation was 1899-1919 and 1948 on.

  Changing affecting metadata only:

    Macquarie Island is politically part of Australia, not Antarctica.
    (Thanks to Tobias Conradi.)

    Sort Macquarie more-consistently with other parts of Australia.
    (Thanks to Tim Parenti.)

Change-Id: I3df146d046eda26dbc6ce2a0a26ad9214ec4eaca

11 years agoMerge "Rename the tzdata update tool, and add HTTP support."
Elliott Hughes [Mon, 22 Apr 2013 18:28:49 +0000 (18:28 +0000)]
Merge "Rename the tzdata update tool, and add HTTP support."

11 years agoRename the tzdata update tool, and add HTTP support.
Elliott Hughes [Mon, 22 Apr 2013 18:11:43 +0000 (11:11 -0700)]
Rename the tzdata update tool, and add HTTP support.

The FTP server is currently unavailable, but the HTTP server is working
fine.

Change-Id: If7f2f396e89aca022a60af531f3604523b7bf95c

11 years agoMerge "Use hidden visibility for internal-use-only functions"
Elliott Hughes [Mon, 15 Apr 2013 17:51:24 +0000 (17:51 +0000)]
Merge "Use hidden visibility for internal-use-only functions"

11 years agoMerge "Rewrite memset for cortexa15 to use strd."
Christopher Ferris [Fri, 12 Apr 2013 19:16:44 +0000 (19:16 +0000)]
Merge "Rewrite memset for cortexa15 to use strd."

11 years agoMerge "Switch to current FreeBSD qsort."
Elliott Hughes [Fri, 12 Apr 2013 19:12:29 +0000 (19:12 +0000)]
Merge "Switch to current FreeBSD qsort."

11 years agoRewrite memset for cortexa15 to use strd.
Christopher Ferris [Tue, 9 Apr 2013 01:35:30 +0000 (18:35 -0700)]
Rewrite memset for cortexa15 to use strd.

Merge from internal master.

(cherry-picked from commit 7ffad9c120054eedebd5f56f8bed01144e93eafa)

Change-Id: Ia67f2a545399f4fa37b63d5634a3565e4f5482f9

11 years agoUse hidden visibility for internal-use-only functions
Kito Cheng [Fri, 12 Apr 2013 08:13:34 +0000 (16:13 +0800)]
Use hidden visibility for internal-use-only functions

 - malloc_debug_init and malloc_debug_fini

Change-Id: I4261ff428a50d8f0371415cda71bcc0a9487ce67

11 years agoSwitch to current FreeBSD qsort.
Elliott Hughes [Fri, 12 Apr 2013 01:08:34 +0000 (18:08 -0700)]
Switch to current FreeBSD qsort.

Change-Id: Ic46cd0b663dc5fa78c99dd38db0bfe849a25e789

11 years agoMerge "Start moving to current FreeBSD stdio."
Elliott Hughes [Thu, 11 Apr 2013 21:18:13 +0000 (21:18 +0000)]
Merge "Start moving to current FreeBSD stdio."

11 years agoStart moving to current FreeBSD stdio.
Elliott Hughes [Thu, 11 Apr 2013 20:54:48 +0000 (13:54 -0700)]
Start moving to current FreeBSD stdio.

This only touches the easy stuff.

Change-Id: Iecee57f1681dba5c56bff59f0e9a89811a71f0ca

11 years agoMerge "Add missing include and function prototype for sched_getaffinity."
Elliott Hughes [Thu, 11 Apr 2013 00:45:33 +0000 (00:45 +0000)]
Merge "Add missing include and function prototype for sched_getaffinity."

11 years agoAdd missing include and function prototype for sched_getaffinity.
Kito Cheng [Tue, 9 Apr 2013 16:57:42 +0000 (00:57 +0800)]
Add missing include and function prototype for sched_getaffinity.

Change-Id: I649633c8d074def5d05bd0c8b92fb680d9d11d51

11 years agoMerge "Add missing branch in memcpy.S dst aligned case."
Christopher Ferris [Thu, 11 Apr 2013 00:23:46 +0000 (00:23 +0000)]
Merge "Add missing branch in memcpy.S dst aligned case."

11 years agoAdd missing branch in memcpy.S dst aligned case.
Christopher Ferris [Tue, 2 Apr 2013 16:19:00 +0000 (09:19 -0700)]
Add missing branch in memcpy.S dst aligned case.

Merge from internal master.

(cherry-picked from commit 6ffaa931c362602a2b606a610c92326a425a876e)

Change-Id: Ifdcf01fd122866cf0d4c5b5f7a997803561d7889

11 years agoMerge "Update to latest cortexa15 memcpy code."
Christopher Ferris [Thu, 11 Apr 2013 00:18:04 +0000 (00:18 +0000)]
Merge "Update to latest cortexa15 memcpy code."

11 years agoUpdate to latest cortexa15 memcpy code.
Christopher Ferris [Fri, 15 Mar 2013 23:01:17 +0000 (16:01 -0700)]
Update to latest cortexa15 memcpy code.

This uses the new code original submitted as memcpy.a15.S as
the base. However, the old code handled unaligned src/dst better
so that was spliced in. I optimized the original unaligned code by
removing a few unnecessary instructions. I optimized the a15 code by
rewriting the pre and post code. I also modified the main loop to add
a pld so that larger copies would not stall waiting for memory.

Test cases for the new memcpy:

- Copy all sized values from 0 to 1024 bytes, using whatever alignment
  is returned by malloc.
For each alignment case described below, the test copied from 0 to 128
bytes.
- Src and dst pointers are both aligned to the same value, starting
  at one going through every power of two up to and including 128.
- Src aligned to double word boundary, dst aligned to word boundary.
- Src aligned to word boundary, dst aligned to double word boundary.
- Src aligned to 16 bit boundary, dst aligned to word boundary.
- Src aligned to word boundary, dst aligned to 16 byte boundary.
- Src aligned to word boundary, dst aligned to 1 byte from a word
  boundary.
- Src aligned to word boundary, dst aligned to 2 bytes from a word
  boundary.
- Src aligned to word boundary, dst aligned to 3 bytes from a word
  boundary.
- Src aligned to 1 byte from a word boundary, dst aligned to a word
  boundary.
- Src aligned to 2 bytes from a word boundary, dst aligned to a word
  boundary.
- Src aligned to 3 bytes from a word boundary, dst aligned to a word
  boundary.

Cases to verify the unaligned source code properly aligns to a 16 bit
boundary.
- Src aligned to 1 byte from a 128 bit boundary, dst aligned to
  4 + 128 bit boundary.
- Src aligned to 1 byte from a 128 bit boundary, dst aligned to
  8 + 128 bit boundary.
- Src aligned to 1 byte from a 128 bit boundary, dst aligned to
  12 + 128 bit boundary.
- Src aligned to 1 byte from a 128 bit boundary, dst aligned to
  16 + 128 bit boundary.

In all cases, a two byte fencepost was placed at the end of the
destination to verify that only the requested number of bytes were copied.

Bug: 8005082

Merge from internal master.

(cherry-picked from commit 21ede92d794969f22cacbdb9f557818f1c5712b5)

Change-Id: Ief70c9e6dc8c6473ae245b6570b2c266fed9618c

11 years agoMerge "Make abort messages available to debuggerd."
Elliott Hughes [Fri, 5 Apr 2013 18:25:21 +0000 (18:25 +0000)]
Merge "Make abort messages available to debuggerd."

11 years agoMake abort messages available to debuggerd.
Elliott Hughes [Thu, 4 Apr 2013 20:46:46 +0000 (13:46 -0700)]
Make abort messages available to debuggerd.

This adds __libc_fatal, cleans up the internal logging code a bit more,
and switches suitable callers over to __libc_fatal. In addition to logging,
__libc_fatal stashes the message somewhere that the debuggerd signal handler
can find it before calling abort.

In the debuggerd signal handler, we pass this address to debuggerd so that
it can come back with ptrace to read the message and present it to the user.

Bug: 8531731
Change-Id: I416ec1da38a8a1b0d0a582ccd7c8aaa681ed4a29

11 years agoMerge "Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a"
Elliott Hughes [Wed, 3 Apr 2013 18:11:30 +0000 (18:11 +0000)]
Merge "Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a"

11 years agoPrevent name conflict for eventfd.cpp and eventfd.s when building libc.a
Kito Cheng [Wed, 3 Apr 2013 03:29:40 +0000 (11:29 +0800)]
Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a

 - eventfd.cpp and eventfd.s will output to the same file when building libc.a
   out/target/product/*/obj/STATIC_LIBRARIES/libc_intermediates/WHOLE/libc_common_objs/eventfd.o
 - And then `eventfd` will undefined when statically linked to libc.

Also add a unit test.

Change-Id: Ib310ade3256712ca617a90539e8eb07459c98505

11 years agoMerge "Fix the SYSCALLS.TXT documentation and remove a dead script."
Elliott Hughes [Wed, 3 Apr 2013 17:22:17 +0000 (17:22 +0000)]
Merge "Fix the SYSCALLS.TXT documentation and remove a dead script."

11 years agoFix the SYSCALLS.TXT documentation and remove a dead script.
Elliott Hughes [Wed, 3 Apr 2013 17:08:09 +0000 (10:08 -0700)]
Fix the SYSCALLS.TXT documentation and remove a dead script.

We use the system call constants from the kernel header files now,
so there's no need to check that they've been correctly transcribed
into SYSCALLS.TXT.

This is a work in progress. I've added TODOs to SYSCALLS.TXT explaining
what's left to do.

Change-Id: I3b86acfe7f84b4da1c802ee5a4ef13a2e83e7939

11 years agoMerge "Stop using unreasonable numbers of map entries."
Elliott Hughes [Wed, 3 Apr 2013 00:48:07 +0000 (00:48 +0000)]
Merge "Stop using unreasonable numbers of map entries."

11 years agoStop using unreasonable numbers of map entries.
Elliott Hughes [Wed, 3 Apr 2013 00:41:14 +0000 (17:41 -0700)]
Stop using unreasonable numbers of map entries.

Bug: 8460659
Change-Id: Ib0ee71e3cf61e122d0449c9d8a4e4670a7d7129a

11 years agoMerge "Update getaddrinfo to RFC6724"
Elliott Hughes [Tue, 2 Apr 2013 01:05:22 +0000 (01:05 +0000)]
Merge "Update getaddrinfo to RFC6724"

11 years agoUpdate getaddrinfo to RFC6724
Lorenzo Colitti [Sat, 30 Mar 2013 03:24:19 +0000 (12:24 +0900)]
Update getaddrinfo to RFC6724

Currently, our getaddrinfo implementation does not conform to
any IETF standard. It follows draft-ietf-6man-rfc3484-revise-01,
but that draft has expired. Update the policy table to RFC6724.

(cherry-pick of e919b116d35aa7deb24ddece69c491e24c3b0d6f.)

Bug: 8276725
Change-Id: I2d17122defd966ac6c2c13d04887fb110f2598a0

11 years agoMerge "Extra logging in pthread_create."
Elliott Hughes [Fri, 29 Mar 2013 23:47:24 +0000 (23:47 +0000)]
Merge "Extra logging in pthread_create."

11 years agoExtra logging in pthread_create.
Elliott Hughes [Fri, 29 Mar 2013 23:35:00 +0000 (16:35 -0700)]
Extra logging in pthread_create.

pthread_create returns EAGAIN when it can't allocate a pthread_internal_t,
when it can't allocate a stack for the new thread, or when clone(2) fails
because there are too many threads. It's useful to be able to know why your
pthread_create just failed, so add some logging.

Bug: 8470684
Change-Id: I1bb4497d4f7528eacce0db35c2014771cba64569

11 years agoMerge "Update processed linux/fs.h header file"
Jean-Baptiste Queru [Thu, 28 Mar 2013 15:49:03 +0000 (15:49 +0000)]
Merge "Update processed linux/fs.h header file"

11 years agoUpdate processed linux/fs.h header file
Ken Sumrall [Fri, 22 Mar 2013 09:12:46 +0000 (02:12 -0700)]
Update processed linux/fs.h header file

Need to get the defintion of the FITRIM ioctl().  Also need
to update the blk_types.h header file as fs.h includes it.

Change-Id: I617622b620925942dc5aead9e49f8e17d17e5d74

11 years agoMerge "Remove some dead script code and fix a script comment."
Elliott Hughes [Mon, 25 Mar 2013 21:20:22 +0000 (21:20 +0000)]
Merge "Remove some dead script code and fix a script comment."

11 years agoRemove some dead script code and fix a script comment.
Elliott Hughes [Mon, 25 Mar 2013 21:09:52 +0000 (14:09 -0700)]
Remove some dead script code and fix a script comment.

Change-Id: I91ca466d1b6f8a39da50ce61acebc268d0daab3a

11 years agoMerge "Clarify the dlmalloc USAGE_ERROR."
Elliott Hughes [Mon, 25 Mar 2013 20:54:14 +0000 (20:54 +0000)]
Merge "Clarify the dlmalloc USAGE_ERROR."

11 years agoClarify the dlmalloc USAGE_ERROR.
Elliott Hughes [Mon, 25 Mar 2013 20:48:41 +0000 (13:48 -0700)]
Clarify the dlmalloc USAGE_ERROR.

Bug: 8468088
Change-Id: I1ff6d51ec17fc74ef56229aa76d2986cbd662874

11 years agoMerge "Stop generating <sys/linux-syscalls.h>."
Elliott Hughes [Mon, 25 Mar 2013 17:13:25 +0000 (17:13 +0000)]
Merge "Stop generating <sys/linux-syscalls.h>."

11 years agoMerge "Unhide __set_errno for backwards compatibility."
Elliott Hughes [Mon, 25 Mar 2013 17:12:19 +0000 (17:12 +0000)]
Merge "Unhide __set_errno for backwards compatibility."

11 years agoUnhide __set_errno for backwards compatibility.
Elliott Hughes [Sat, 23 Mar 2013 02:12:52 +0000 (19:12 -0700)]
Unhide __set_errno for backwards compatibility.

This was in <errno.h>, and people called it :-(

Change-Id: I038490be77eb9372b3f31305ec580fa7b09c983e

11 years agoStop generating <sys/linux-syscalls.h>.
Elliott Hughes [Sat, 23 Mar 2013 01:56:24 +0000 (18:56 -0700)]
Stop generating <sys/linux-syscalls.h>.

The <asm/unistd.h> files contain the canonical data, and
<sys/glibc-syscalls.h> contain new glibc-compatible names,
and if you #include the standard <sys/syscall.h> you get
both sets of names.

Change-Id: I9919c080931c0ba1660f5e37c6a6265ea716d603

11 years agoMerge "Use the correct names for the __ARM_NR_* syscalls."
Elliott Hughes [Fri, 22 Mar 2013 21:50:49 +0000 (21:50 +0000)]
Merge "Use the correct names for the __ARM_NR_* syscalls."

11 years agoUse the correct names for the __ARM_NR_* syscalls.
Elliott Hughes [Fri, 22 Mar 2013 20:50:44 +0000 (13:50 -0700)]
Use the correct names for the __ARM_NR_* syscalls.

This lets us move all the ARM syscall stubs over to the kernel <asm/unistd.h>.
Our generated <sys/linux-syscalls.h> is now unused, but I'll remove that in a
later change.

Change-Id: Ie5ff2cc4abce1938576af7cbaef615a79c7f310d

11 years agoMerge "Fix builds where _FORTIFY_SOURCE is off."
Elliott Hughes [Fri, 22 Mar 2013 18:01:50 +0000 (18:01 +0000)]
Merge "Fix builds where _FORTIFY_SOURCE is off."

11 years agoFix builds where _FORTIFY_SOURCE is off.
Elliott Hughes [Fri, 22 Mar 2013 17:58:55 +0000 (10:58 -0700)]
Fix builds where _FORTIFY_SOURCE is off.

Also add a more intention-revealing guard so we don't have loads of
places checking whether our inlining macro is defined.

Change-Id: I168860cedcfc798b07a5145bc48a125700265e47

11 years agoMerge "Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Elliott Hughes [Fri, 22 Mar 2013 17:51:42 +0000 (17:51 +0000)]
Merge "Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>."

11 years agoMerge "Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Elliott Hughes [Fri, 22 Mar 2013 16:30:56 +0000 (16:30 +0000)]
Merge "Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>."

11 years agoMerge "Replace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Elliott Hughes [Fri, 22 Mar 2013 16:30:36 +0000 (16:30 +0000)]
Merge "Replace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>."

11 years agoReplace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>.
Elliott Hughes [Fri, 22 Mar 2013 05:43:25 +0000 (22:43 -0700)]
Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

For some reason, socketcalls.c was only being compiled for ARM, where
it makes no sense. For x86 we generate stubs for the socket functions
that use __NR_socketcall directly.

Change-Id: I84181e6183fae2314ae3ed862276eba82ad21e8e

11 years agoReplace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>.
Elliott Hughes [Fri, 22 Mar 2013 05:52:25 +0000 (22:52 -0700)]
Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

Change-Id: I193a35f9790b82c83fd3b5672e24ac1b2034d0b0

11 years agoReplace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>.
Elliott Hughes [Fri, 22 Mar 2013 05:48:18 +0000 (22:48 -0700)]
Replace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

Change-Id: I9d016ee8e8329cccf244d27c336d9524348af996

11 years agoMerge "The SYS_ constants should cover all __NR_ values."
Elliott Hughes [Fri, 22 Mar 2013 05:39:05 +0000 (05:39 +0000)]
Merge "The SYS_ constants should cover all __NR_ values."

11 years agoThe SYS_ constants should cover all __NR_ values.
Elliott Hughes [Fri, 22 Mar 2013 05:15:06 +0000 (22:15 -0700)]
The SYS_ constants should cover all __NR_ values.

<sys/linux-syscalls.h> only contains constants for the syscalls
we're generating stubs for. We want all the syscalls available
on the architecture in question.

Keep using <sys/linux-syscalls.h> on ARM for now because the
__NR_ARM_set_tls and __NR_ARM_cacheflush values aren't in <asm/unistd.h>.

Change-Id: I66683950d87d9b18d6107d0acc0ed238a4496f44

11 years agoMerge "Fix pthread_setname_np's behavior on invalid pthread_ts."
Elliott Hughes [Fri, 22 Mar 2013 05:11:35 +0000 (05:11 +0000)]
Merge "Fix pthread_setname_np's behavior on invalid pthread_ts."

11 years agoFix pthread_setname_np's behavior on invalid pthread_ts.
Elliott Hughes [Fri, 22 Mar 2013 03:02:35 +0000 (20:02 -0700)]
Fix pthread_setname_np's behavior on invalid pthread_ts.

Change-Id: I0a154beaab4d164ac812f2564d12e4d79b80a8e8