OSDN Git Service

android-x86/bionic.git
11 years agox86_64: add new __NR_arch_prctl syscall
Pavel Chupin [Wed, 12 Dec 2012 09:18:50 +0000 (13:18 +0400)]
x86_64: add new __NR_arch_prctl syscall

This is used to set/get TLS on x86_64. There's no public declaration
of this because it's not meant to be used outside the C library, like
glibc (though we don't currently have any visibility controls to ensure
this).

Change-Id: I5fc0a5e3ffc3f4cd597d92ee685ab19568ea18f7
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoMerge "Regenerate the system call stubs (to get x86_64)."
Elliott Hughes [Tue, 1 Oct 2013 20:53:50 +0000 (20:53 +0000)]
Merge "Regenerate the system call stubs (to get x86_64)."

11 years agoRegenerate the system call stubs (to get x86_64).
Elliott Hughes [Tue, 1 Oct 2013 20:29:43 +0000 (13:29 -0700)]
Regenerate the system call stubs (to get x86_64).

This touches the x86 stubs too because arm, x86, and x86_64 now
all share the same header (at a source level), which causes a
reordering of the #include lines.

Change-Id: If9a1e2b2718bd41d8399fea748bce672c513ef84

11 years agoMerge "x86_64: Add x86_64 syscalls and tune gen scripts for x86_64"
Elliott Hughes [Tue, 1 Oct 2013 20:27:48 +0000 (20:27 +0000)]
Merge "x86_64: Add x86_64 syscalls and tune gen scripts for x86_64"

11 years agox86_64: Add x86_64 syscalls and tune gen scripts for x86_64
Pavel Chupin [Wed, 12 Dec 2012 09:11:48 +0000 (13:11 +0400)]
x86_64: Add x86_64 syscalls and tune gen scripts for x86_64

* Tune syscall stubs generator for 4th target: x86_64
* Update SYSCALLS.TXT with x86_64 syscalls:
 - Most of the x86 syscalls are equally supported
 - *32 syscalls are not supported on 64-bit
 - *64 syscalls are replaced accordingly without 64 suffix
 - Some syscalls are not supported, replaced with x86_64 analog

Syscalls are regenerated as separate patch for review convenience.

Change-Id: I4ea2e0f13759b0aa61f05208ca68da8d6bc7c048
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoMerge "Clean up some comments."
Elliott Hughes [Tue, 1 Oct 2013 18:10:54 +0000 (18:10 +0000)]
Merge "Clean up some comments."

11 years agoClean up some comments.
Elliott Hughes [Tue, 1 Oct 2013 18:06:56 +0000 (11:06 -0700)]
Clean up some comments.

Copyright headers shouldn't contain the filename (and especially
shouldn't contain a different file's filename).

Change-Id: I82690a3bf371265402bc16f5d2fbb9299c3a1926

11 years agoMerge "Better statfs/fstatfs glibc compatibility."
Elliott Hughes [Tue, 1 Oct 2013 15:30:40 +0000 (15:30 +0000)]
Merge "Better statfs/fstatfs glibc compatibility."

11 years agoMerge "Remove 32-bit assumptions from the ELF code."
Elliott Hughes [Tue, 1 Oct 2013 15:23:44 +0000 (15:23 +0000)]
Merge "Remove 32-bit assumptions from the ELF code."

11 years agoBetter statfs/fstatfs glibc compatibility.
Elliott Hughes [Tue, 1 Oct 2013 04:57:07 +0000 (21:57 -0700)]
Better statfs/fstatfs glibc compatibility.

Change-Id: I069d169c96cd71b75a045ec911fb4bd484c6b2c9

11 years agoMerge "Fix x86 build."
Elliott Hughes [Tue, 1 Oct 2013 02:23:02 +0000 (02:23 +0000)]
Merge "Fix x86 build."

11 years agoFix x86 build.
Elliott Hughes [Tue, 1 Oct 2013 02:20:02 +0000 (19:20 -0700)]
Fix x86 build.

Change-Id: I1f2d8189bec3d0e25d21ca7d7bd73fd02f8678e2

11 years agoRemove 32-bit assumptions from the ELF code.
Elliott Hughes [Tue, 1 Oct 2013 01:43:46 +0000 (18:43 -0700)]
Remove 32-bit assumptions from the ELF code.

Change-Id: I2c1f3d34c33685799aade8866eec44479ff9f963

11 years agoMerge "Add x86_64 to the bionic headers."
Elliott Hughes [Tue, 1 Oct 2013 01:42:43 +0000 (01:42 +0000)]
Merge "Add x86_64 to the bionic headers."

11 years agoAdd x86_64 to the bionic headers.
Elliott Hughes [Tue, 1 Oct 2013 00:41:08 +0000 (17:41 -0700)]
Add x86_64 to the bionic headers.

