OSDN Git Service

android-x86/bionic.git
11 years agoRevert "Add SIZE_MAX to <stdint.h> in a way that might actually work."
Elliott Hughes [Wed, 12 Jun 2013 22:18:47 +0000 (22:18 +0000)]
Revert "Add SIZE_MAX to <stdint.h> in a way that might actually work."

This reverts commit d8627af159c6b1bc40296fb29297c61b30a5a8e2 which caused build breakage:

In file included from bionic/libc/include/limits.h:86:0,
                 from bionic/libc/include/stdint.h:33,
                 from bionic/libc/arch-arm/bionic/crtbegin.c:31:
bionic/libc/include/sys/limits.h:30:26: fatal error: linux/limits.h: No such file or directory
compilation terminated.
make: *** [out/target/product/generic/obj/lib/crtbegin_dynamic1.o] Error 1

Change-Id: I128095ecb99df92626e1f57e34c61e08c98a4078

11 years agoAdd SIZE_MAX to <stdint.h> in a way that might actually work.
Elliott Hughes [Wed, 12 Jun 2013 21:54:16 +0000 (14:54 -0700)]
Add SIZE_MAX to <stdint.h> in a way that might actually work.

Take two.

Change-Id: I7d08b6d14c82a171312a7f5898270b4441d5cfa2

11 years agoMerge "<stdint.h> should expose SIZE_MAX."
Elliott Hughes [Wed, 12 Jun 2013 17:56:23 +0000 (17:56 +0000)]
Merge "<stdint.h> should expose SIZE_MAX."

11 years ago<stdint.h> should expose SIZE_MAX.
Elliott Hughes [Wed, 12 Jun 2013 17:28:26 +0000 (10:28 -0700)]
<stdint.h> should expose SIZE_MAX.

Change-Id: Id27222c24955c83f29ad953933cbdc48b6f1e900

11 years agoMerge "fix unittests."
Nick Kralevich [Tue, 11 Jun 2013 22:52:54 +0000 (22:52 +0000)]
Merge "fix unittests."

11 years agofix unittests.
Nick Kralevich [Tue, 11 Jun 2013 22:45:23 +0000 (15:45 -0700)]
fix unittests.

7e6ce1a3c52d8533fed92c143419fedb0c93988a fixed abort() to raise
SIGABRT rather than causing SIGSEGV. However, the unittests were
not updated.

Fix unittests.

Change-Id: I73db194127b9b9e9440358aa94273863765a736b

11 years agoMerge "Fix abort(3) to raise SIGABRT rather than causing SIGSEGV."
Ben Cheng [Tue, 11 Jun 2013 00:22:14 +0000 (00:22 +0000)]
Merge "Fix abort(3) to raise SIGABRT rather than causing SIGSEGV."

11 years agoFix abort(3) to raise SIGABRT rather than causing SIGSEGV.
Ben Cheng [Tue, 11 Jun 2013 00:01:41 +0000 (17:01 -0700)]
Fix abort(3) to raise SIGABRT rather than causing SIGSEGV.

tgkill() needs the .save stack unwinding directive to get the complete
stack trace.

BUG: https://code.google.com/p/android/issues/detail?id=16672

Change-Id: Ifb447dca2147a592c48baf32769dfc175d8aea72

11 years agoMerge "Honor p_vaddr if set"
Brian Carlstrom [Mon, 10 Jun 2013 22:39:06 +0000 (22:39 +0000)]
Merge "Honor p_vaddr if set"

11 years agoMerge "bionic/x86: Optimization for string routines"
Elliott Hughes [Sat, 8 Jun 2013 00:45:07 +0000 (00:45 +0000)]
Merge "bionic/x86: Optimization for string routines"

11 years agoMerge "Revert "libc x86: Remove strcat.S""
Elliott Hughes [Sat, 8 Jun 2013 00:42:44 +0000 (00:42 +0000)]
Merge "Revert "libc x86: Remove strcat.S""

11 years agoRevert "libc x86: Remove strcat.S"
Elliott Hughes [Sat, 8 Jun 2013 00:42:35 +0000 (00:42 +0000)]
Revert "libc x86: Remove strcat.S"

This reverts commit 4fe461b3a67148a2f557605e10a34deff9c8773a

Change-Id: Ibeb76e24f054abd7c96ad6899366c2f9bfc2a5ad

11 years agoMerge "Implement malloc_usable_size for debug impls."
Christopher Ferris [Fri, 7 Jun 2013 22:15:33 +0000 (22:15 +0000)]
Merge "Implement malloc_usable_size for debug impls."

11 years agoImplement malloc_usable_size for debug impls.
Christopher Ferris [Wed, 22 May 2013 00:48:01 +0000 (17:48 -0700)]
Implement malloc_usable_size for debug impls.

