Commit graph

287 commits

Author SHA1 Message Date
Elliott Hughes
6b9321b858 am d6e117b6: am 1f29c2f5: Merge "Switch sigpending over to rt_sigpending."
* commit 'd6e117b64bdfbf8d793eb59ea9604b806608ec75':
  Switch sigpending over to rt_sigpending.
2013-10-16 16:09:42 -07:00
Elliott Hughes
40d105ccb3 Switch sigpending over to rt_sigpending.
Change-Id: I7b28984796b5fb343cfbcc47e0afc3a84293d417
2013-10-16 14:07:01 -07:00
Elliott Hughes
afaebc3fef am 87fc78de: am 608c65f6: Merge "Fix sigsuspend to use rt_sigsuspend on all platforms."
* commit '87fc78de6c869d0403ccdd2e756ec1f5d456f3d3':
  Fix sigsuspend to use rt_sigsuspend on all platforms.
2013-10-15 18:20:32 -07:00
Elliott Hughes
1f5af926fa Fix sigsuspend to use rt_sigsuspend on all platforms.
Change-Id: I981c1a66d35480d4457a0a08a1b042dac94daa5b
2013-10-15 18:15:19 -07:00
Elliott Hughes
f2a760dca7 am a85606e1: am c100a100: Merge "\'Avoid confusing "read prevented write" log messages\' 2."
* commit 'a85606e1563c2153bea3c73dfe4ca1588e778f22':
  'Avoid confusing "read prevented write" log messages' 2.
2013-10-15 17:38:17 -07:00
Elliott Hughes
68b67113a4 'Avoid confusing "read prevented write" log messages' 2.
This time it's assembler.

Change-Id: Iae6369833b8046b8eda70238bb4ed0cae64269ea
2013-10-15 17:17:05 -07:00
Christopher Ferris
289c460c55 am ac6bc319: Remove new aligned memcpy path for cortex-a15.
* commit 'ac6bc31942e58c8893c0695d9766d0f3e39335fe':
  Remove new aligned memcpy path for cortex-a15.
2013-10-15 16:17:14 -07:00
Christopher Ferris
ac6bc31942 Remove new aligned memcpy path for cortex-a15.
For some reason the new cortex-a15 memcpy code from ARM is really bad
for really large copies. This change forces us to go down the old path
for all copies.

All of my benchmarks show the new version is faster for large copies, but
something is going on that I don't understand.

Bug: 10838353
Change-Id: I01c16d4a2575e76f4c69862c6f78fd9024eb3fb8
2013-10-15 14:54:02 -07:00
Christopher Ferris
d77ff4f423 am 76d78dc0: am dc9d8d05: Merge "Modify prefetch for krait memcpy."
* commit '76d78dc0441ba982438ef613a8d6f2f65c6834e0':
  Modify prefetch for krait memcpy.
2013-10-15 14:19:27 -07:00
Elliott Hughes
4681f8244e am 5b3f1d8b: am 22b83da4: Merge "Clean up the sigprocmask/pthread_sigmask implementation."
* commit '5b3f1d8b3a6a1caf059dc376e4967a27ddd57dac':
  Clean up the sigprocmask/pthread_sigmask implementation.
2013-10-15 14:16:02 -07:00
Christopher Ferris
dc9d8d050a Merge "Modify prefetch for krait memcpy." 2013-10-15 21:12:31 +00:00
Christopher Ferris
c3c58fb560 Modify prefetch for krait memcpy.
I originally modified the krait mainloop prefetch from cacheline * 8 to * 2.
This causes a perf degradation for copies bigger than will fit in the cache.
Fixing this back to the original * 8. I tried other multiples, but * 8 is th
sweet spot on krait.

Bug: 11221806

Change-Id: I1f75fad6440f7417e664795a6e7b5616f6a29c45
2013-10-15 12:10:06 -07:00
Elliott Hughes
19e62325c2 Clean up the sigprocmask/pthread_sigmask implementation.
Let's have both use rt_sigprocmask, like in glibc. The 64-bit ABIs
can share the same code as the 32-bit ABIs.

Also, let's test the return side of these calls, not just the
setting.

Bug: 11069919
Change-Id: I11da99f85b5b481870943c520d05ec929b15eddb
2013-10-15 11:23:57 -07:00
Elliott Hughes
2d38f0c1c7 am 21d70d5f: am 39385aa7: Merge "Clean up the cpuacct cruft."
* commit '21d70d5fd8ff2823a6879d59c7d5a8d6c3e0ce8b':
  Clean up the cpuacct cruft.
2013-10-09 21:28:51 -07:00
Elliott Hughes
232163cf70 Clean up the cpuacct cruft.
Change-Id: I6ed63af8dfc2368e211420389fa8af4d5dc0908f
2013-10-09 17:35:36 -07:00
Elliott Hughes
1cdc9fe6d5 am 8826ba8a: am bc545e8a: Merge "Fix x86_64 build, clean up intermediate libraries."
* commit '8826ba8ab6922927bdac2466d2903916d5806a06':
  Fix x86_64 build, clean up intermediate libraries.