Manual changes:

  cpp.py: cope with macros that refer to other macros.

  defaults.py: x86 no longer always implies __i386__; use __i386__ to replace
  the kernel CONFIG_X86_32 flag.

  asm/page.h: the upstream page.h isn't a uapi header and no longer includes
  the stuff we were using it for. Let's just have our own static file, since
  it's the same for all our architectures (both 32- and 64-bit).

  sys/select.h: we used to use the various FD_SET-related macros from the
  kernel header files, but they've gone. Adjust by adding trivial equivalent
  definitions.

Automated changes:

  libc/kernel/arch-x86, libc/kernel/common: regenerated from
  external/kernel-headers.

Change-Id: I84fc0ed52dc742e043b4ae300fd3b58ee99b7fcd

11 years agoMerge "Fix inttypes.h and stdint.h for 64-bit (and C++11)."
Elliott Hughes [Mon, 30 Sep 2013 21:53:05 +0000 (21:53 +0000)]
Merge "Fix inttypes.h and stdint.h for 64-bit (and C++11)."

11 years agoFix inttypes.h and stdint.h for 64-bit (and C++11).
Elliott Hughes [Mon, 30 Sep 2013 21:46:47 +0000 (14:46 -0700)]
Fix inttypes.h and stdint.h for 64-bit (and C++11).

Change-Id: I394630348413c9aafcac137ce1ca5f0a93d9ab6f

11 years agoMerge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Andro...
Elliott Hughes [Fri, 27 Sep 2013 22:38:45 +0000 (22:38 +0000)]
Merge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications)."

11 years agoMerge "Fix unnecessary call to __strncpy_chk2"
Nick Kralevich [Fri, 27 Sep 2013 22:13:19 +0000 (22:13 +0000)]
Merge "Fix unnecessary call to __strncpy_chk2"

11 years agoFix unnecessary call to __strncpy_chk2
Nick Kralevich [Fri, 27 Sep 2013 20:21:24 +0000 (13:21 -0700)]
Fix unnecessary call to __strncpy_chk2

If "n" is smaller than the size of "src", then we'll
never read off the end of src. It makes no sense to call
__strncpy_chk2 in those circumstances.

For example, consider the following code:

int main() {
  char src[10];
  char dst[5];
  memcpy(src, "0123456789", sizeof(src));
  strncpy(dst, src, sizeof(dst));
  dst[4] = '\0';
  printf("%s\n", dst);
  return 0;
}

In this code, it's clear that the strncpy will never read off
the end of src.

Change-Id: I9cf58857a0c5216b4576d21d3c1625e2913ccc03

11 years agoMerge "libc: fortify recvfrom()"
Nick Kralevich [Fri, 27 Sep 2013 16:05:44 +0000 (16:05 +0000)]
Merge "libc: fortify recvfrom()"

11 years agoUpgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android...
Elliott Hughes [Fri, 27 Sep 2013 07:04:30 +0000 (00:04 -0700)]
Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications).

localtime.c and strftime.c are still quite different from upstream because of
our extensions, but the other files continue to be identical, and the two
exceptions should be otherwise identical.

From the tzcode2013e release notes:

  Changes affecting Godthab time stamps after 2037 if version mismatch

    Allow POSIX-like TZ strings where the transition time's hour can
    range from -167 through 167, instead of the POSIX-required 0
    through 24.  E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the
    new Fiji rules.  This is a more-compact way to represent
    far-future time stamps for America/Godthab, America/Santiago,
    Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem,
    Pacific/Easter, and Pacific/Fiji.  Other zones are unaffected by
    this change.  (Derived from a suggestion by Arthur David Olson.)

    Allow POSIX-like TZ strings where daylight saving time is in
    effect all year.  E.g., TZ='WART4WARST,J1/0,J365/25' for Western
    Argentina Summer Time all year.  This supports a more-compact way
    to represent the 2013d data for America/Argentina/San_Luis.
    Because of the change for San Luis noted above this change does not
    affect the current data.  (Thanks to Andrew Main (Zefram) for
    suggestions that improved this change.)

    Where these two TZ changes take effect, there is a minor extension
    to the tz file format in that it allows new values for the
    embedded TZ-format string, and the tz file format version number
    has therefore been increased from 2 to 3 as a precaution.
    Version-2-based client code should continue to work as before for
    all time stamps before 2038.  Existing version-2-based client code
    (tzcode, GNU/Linux, Solaris) has been tested on version-3-format
    files, and typically works in practice even for time stamps after
    2037; the only known exception is America/Godthab.

  Changes affecting API

    Support for floating-point time_t has been removed.
    It was always dicey, and POSIX no longer requires it.
    (Thanks to Eric Blake for suggesting to the POSIX committee to
    remove it, and thanks to Alan Barrett, Clive D.W. Feather, Andy
    Heninger, Arthur David Olson, and Alois Treindl, for reporting
    bugs and elucidating some of the corners of the old floating-point
    implementation.)

    The signatures of 'offtime', 'timeoff', and 'gtime' have been
    changed back to the old practice of using 'long' to represent UT
    offsets.  This had been inadvertently and mistakenly changed to
    'int_fast32_t'.  (Thanks to Christos Zoulos.)

    The code avoids undefined behavior on integer overflow in some
    more places, including gmtime, localtime, mktime and zdump.

  Changes affecting code internals

    Minor changes pacify GCC 4.7.3 and GCC 4.8.1.

  Changes affecting documentation and commentary

    Documentation and commentary is more careful to distinguish UT in
    general from UTC in particular.  (Thanks to Steve Allen.)