- Implemented chk_memalign.
- Fixed a few bugs in leak_memalign.
- Implemented {leak,fill,check,qemu}_malloc_usable_size.
- Make malloc_usable_size update at run time.
- Add malloc_test.cpp as a small set of tests for the
  malloc debug routines.
- Fix the qemu routines since it's been broken since it moved to C++.
- Add support for the %u format to the out_vformat in libc_logging.cpp.
  This is used by the emulator code.

Tested using the bionic-unit-tests with setprop libc.debug.malloc
set to 1, 5, and 10.

I tested as much as possible on the emulator, but tracing doesn't appear
to be working properly.

Bug: 6143477

Merge change from internal master.

(cherry-picked from commit 3d594c258045783fc9e1956ce7a4d91e302f011e)

Change-Id: I4ae00fffba82315a8c283f35893fd554460722fb

11 years agoHonor p_vaddr if set
Brian Carlstrom [Fri, 11 Jan 2013 00:39:58 +0000 (16:39 -0800)]
Honor p_vaddr if set

(cherry picked from commit 88ff15c2c279d2bbe3569101b36cd2aa0931a0a9)

Change-Id: I4aabbe911d30aea8ace69e29bb6e980a4e89de90

11 years agoMerge "update signal.h to be C90 compatable"
Elliott Hughes [Thu, 6 Jun 2013 01:06:40 +0000 (01:06 +0000)]
Merge "update signal.h to be C90 compatable"

11 years agoupdate signal.h to be C90 compatable
Erik Gilling [Wed, 29 May 2013 23:26:23 +0000 (16:26 -0700)]
update signal.h to be C90 compatable

sigismember, sigaddset, and sigdelset had mixed code and declarations
which are not allowed in C90 and before.

Change-Id: I662af944fc1489e34bed228ce592e41f50d00e17
Signed-off-by: Erik Gilling <konkers@android.com>
11 years agoMerge "Ensure header files using __BEGIN_DECLS include sys/cdefs.h."
Elliott Hughes [Thu, 6 Jun 2013 01:04:13 +0000 (01:04 +0000)]
Merge "Ensure header files using __BEGIN_DECLS include sys/cdefs.h."

11 years agoEnsure header files using __BEGIN_DECLS include sys/cdefs.h.
Elliott Hughes [Thu, 6 Jun 2013 00:51:20 +0000 (17:51 -0700)]
Ensure header files using __BEGIN_DECLS include sys/cdefs.h.

We keep fixing these one-by-one; let's fix them all at once.

Found thus:

  find . -name *.h | xargs grep -L sys/cdefs.h | xargs grep -l BEGIN_DECL | xargs grep -L sys/types

Change-Id: I188842aa2484dc6176e96556d57c38a0f785b59b

11 years agoMerge "sys/personality.h: include <sys/cdefs.h>"
Elliott Hughes [Thu, 6 Jun 2013 00:28:07 +0000 (00:28 +0000)]
Merge "sys/personality.h: include <sys/cdefs.h>"

11 years agoMerge "Clean up useless declaration in thread_private.h"
Elliott Hughes [Thu, 6 Jun 2013 00:00:40 +0000 (00:00 +0000)]
Merge "Clean up useless declaration in thread_private.h"

11 years agosys/personality.h: include <sys/cdefs.h>
Kito Cheng [Wed, 5 Jun 2013 03:30:17 +0000 (11:30 +0800)]
sys/personality.h: include <sys/cdefs.h>

Change-Id: Ia3fa558a38e0cffe5287bc454e85d5d3bdaa6ba1

11 years agoClean up useless declaration in thread_private.h
Kito Cheng [Fri, 3 May 2013 02:31:17 +0000 (10:31 +0800)]
Clean up useless declaration in thread_private.h

Change-Id: Ie7bcdc7195a3fcbcd09a95f73b0c49e8897ad50b

11 years agoMerge "Fix declaration of malloc_usable_size()"
Elliott Hughes [Wed, 5 Jun 2013 01:58:26 +0000 (01:58 +0000)]
Merge "Fix declaration of malloc_usable_size()"

11 years agoMerge "Add tests for __strcpy_chk()"
Nick Kralevich [Tue, 4 Jun 2013 19:05:33 +0000 (19:05 +0000)]
Merge "Add tests for __strcpy_chk()"

11 years agoAdd tests for __strcpy_chk()
Nick Kralevich [Mon, 3 Jun 2013 17:58:06 +0000 (10:58 -0700)]
Add tests for __strcpy_chk()

Change-Id: I5675d04fcd471732c1b87b83879a54fbcd27762e