2013-10-09 16:35:46 -07:00
Elliott Hughes
eb847bc866 Fix x86_64 build, clean up intermediate libraries.
The x86_64 build was failing because clone.S had a call to __thread_entry which
was being added to a different intermediate .a on the way to making libc.so,
and the linker couldn't guarantee statically that such a relocation would be
possible.

  ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC

This patch addresses that by ensuring that the caller and callee end up in the
same intermediate .a. While I'm here, I've tried to clean up some of the mess
that led to this situation too. In particular, this removes libc/private/ from
the default include path (except for the DNS code), and splits out the DNS
code into its own library (since it's a weird special case of upstream NetBSD
code that's diverged so heavily it's unlikely ever to get back in sync).

There's more cleanup of the DNS situation possible, but this is definitely a
step in the right direction, and it's more than enough to get x86_64 building
cleanly.

Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
2013-10-09 16:00:17 -07:00
Elliott Hughes
42b618cffe am 58b8f225: am 5cf1f229: Merge "pthread_exit should call __NR_exit with status 0."
* commit '58b8f2256637c5b1e24b568b699fb3aa6cf0ca96':
  pthread_exit should call __NR_exit with status 0.
2013-10-08 15:06:49 -07:00
Elliott Hughes
c4c6e192ac pthread_exit should call __NR_exit with status 0.
We shouldn't have been passing the bottom 32 bits of the address used
for pthread_join to the kernel.

Change-Id: I487e5002d60c27adba51173719213abbee0f183f
2013-10-08 14:48:05 -07:00
Elliott Hughes
9258c7b23e am b7d77a9e: am 56777421: Merge "Add arch-x86_64/include/machine."
* commit 'b7d77a9eb1effd5f0472dff14a8fe77d9da2c7a2':
  Add arch-x86_64/include/machine.
2013-10-04 16:21:25 -07:00
Elliott Hughes
72645164b6 Add arch-x86_64/include/machine.
This is basically the other half of I5de76f6c46ac87779f207d568a86bb453e2414de
from Pavel Chupin <pavel.v.chupin@intel.com>, but taking the exact upstream
_types.h instead of the modified version. (I was confused when I suggested
otherwise.)

I've also cleaned up the internal_types.h situation; we weren't gaining
anything from these empty files, and there is no upstream internal_types.h
for x86_64.

Change-Id: I802a9a6a8df1c979e820659212c75a47c2ef392e
2013-10-04 16:10:13 -07:00
Nick Kralevich
7909bd19ab am 9da8b682: am c417d0a5: Merge "Make error messages even better!"
* commit '9da8b6829cb8febb70af46761b7f2ca19e6498ce':
  Make error messages even better!
2013-10-04 12:02:57 -07:00
Nick Kralevich
6861c6f85e Make error messages even better!
Change-Id: I72bd1eb1d526dc59833e5bc3c636171f7f9545af
2013-10-04 11:43:30 -07:00
Elliott Hughes
be7b6408b3 am 6d923d49: am 14102932: Merge "Move common arch-* code to arch-common directory"
* commit '6d923d497373c160f6fdddd42f5ed56e7bf0923a':
  Move common arch-* code to arch-common directory
2013-10-04 09:58:23 -07:00
Elliott Hughes
141029327c Merge "Move common arch-* code to arch-common directory" 2013-10-03 23:17:58 +00:00
Christopher Ferris
1a086a52d3 am 270c52da: am 1fe477fc: Merge "Add dependencies on included makefiles."
* commit '270c52da0db68c6961eb576b67adc0c41c418763':
  Add dependencies on included makefiles.
2013-10-03 14:57:21 -07:00
Christopher Ferris
d7a632948d Add dependencies on included makefiles.
Bug: 11050594

Merge from internal master.

(cherry-picked from f389284e86)

Change-Id: I2b3e38329a09d26c16870906f9ed1257e2a9dbc8
2013-10-03 14:17:14 -07:00
Christopher Ferris
bdc610aba5 am dc7f8ddc: am 6088047a: Merge "Remove dead files."
* commit 'dc7f8ddc227e833b889eb1eedc16b9b5827fc127':
  Remove dead files.
2013-10-03 13:26:38 -07:00
Christopher Ferris
fc4d70fe54 Remove dead files.
memcpy.a15.S/strcmp.a15.S files were submitted by ARM for use as the basis
for the memcpy/strcmp implementations in cortex-a15.

memset.S was moved in to the generic directory.

NOTE: memcpy.a9.S was submitted by Linaro to be the basis for the memcpy
for cortex-a9/cortex-a15 but has not been incorporated yet.

Bug: 10971279

Merge from internal master.

(cherry-picked from 48fc3e8b9f)

Change-Id: I8f9297578990d517f004e4e8840e2b2cbd5a47d8
2013-10-03 12:35:56 -07:00
Pavel Chupin
b49c17c2bf Move common arch-* code to arch-common directory
Will be helpful on adding x86_64