From the tzcode2013f release notes:

  Changes affecting API

    The types of the global variables 'timezone' and 'altzone' (if present)
    have been changed back to 'long'.  This is required for 'timezone'
    by POSIX, and for 'altzone' by common practice, e.g., Solaris 11.
    These variables were originally 'long' in the tz code, but were
    mistakenly changed to 'time_t' in 1987; nobody reported the
    incompatibility until now.  The difference matters on x32, where
    'long' is 32 bits and 'time_t' is 64.  (Thanks to Elliott Hughes.)

Change-Id: I14937c42a391ddb865e4d89f0783961bcc6baa21

11 years agoMerge "Upgrade to tzdata2013f."
Elliott Hughes [Fri, 27 Sep 2013 06:30:00 +0000 (06:30 +0000)]
Merge "Upgrade to tzdata2013f."

11 years agoUpgrade to tzdata2013f.
Elliott Hughes [Fri, 27 Sep 2013 06:22:23 +0000 (23:22 -0700)]
Upgrade to tzdata2013f.

From the release notes:

  Changes affecting near-future time stamps

    Tocantins will very likely not observe DST starting this spring.
    (Thanks to Steffen Thorsen.)

    Jordan will likely stay at UTC+3 indefinitely, and will not fall
    back this fall.

    Palestine will fall back at 00:00, not 01:00.  (Thanks to Steffen Thorsen.)

Change-Id: Iccee57578eef2ab51c519a23f151bc1963262ffe

11 years agoMerge "Upgrade to tzdata2013e."
Elliott Hughes [Fri, 27 Sep 2013 06:20:18 +0000 (06:20 +0000)]
Merge "Upgrade to tzdata2013e."

11 years agoUpgrade to tzdata2013e.
Elliott Hughes [Fri, 27 Sep 2013 05:41:09 +0000 (22:41 -0700)]
Upgrade to tzdata2013e.

From the release notes:

  Changes affecting near-future time stamps

    This year Fiji will start DST on October 27, not October 20.
    (Thanks to David Wheeler for the heads-up.)  For now, guess that
    Fiji will continue to spring forward the Sunday before the fourth
    Monday in October.

  Changes affecting time stamps before 1970

    Pacific/Johnston is now a link to Pacific/Honolulu.  This corrects
    some errors before 1947.

    Some zones have been turned into links, when they differ from
    existing zones only in older data that was likely invented or that
    differs only in LMT or transition from LMT.  These changes affect
    only time stamps before 1943.  The affected zones are:
    Africa/Juba, America/Anguilla, America/Aruba, America/Dominica,
    America/Grenada, America/Guadeloupe, America/Marigot,
    America/Montserrat, America/St_Barthelemy, America/St_Kitts,
    America/St_Lucia, America/St_Thomas, America/St_Vincent,
    America/Tortola, and Europe/Vaduz.  (Thanks to Alois Treindl for
    confirming that the old Europe/Vaduz zone was wrong and the new
    link is better for WWII-era times.)

    Change Kingston Mean Time from -5:07:12 to -5:07:11.  This affects
    America/Cayman, America/Jamaica and America/Grand_Turk time stamps
    from 1890 to 1912.

    Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46.
    This affects Europe/Zurich time stamps from 1853 to 1894.  (Thanks
    to Alois Treindl).

    Change the date of the circa-1850 Zurich transition from 1849-09-12
    to 1853-07-16, overriding Shanks with data from Messerli about
    postal and telegraph time in Switzerland.

  Data changes affecting behavior of tzselect and similar programs

    Country code BQ is now called the more-common name "Caribbean Netherlands"
    rather than the more-official "Bonaire, St Eustatius & Saba".

    Remove from zone.tab the names America/Montreal, America/Shiprock,
    and Antarctica/South_Pole, as they are equivalent to existing
    same-country-code zones for post-1970 time stamps.  The data for
    these names are unchanged, so the names continue to work as before.

Change-Id: If78a517687532afcc0b22c7df664b5955f6e1564

11 years agoMerge "Make it easier to add syscalls for another architecture."
Elliott Hughes [Thu, 26 Sep 2013 15:59:32 +0000 (15:59 +0000)]
Merge "Make it easier to add syscalls for another architecture."