11 years agoMerge "Small cleanup of soinfo_elf_lookup."
Brian Carlstrom [Tue, 4 Jun 2013 03:18:23 +0000 (03:18 +0000)]
Merge "Small cleanup of soinfo_elf_lookup."

11 years agoSmall cleanup of soinfo_elf_lookup.
Christopher Ferris [Tue, 4 Jun 2013 00:27:49 +0000 (17:27 -0700)]
Small cleanup of soinfo_elf_lookup.

- Remove unnecessary line.
- Move declarations to first use.

Change-Id: I1d8398d6c13f7cb86bffe0b68af849e35a4b234d

11 years agoMerge "Use bl instead of blx to support interworking properly."
Ben Cheng [Fri, 31 May 2013 21:40:37 +0000 (21:40 +0000)]
Merge "Use bl instead of blx to support interworking properly."

11 years agoUse bl instead of blx to support interworking properly.
Ben Cheng [Fri, 31 May 2013 21:25:48 +0000 (14:25 -0700)]
Use bl instead of blx to support interworking properly.

(cherry picked from commit 9e1905794b4ecd8f7b87d8e4e2f954c8cfc6beda in
master)

Change-Id: I9b8c35ea9e201e00f84315f9f105013c23c94d85

11 years agoMerge "FORTIFY_SOURCE: strcat / strncat optimize"
Nick Kralevich [Fri, 31 May 2013 18:13:23 +0000 (18:13 +0000)]
Merge "FORTIFY_SOURCE: strcat / strncat optimize"

11 years agoFORTIFY_SOURCE: strcat / strncat optimize
Nick Kralevich [Thu, 30 May 2013 23:48:53 +0000 (16:48 -0700)]
FORTIFY_SOURCE: strcat / strncat optimize

__strcat_chk and __strncat_chk are slightly inefficient,
because they end up traversing over the same memory region
two times.

This change optimizes __strcat_chk / __strncat_chk so they
only access the memory once. Although I haven't benchmarked these
changes, it should improve the performance of these functions.

__strlen_chk - expose this function, even if -D_FORTIFY_SOURCE
isn't defined. This is needed to compile libc itself without
-D_FORTIFY_SOURCE.

Change-Id: Id2c70dff55a276b47c59db27a03734d659f84b74

11 years agobionic/x86: Optimization for string routines
Liubov Dmitrieva [Tue, 17 Jan 2012 08:55:46 +0000 (12:55 +0400)]
bionic/x86: Optimization for string routines

Optimized strcpy, strcat,
strncpy, strncat, strlcpy, strlcat,
memchr, memrchr, strchr, strrchr, index,
strnlen, strlen, wcslen, wmemcmp, wcscmp,
wcschr, wcsrchr, wcscpy, wcscat

Change-Id: I82b29132edf9a2e144e0bb3ee4ff5217df8d2a6d
Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
11 years agoMerge "Add strncpy FORTIFY_SOURCE tests."
Nick Kralevich [Thu, 30 May 2013 20:33:02 +0000 (20:33 +0000)]
Merge "Add strncpy FORTIFY_SOURCE tests."

11 years agoAdd strncpy FORTIFY_SOURCE tests.
Nick Kralevich [Thu, 30 May 2013 20:21:14 +0000 (13:21 -0700)]
Add strncpy FORTIFY_SOURCE tests.

Change-Id: Id108b1d72b44d7e5fb911268e80bbdf896808f60

11 years agoMerge "libc x86: Remove strcat.S"
Nick Kralevich [Thu, 30 May 2013 19:59:38 +0000 (19:59 +0000)]
Merge "libc x86: Remove strcat.S"

11 years agolibc x86: Remove strcat.S
Nick Kralevich [Thu, 30 May 2013 18:15:40 +0000 (11:15 -0700)]
libc x86: Remove strcat.S

This file is never used.

Change-Id: Iae4bba4a5a12a86a775af05e7477fb7b6511480b

11 years agoMerge "libc x86: Remove index.S, strcpy.S, strchr.S"
Nick Kralevich [Fri, 24 May 2013 18:34:57 +0000 (18:34 +0000)]
Merge "libc x86: Remove index.S, strcpy.S, strchr.S"

11 years agolibc x86: Remove index.S, strcpy.S, strchr.S
Nick Kralevich [Fri, 24 May 2013 17:48:12 +0000 (10:48 -0700)]
libc x86: Remove index.S, strcpy.S, strchr.S

These files are never used.

Change-Id: Iab8474bdff3bd4d225597c62b3c0f0849f808818

11 years agoMerge "libc: delete x86 memchr.S"
Nick Kralevich [Fri, 24 May 2013 17:27:47 +0000 (17:27 +0000)]
Merge "libc: delete x86 memchr.S"