Change-Id: I96cf6fc7912c02f289c75f07ae0079c32d69173f
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-03 11:14:33 +04:00
Christopher Ferris
de7ed18df0 am 0292c1c8: am 3901b1bd: Merge "Remove the __ARM_FEATURE_DSP check."
* commit '0292c1c81dfed23a32d46fb0b089b7eccb87e21e':
  Remove the __ARM_FEATURE_DSP check.
2013-10-02 23:27:06 -07:00
Christopher Ferris
aec1b3540a Remove the __ARM_FEATURE_DSP check.
The check for __ARM_FEATURE_DSP being defined is pointless since it
is always defined.

Bug: 10971279

Merge from internal master.

(cherry-picked from d2642fa70c)

Change-Id: If23ab3271f4da0c38cd531ffdc9a7e5eed6ec5dc
2013-10-02 23:14:01 -07:00
Nick Kralevich
670f372470 am b6201932: am 2c701a1b: Merge "libc: don\'t export unnecessary symbols"
* commit 'b6201932838c46a567e3411047719fd5c2797e96':
  libc: don't export unnecessary symbols
2013-10-02 17:03:42 -07:00
Nick Kralevich
32bbf8a63b libc: don't export unnecessary symbols
Symbols associated with the internal implementation of memcpy
like routines should be private.

Change-Id: I2b1d1f59006395c29d518c153928437b08f93d16
2013-10-02 16:54:58 -07:00
Elliott Hughes
5825f979b7 am 88f29444: am 7b538021: Merge "Make it easier to add syscalls for another architecture."
* commit '88f2944421839b725e02e97c62d119c9e608ec58':
  Make it easier to add syscalls for another architecture.
2013-09-26 09:02:46 -07:00
Elliott Hughes
d612165c67 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
2013-09-26 08:57:17 -07:00
Christopher Ferris
16e185c908 __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 883ef2499c)

Change-Id: Id9a96b549435f5d9b61dc132cf1082e0e30889f5
2013-09-20 20:12:09 -07:00
Christopher Ferris
a57c9c084b 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 05332f2ce7)

Change-Id: Ibc919b117cfe72b9ae97e35bd48185477177c5ca
2013-09-20 18:59:58 -07:00
Christopher Ferris
bd7fe1d3c4 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 5f7ccea3ff)

Change-Id: If48a216203216a643807f5d61906015984987189
2013-09-20 13:49:38 -07:00
Elliott Hughes
e74f77f92d am 48a909c9: am aad3c52e: Merge "Ensure we have the off64_t variant of every function that takes an off_t."
* commit '48a909c9fd6dbe9be5655ad172d1083fa69c4107':
  Ensure we have the off64_t variant of every function that takes an off_t.
2013-09-19 17:43:01 -07:00
Elliott Hughes
b4f7616fd6 Ensure we have the off64_t variant of every function that takes an off_t.
Change-Id: Ib2eee0cf13162be3b62559b84e90c6dcf5aab1c3
2013-09-19 16:27:24 -07:00
Christopher Ferris
2e7a8b44c2 resolved conflicts for merge of 883ef249 to klp-dev-plus-aosp
Change-Id: I1e2bd03a0cb5a0ab191c525d1574377bc7fd90ab
2013-09-10 19:49:04 -07:00
Christopher Ferris
883ef2499c __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
Change-Id: Ia831071f7dffd5972a748d888dd506c7cc7ddba3
2013-09-10 17:34:03 -07:00
Christopher Ferris
5cb0436930 am 1a88ca08: am 98c726ec: Merge "Add the dl_iterate_phdr function to libdl for arm."
* commit '1a88ca08046ea510bfc8d3de6875537f124b3ce3':
  Add the dl_iterate_phdr function to libdl for arm.
2013-09-06 10:57:40 -07:00
Christopher Ferris
24053a461e Add the dl_iterate_phdr function to libdl for arm.
Bug: 8410085

Merge from internal master.

(cherry-picked from cb491bc66d)

Change-Id: I94ed51bc5d4c626df7552c0e85c31ccee2d6568f
2013-09-06 09:53:54 -07:00
Christopher Ferris
153ec2a76f am 49c0d471: Merge "Fix all debug directives." into klp-dev
* commit '49c0d471a8ba9ed32e7fdadb7e4ea6118b4b4af4':
  Fix all debug directives.
2013-08-29 14:23:06 -07:00
Christopher Ferris
05332f2ce7 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

Change-Id: I1dedadfee207dce4a285e17a21e8952bbc63786a
2013-08-28 15:42:05 -07:00
Nick Kralevich
f6186e9592 am 1278ae38: am 22f5ef6b: Merge "Delete CAVEATS / fix spelling."
* commit '1278ae38366102369b5a35152f2213426a148512':
  Delete CAVEATS / fix spelling.
2013-08-27 17:11:06 -07:00
Nick Kralevich
bdbdbb8319 Delete CAVEATS / fix spelling.
Change-Id: I0ed504271b7c2e4434d0d5f53bc10335c8cf7b5b
2013-08-27 17:05:19 -07:00
Christopher Ferris
5f7ccea3ff 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

Change-Id: I043f493e0bb6c45bd3f4906fbe1d9f628815b015
2013-08-20 11:22:34 -07:00