11 years agoMake it easier to add syscalls for another architecture.
Elliott Hughes [Thu, 26 Sep 2013 05:43:36 +0000 (22:43 -0700)]
Make it easier to add syscalls for another architecture.

Much of the per-architecture duplication can be removed, so let's do so
before we add the 64-bit architectures.

Change-Id: Ieb796503c8e5353ea38c3bab768bb9a690c9a767

11 years agoMerge "Add a unit test for %n."
Elliott Hughes [Thu, 26 Sep 2013 05:10:27 +0000 (05:10 +0000)]
Merge "Add a unit test for %n."

11 years agoMerge "Update capability.h"
Michael Wright [Wed, 25 Sep 2013 23:29:32 +0000 (23:29 +0000)]
Merge "Update capability.h"

11 years agoUpdate capability.h
Michael Wright [Wed, 25 Sep 2013 21:55:55 +0000 (14:55 -0700)]
Update capability.h

To upstream SHA 6e4664525b1db28f8c4e1130957f70a94c19213e (v3.11)

Change-Id: Ic0d95464bc9001246df898489b2ea603a97ca231

11 years agoAdd a unit test for %n.
Elliott Hughes [Wed, 25 Sep 2013 01:01:33 +0000 (18:01 -0700)]
Add a unit test for %n.

Change-Id: I9335e089d66c98d34577f5e1d1a54b8f507b94f6

11 years agolibc: fortify recvfrom()
Nick Kralevich [Tue, 24 Sep 2013 23:32:07 +0000 (16:32 -0700)]
libc: fortify recvfrom()

Fortify calls to recv() and recvfrom().

We use __bos0 to match glibc's behavior, and because I haven't
tested using __bos.

Change-Id: Iad6ae96551a89af17a9c347b80cdefcf2020c505

11 years agoMerge "Simplify the SYSCALLS.TXT format."
Elliott Hughes [Tue, 24 Sep 2013 18:25:50 +0000 (18:25 +0000)]
Merge "Simplify the SYSCALLS.TXT format."

11 years agoMerge "Update taskstats.h from Linux 3.11.1"
Elliott Hughes [Tue, 24 Sep 2013 14:29:29 +0000 (14:29 +0000)]
Merge "Update taskstats.h from Linux 3.11.1"

11 years agoSimplify the SYSCALLS.TXT format.
Elliott Hughes [Tue, 24 Sep 2013 07:30:25 +0000 (00:30 -0700)]
Simplify the SYSCALLS.TXT format.

This will make addition of new architectures less unpleasant.

Change-Id: I77c866a63b686e8e70709d08fcf52e8a2d37310a

11 years agoMerge "Fix %hhd formats in the printf family."
Elliott Hughes [Mon, 23 Sep 2013 23:33:59 +0000 (23:33 +0000)]
Merge "Fix %hhd formats in the printf family."

11 years agoFix %hhd formats in the printf family.
Elliott Hughes [Mon, 23 Sep 2013 23:02:39 +0000 (16:02 -0700)]
Fix %hhd formats in the printf family.

Found by adapting the simple unit tests for libc logging to test
snprintf too. Fix taken from upstream OpenBSD without updating
the rest of stdio.

Change-Id: Ie339a8e9393a36080147aae4d6665118e5d93647

11 years agoMerge "Remove two -D flags for unused macros."
Elliott Hughes [Mon, 23 Sep 2013 18:14:57 +0000 (18:14 +0000)]
Merge "Remove two -D flags for unused macros."

11 years agoRemove two -D flags for unused macros.
Elliott Hughes [Mon, 23 Sep 2013 18:12:09 +0000 (11:12 -0700)]
Remove two -D flags for unused macros.

Change-Id: Ia95b0f0e2003cadd875e84437afa1853c8fe2598

11 years agoUpdate taskstats.h from Linux 3.11.1
Sami Kyostila [Fri, 20 Sep 2013 17:25:29 +0000 (18:25 +0100)]
Update taskstats.h from Linux 3.11.1

Change-Id: I50853efe20fa2524f6288f78505a774a72071367

11 years agoMerge "__memcpy_chk: Fix signed cmp of unsigned values."
Christopher Ferris [Sat, 21 Sep 2013 03:36:30 +0000 (03:36 +0000)]
Merge "__memcpy_chk: Fix signed cmp of unsigned values."

11 years ago__memcpy_chk: Fix signed cmp of unsigned values.
Christopher Ferris [Tue, 10 Sep 2013 23:56:34 +0000 (16:56 -0700)]
__memcpy_chk: Fix signed cmp of unsigned values.

I accidentally did a signed comparison of the size_t values passed in
for three of the _chk functions. Changing them to unsigned compares.

Add three new tests to verify this failure is fixed.

Bug: 10691831

Merge from internal master.

(cherry-picked from 883ef2499c2ff76605f73b1240f719ca6282e554)