11 years agolibc: delete x86 memchr.S
Nick Kralevich [Fri, 24 May 2013 15:52:04 +0000 (08:52 -0700)]
libc: delete x86 memchr.S

This file is never used.

Change-Id: Ief08ad176713b5194048852609613801969e1364

11 years agoFix declaration of malloc_usable_size()
David 'Digit' Turner [Thu, 23 May 2013 08:02:02 +0000 (10:02 +0200)]
Fix declaration of malloc_usable_size()

The function should take a 'const void*' parameter, instead of 'void*'.
Note that the implementation in upstream-dlmalloc/malloc.c already does
this.

For context, see http://b.android.com/55725

Change-Id: Iefd55cdb8996699189e0545f9195972490306227

11 years agoMerge "Fix bionic linker to support segments with zero p_filesz"
Brian Carlstrom [Tue, 21 May 2013 23:59:52 +0000 (23:59 +0000)]
Merge "Fix bionic linker to support segments with zero p_filesz"

11 years agoFix bionic linker to support segments with zero p_filesz
Brian Carlstrom [Tue, 21 May 2013 23:49:24 +0000 (16:49 -0700)]
Fix bionic linker to support segments with zero p_filesz

(cherry picked from commit 96362fb9d11beef6233aa03db396f25688e70860)

Change-Id: Ib075a6dfc45d5d0746d8b278f317dd9b8d772f2a

11 years agoMerge "libc/arm: add cortex-a8 cpu variant"
Erik Gilling [Thu, 16 May 2013 19:57:28 +0000 (19:57 +0000)]
Merge "libc/arm: add cortex-a8 cpu variant"

11 years agolibc/arm: add cortex-a8 cpu variant
Rom Lemarchand [Fri, 3 May 2013 12:53:38 +0000 (05:53 -0700)]
libc/arm: add cortex-a8 cpu variant

Change-Id: I30e8dd6d4b2e7889aea8f5ed21182a5941bfb489

11 years agoMerge "Fix sysconf(3) for _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX."
Elliott Hughes [Wed, 15 May 2013 00:56:06 +0000 (00:56 +0000)]
Merge "Fix sysconf(3) for _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX."

11 years agoFix sysconf(3) for _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX.
Elliott Hughes [Wed, 15 May 2013 00:20:34 +0000 (17:20 -0700)]
Fix sysconf(3) for _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX.

Change-Id: Ie16cb21c1a5a2bdce8502b5974e2c4dbb1d679ce

11 years agoMerge "Add more __restricts, clean up __format__ attributes."
Elliott Hughes [Tue, 14 May 2013 23:45:48 +0000 (23:45 +0000)]
Merge "Add more __restricts, clean up __format__ attributes."

11 years agoAdd more __restricts, clean up __format__ attributes.
Elliott Hughes [Tue, 14 May 2013 23:08:43 +0000 (16:08 -0700)]
Add more __restricts, clean up __format__ attributes.

Change-Id: I7e2d270cc722d339d221eaea92747eaff3b51403

11 years agoMerge "Pull upstream FreeBSD revision 249810."
Elliott Hughes [Tue, 14 May 2013 23:06:33 +0000 (23:06 +0000)]
Merge "Pull upstream FreeBSD revision 249810."

11 years agoPull upstream FreeBSD revision 249810.
Elliott Hughes [Tue, 14 May 2013 21:56:54 +0000 (14:56 -0700)]
Pull upstream FreeBSD revision 249810.

Fix license clause numbering.

Convert libc/stdio from K&R to ANSI C.

And add '__restrict' where it appeared in the header prototypes.

Change-Id: I5fdb22f79d3effa2298d03f9aa8412b4b087da04
Upstream: http://svnweb.freebsd.org/base?view=revision&revision=249810

11 years agoMerge "epoll: add EPOLLRDHUP, EPOLLWAKEUP, and EPOLLONESHOT events"
Elliott Hughes [Tue, 14 May 2013 21:49:08 +0000 (21:49 +0000)]
Merge "epoll: add EPOLLRDHUP, EPOLLWAKEUP, and EPOLLONESHOT events"

11 years agoepoll: add EPOLLRDHUP, EPOLLWAKEUP, and EPOLLONESHOT events
Todd Poynor [Thu, 9 May 2013 21:38:39 +0000 (14:38 -0700)]
epoll: add EPOLLRDHUP, EPOLLWAKEUP, and EPOLLONESHOT events

(cherry-pick of d1ad4f6dab06189d4d3dcfa19ae4bc301481eb3f.)

Change-Id: I4a8476bff068951533d4188de94097c8b84bc489

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."