Change-Id: Id9a96b549435f5d9b61dc132cf1082e0e30889f5

11 years agoMerge "Fix all debug directives."
Christopher Ferris [Sat, 21 Sep 2013 02:38:46 +0000 (02:38 +0000)]
Merge "Fix all debug directives."

11 years agoFix all debug directives.
Christopher Ferris [Wed, 21 Aug 2013 16:41:12 +0000 (09:41 -0700)]
Fix all debug directives.

The backtrace when a fortify check failed was not correct. This change
adds all of the necessary directives to get a correct backtrace.

Fix the strcmp directives and change all labels to local labels.

Testing:
- Verify that the runtime can decode the stack for __memcpy_chk, __memset_chk,
  __strcpy_chk, __strcat_chk fortify failures.
- Verify that gdb can decode the stack properly when hitting a fortify check.
- Verify that the runtime can decode the stack for a seg fault for all of the
  _chk functions and for memcpy/memset.
- Verify that gdb can decode the stack for a seg fault for all of the _chk
  functions and for memcpy/memset.
- Verify that the runtime can decode the stack for a seg fault for strcmp.
- Verify that gdb can decode the stack for a seg fault in strcmp.

Bug: 10342460
Bug: 10345269

Merge from internal master.

(cherry-picked from 05332f2ce7e542d32ff4d5cd9f60248ad71fbf0d)

Change-Id: Ibc919b117cfe72b9ae97e35bd48185477177c5ca

11 years agoMerge "Update all debug directives."
Christopher Ferris [Sat, 21 Sep 2013 01:58:56 +0000 (01:58 +0000)]
Merge "Update all debug directives."

11 years agoUpdate all debug directives.
Christopher Ferris [Tue, 20 Aug 2013 18:20:48 +0000 (11:20 -0700)]
Update all debug directives.

The libcorkscrew stack unwinder does not understand cfi directives,
so add .save directives so that it can function properly.

Also add the directives in to strcmp.S and fix a missing set of
directives in cortex-a9/memcpy_base.S.

Bug: 10345269

Merge from internal master.

(cherry-picked from 5f7ccea3ffab05aeceecb85c821003cf580630d3)

Change-Id: If48a216203216a643807f5d61906015984987189

11 years agoMerge "Add linux/sock_diag.h"
Nick Kralevich [Fri, 20 Sep 2013 15:20:03 +0000 (15:20 +0000)]
Merge "Add linux/sock_diag.h"

11 years agoMerge "Ensure we have the off64_t variant of every function that takes an off_t."
Elliott Hughes [Fri, 20 Sep 2013 00:37:28 +0000 (00:37 +0000)]
Merge "Ensure we have the off64_t variant of every function that takes an off_t."

11 years agoAdd linux/sock_diag.h
Nick Kralevich [Thu, 19 Sep 2013 23:43:58 +0000 (16:43 -0700)]
Add linux/sock_diag.h

This file was generated using bionic/libc/kernel/tools/update_all.py

Change-Id: Iad33e96253978ed9a76d429d66eed9f245685c10

11 years agoEnsure we have the off64_t variant of every function that takes an off_t.
Elliott Hughes [Thu, 19 Sep 2013 23:27:24 +0000 (16:27 -0700)]
Ensure we have the off64_t variant of every function that takes an off_t.

Change-Id: Ib2eee0cf13162be3b62559b84e90c6dcf5aab1c3

11 years agoMerge "Add mmap64()"
Elliott Hughes [Thu, 19 Sep 2013 21:22:42 +0000 (21:22 +0000)]
Merge "Add mmap64()"

11 years agoAdd mmap64()
Daniel Leung [Wed, 18 Sep 2013 21:41:18 +0000 (14:41 -0700)]
Add mmap64()

This adds mmap64() to bionic so that it is possible to have
large offset passed to kernel. However, the syscall mechanism
only passes 32-bit number to kernel. So effectively, the
largest offset that can be passed is about 43 bits (since
offset is signed, and the number passed to kernel is number
of pages (page size == 4K => 12 bits)).

Change-Id: Ib54f4e9b54acb6ef8b0324f3b89c9bc810b07281
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
11 years agoMerge "Fix host tests that need the shell."
Elliott Hughes [Thu, 19 Sep 2013 19:04:10 +0000 (19:04 +0000)]
Merge "Fix host tests that need the shell."

11 years agoMerge "Declare __page_shift and __page_size with C linkage."
Elliott Hughes [Thu, 19 Sep 2013 19:03:18 +0000 (19:03 +0000)]
Merge "Declare __page_shift and __page_size with C linkage."

11 years agoDeclare __page_shift and __page_size with C linkage.
Bernhard Rosenkraenzer [Wed, 18 Sep 2013 21:29:08 +0000 (23:29 +0200)]
Declare __page_shift and __page_size with C linkage.

__page_shift and __page_size were accidentally declared in unistd.h with
C linkage - their implementation needs to use the same linkage.

Going forward, though, let's stop the inlining madness and let's kill
the non-standard __getpageshift(). This patch takes getpagesize(3) out
of line and removes __getpageshift but fixes __page_shift and __page_size
for backwards binary compatibility.

Change-Id: I35ed66a08989ced1db422eb03e4d154a5d6b5bda
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
11 years agoMerge "Fix mismatch between declaration and forward declaration"
Elliott Hughes [Thu, 19 Sep 2013 18:41:05 +0000 (18:41 +0000)]
Merge "Fix mismatch between declaration and forward declaration"

11 years agoFix host tests that need the shell.
Elliott Hughes [Thu, 19 Sep 2013 18:28:20 +0000 (11:28 -0700)]
Fix host tests that need the shell.

By making the /system/bin/sh available.

Change-Id: I99200c1ddc922a2f6b5cea8ff2da98aedbe70e7b

11 years agoMerge "Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata."
Elliott Hughes [Thu, 19 Sep 2013 18:19:00 +0000 (18:19 +0000)]
Merge "Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata."

11 years agoUse $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
Elliott Hughes [Thu, 19 Sep 2013 02:25:28 +0000 (19:25 -0700)]
Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.

This lets us run binaries linked against bionic on an x86 host.

Change-Id: Icd60cf99a90d747c77304c05b4f764e4d26af985

11 years agoMerge "Update netlink.h from tip-of-tree external/kernel-headers"
Nick Kralevich [Thu, 19 Sep 2013 04:04:06 +0000 (04:04 +0000)]
Merge "Update netlink.h from tip-of-tree external/kernel-headers"

11 years agoMerge "Add bionic-unit-tests-run-on-host special target"
Elliott Hughes [Thu, 19 Sep 2013 02:16:00 +0000 (02:16 +0000)]
Merge "Add bionic-unit-tests-run-on-host special target"

11 years agoAdd bionic-unit-tests-run-on-host special target
Pavel Chupin [Fri, 6 Sep 2013 14:43:27 +0000 (18:43 +0400)]
Add bionic-unit-tests-run-on-host special target

Allows running the tests linked with bionic .so on the host if host and
target are compatible. See more comments and usage limitation inlined.

make bionic-unit-tests-run-on-host should do build and run.

Change-Id: I5946fa72e009d324baa9da18f460294b3c1a615e
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoUpdate netlink.h from tip-of-tree external/kernel-headers
Nick Kralevich [Thu, 19 Sep 2013 00:14:02 +0000 (17:14 -0700)]
Update netlink.h from tip-of-tree external/kernel-headers

This file was generated using bionic/libc/kernel/tools/update_all.py

The only change is a new netlink.h file, from external/kernel-headers.
Please see the commit message there for details.

Change-Id: I83645b88f0baff838131197913ebd70be69abd3f

11 years agoFix mismatch between declaration and forward declaration
Bernhard Rosenkraenzer [Wed, 18 Sep 2013 21:37:00 +0000 (23:37 +0200)]
Fix mismatch between declaration and forward declaration

KernelArgumentBlock is defined as a class in KernelArgumentBlock.h, but
forward declarations refer to it as a struct.

While this is essentially the same, the mismatch causes a compiler
warning in clang (and may cause warnings in future versions of gcc) in
code that is supposed to be compiled with -Werror.

Change-Id: I4ba49d364c44d0a42c276aff3a8098300dbdcdf0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
11 years agoMerge "Simplify main thread stack size initialization"
Brian Carlstrom [Sat, 14 Sep 2013 00:00:41 +0000 (00:00 +0000)]
Merge "Simplify main thread stack size initialization"

11 years agoMerge "Use kernel default for initial thread size"
Brian Carlstrom [Sat, 14 Sep 2013 00:00:33 +0000 (00:00 +0000)]
Merge "Use kernel default for initial thread size"

11 years agoSimplify main thread stack size initialization
Brian Carlstrom [Fri, 13 Sep 2013 23:34:43 +0000 (16:34 -0700)]
Simplify main thread stack size initialization

Change-Id: Iec09433d9de501031cce09dc75848a5e8f3d96bf

11 years agoUse kernel default for initial thread size
Brian Carlstrom [Fri, 13 Sep 2013 04:47:20 +0000 (21:47 -0700)]
Use kernel default for initial thread size

Bug: 10697851

Change-Id: I8d980f5e0b584799536f6e6b891056c968d26cdf

11 years agoMerge "Add the dl_iterate_phdr function to libdl for arm."
Christopher Ferris [Fri, 6 Sep 2013 17:52:35 +0000 (17:52 +0000)]
Merge "Add the dl_iterate_phdr function to libdl for arm."

11 years agoAdd the dl_iterate_phdr function to libdl for arm.
Christopher Ferris [Tue, 20 Aug 2013 00:45:09 +0000 (17:45 -0700)]
Add the dl_iterate_phdr function to libdl for arm.

Bug: 8410085

Merge from internal master.

(cherry-picked from cb491bc66dc0abc145930b09086eb9189a30f6c2)

Change-Id: I94ed51bc5d4c626df7552c0e85c31ccee2d6568f

11 years agoMerge "Avoid segfaults if properties are not initialized"
Elliott Hughes [Tue, 3 Sep 2013 21:07:15 +0000 (21:07 +0000)]
Merge "Avoid segfaults if properties are not initialized"

11 years agoMerge "Fix strchr for basic non-sse case on x86"
Elliott Hughes [Tue, 3 Sep 2013 21:03:39 +0000 (21:03 +0000)]
Merge "Fix strchr for basic non-sse case on x86"

11 years agoFix strchr for basic non-sse case on x86
Pavel Chupin [Fri, 26 Jul 2013 12:50:11 +0000 (16:50 +0400)]
Fix strchr for basic non-sse case on x86

Fix source location. Move declaration of __strchr_chk out of
ifdef __BIONIC_FORTIFY which should be available for strchr.cpp
compilation when __BIONIC_FORTIFY is not defined.

Change-Id: I552a6e16656e59b276b322886cfbf57bbfb2e6a7
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoAvoid segfaults if properties are not initialized
Pavel Chupin [Fri, 9 Aug 2013 15:17:55 +0000 (19:17 +0400)]
Avoid segfaults if properties are not initialized

Null or constant dereferencing occurs if properties are not initialized.
On Android devices it shouldn't happen but can be faced if testing bionic
libc.so on Linux host.

Change-Id: I8f047cbe17d0e7bcde40ace000a8aa53789c16cb
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoMerge "Move stack unwinding test into library."
Christopher Ferris [Thu, 29 Aug 2013 21:13:21 +0000 (21:13 +0000)]
Merge "Move stack unwinding test into library."

11 years agoMove stack unwinding test into library.
Christopher Ferris [Thu, 29 Aug 2013 18:37:33 +0000 (11:37 -0700)]
Move stack unwinding test into library.

Bug: 8291716
Change-Id: Ia270f074b574a8fe86b5ad435bdef80999c64295

11 years agoMerge "cdefs.h: introduce __bos0"
Nick Kralevich [Wed, 28 Aug 2013 21:31:55 +0000 (21:31 +0000)]
Merge "cdefs.h: introduce __bos0"

11 years agocdefs.h: introduce __bos0
Nick Kralevich [Wed, 28 Aug 2013 20:22:52 +0000 (13:22 -0700)]
cdefs.h: introduce __bos0

Introduce __bos0 as a #define for __builtin_object_size((s), 0).
This macro is intended to be used for places where the standard
__bos macro isn't appropriate.

memcpy, memmove, and memset deliberately use __bos0. This is done
for two reasons:

1) I haven't yet tested to see if __bos is safe to use.
2) glibc uses __bos0 for these methods.

Change-Id: Ifbe02efdb10a72fe3529dbcc47ff647bde6feeca

11 years agoMerge "FORTIFY_SOURCE: introduce __strncpy_chk2"
Nick Kralevich [Wed, 28 Aug 2013 20:04:06 +0000 (20:04 +0000)]
Merge "FORTIFY_SOURCE: introduce __strncpy_chk2"

11 years agoFORTIFY_SOURCE: introduce __strncpy_chk2
Nick Kralevich [Wed, 28 Aug 2013 17:47:43 +0000 (10:47 -0700)]
FORTIFY_SOURCE: introduce __strncpy_chk2

This change detects programs reading beyond the end of "src" when
calling strncpy.

Change-Id: Ie1b42de923385d62552b22c27b2d4713ab77ee03

11 years agoMerge "Change hard-coded directory."
Christopher Ferris [Wed, 28 Aug 2013 00:35:11 +0000 (00:35 +0000)]
Merge "Change hard-coded directory."

11 years agoChange hard-coded directory.
Christopher Ferris [Wed, 28 Aug 2013 00:21:37 +0000 (17:21 -0700)]
Change hard-coded directory.

The tests are using /data/data which is not accessible to a non-root
user. Change this to /data/local/tmp which is accessible to all users.

Bug: 8291716

Change-Id: I66476bbbaf5d1dc0c103863abf9219405f06a85b

11 years agoMerge "Create bionic unit test library for use with CTS."
Christopher Ferris [Wed, 28 Aug 2013 00:19:06 +0000 (00:19 +0000)]
Merge "Create bionic unit test library for use with CTS."

11 years agoMerge "Delete CAVEATS / fix spelling."
Nick Kralevich [Wed, 28 Aug 2013 00:06:19 +0000 (00:06 +0000)]
Merge "Delete CAVEATS / fix spelling."

11 years agoDelete CAVEATS / fix spelling.
Nick Kralevich [Tue, 27 Aug 2013 23:35:01 +0000 (16:35 -0700)]
Delete CAVEATS / fix spelling.

Change-Id: I0ed504271b7c2e4434d0d5f53bc10335c8cf7b5b

11 years agoCreate bionic unit test library for use with CTS.
Christopher Ferris [Tue, 27 Aug 2013 21:32:15 +0000 (14:32 -0700)]
Create bionic unit test library for use with CTS.

Bug: 8291716

Change-Id: I46b749348456fae7892eecca6b44aef51a0e4747

11 years agoMerge "Add explicit -m32/-melf_i386 for x86 target"
Elliott Hughes [Mon, 26 Aug 2013 17:05:31 +0000 (17:05 +0000)]
Merge "Add explicit -m32/-melf_i386 for x86 target"

11 years agoMerge "Change how DNS resolver handle no default iface"
Robert Greenwalt [Sat, 24 Aug 2013 12:35:08 +0000 (12:35 +0000)]
Merge "Change how DNS resolver handle no default iface"

11 years agoAdd explicit -m32/-melf_i386 for x86 target
Pavel Chupin [Fri, 16 Aug 2013 14:11:13 +0000 (18:11 +0400)]
Add explicit -m32/-melf_i386 for x86 target

Required for x86 build with multilib compiler.

Change-Id: Iac71cdc3461df6fb48cb2a7b713324ca368e6704
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
11 years agoChange how DNS resolver handle no default iface
Robert Greenwalt [Thu, 22 Aug 2013 23:56:48 +0000 (16:56 -0700)]
Change how DNS resolver handle no default iface

We used to just try any iface we'd been told about as a
fallback, but that will end up mistakenly using a secondary
network's dns when we really don't have a default connection.

It also messed up our detection of whether we were doing the
lookup on the default or not (we'd get back our secondary net
iface as the default, do the compare and think we were on default).

Remove the lies and let dns fail if we don't have an iface for it.

bug:10132565
Change-Id: I5f0f2abacaaaaf23c5292b20fba9d8dcb6fb10c5

11 years agoMerge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."
Elliott Hughes [Thu, 22 Aug 2013 21:27:55 +0000 (21:27 +0000)]
Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."

11 years agoApply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
Elliott Hughes [Thu, 22 Aug 2013 21:13:50 +0000 (14:13 -0700)]
Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.

Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Aug 22 12:47:51 2013 -0700

    * localtime.c: Fix another integer overflow bug in mktime.

    (time2sub): Avoid undefined behavior on time_t overflow.
    Reported by Elliott Hughes in
    <http://mm.icann.org/pipermail/tz/2013-August/019580.html>.

Bug: 10310929
Change-Id: I3bf26f1f91371552e0a3828457d27e22af55acb2

11 years agoMerge "Work around tzcode's reliance on signed overflow."
Elliott Hughes [Thu, 22 Aug 2013 19:22:16 +0000 (19:22 +0000)]
Merge "Work around tzcode's reliance on signed overflow."

11 years agoWork around tzcode's reliance on signed overflow.
Elliott Hughes [Thu, 22 Aug 2013 18:37:32 +0000 (11:37 -0700)]
Work around tzcode's reliance on signed overflow.

I've mailed the tz list about this, and will switch to whatever upstream
fix comes along as soon as it's available.

Bug: 10310929
Change-Id: I36bf3fcf11f5ac9b88137597bac3487a7bb81b0f

11 years agoMerge "Make mips_relocate_got tolerate a missing got"
Brian Carlstrom [Wed, 21 Aug 2013 17:25:48 +0000 (17:25 +0000)]
Merge "Make mips_relocate_got tolerate a missing got"

11 years agoMake mips_relocate_got tolerate a missing got
Brian Carlstrom [Wed, 21 Aug 2013 04:05:44 +0000 (21:05 -0700)]
Make mips_relocate_got tolerate a missing got

Bug: 10094803

(cherry picked from commit 7ee26878065abb494600595349ce58b2b2db3709)

Change-Id: Ib15bccecaee421dc463d46a3956b054051708759

11 years agoMerge "Change hard-coded temporary directory."
Christopher Ferris [Fri, 16 Aug 2013 03:13:42 +0000 (03:13 +0000)]
Merge "Change hard-coded temporary directory."

11 years agoMerge "Fix pthread_getcpuclockid."
Elliott Hughes [Thu, 15 Aug 2013 22:34:58 +0000 (22:34 +0000)]
Merge "Fix pthread_getcpuclockid."

11 years agoFix pthread_getcpuclockid.
Jeff Hao [Thu, 15 Aug 2013 21:51:16 +0000 (14:51 -0700)]
Fix pthread_getcpuclockid.

clock_gettime was returning EINVAL for the values
produced by pthread_getcpuclockid.

Bug: 10346183
Change-Id: Iabe643d7d46110bb311a0367aa0fc737f653208e