Commit Graph

5595 Commits

Author SHA1 Message Date
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
2b205bc880 am f67d11b2: am 8da175c8: (-s ours) am ad999b60: Merge "Fix all debug directives."
* commit 'f67d11b2b4830903e4073da982dab92d3143c1ec':
  Fix all debug directives.
2013-09-20 20:07:56 -07:00
Christopher Ferris
f67d11b2b4 am 8da175c8: (-s ours) am ad999b60: Merge "Fix all debug directives."
* commit '8da175c8c348522c869a0a6d6016b74165a22abd':
  Fix all debug directives.
2013-09-20 20:05:53 -07:00
Christopher Ferris
8da175c8c3 am ad999b60: Merge "Fix all debug directives."
* commit 'ad999b6062909d4922fb360a6f3b7f412cc06111':
  Fix all debug directives.
2013-09-20 19:44:36 -07:00
Christopher Ferris
ad999b6062 Merge "Fix all debug directives." 2013-09-21 02:41:54 +00:00
Christopher Ferris
7f655b45a1 am 74f7414d: am 768c576d: (-s ours) am 7493568b: Merge "Update all debug directives."
* commit '74f7414d303b50a5c61336434bdfbd262ce91879':
  Update all debug directives.
2013-09-20 19:41:46 -07:00
Christopher Ferris
74f7414d30 am 768c576d: (-s ours) am 7493568b: Merge "Update all debug directives."
* commit '768c576d478cef5cb7a7d01a5702e83cc6561f19':
  Update all debug directives.
2013-09-20 19:39:42 -07:00
Christopher Ferris
768c576d47 am 7493568b: Merge "Update all debug directives."
* commit '7493568ba82752d405bbb16dd7c42b3b88c67f86':
  Update all debug directives.
2013-09-20 19:01:32 -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
7493568ba8 Merge "Update all debug directives." 2013-09-21 01:58:56 +00: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
Nick Kralevich
7af9debdbc am df3ff452: am 5a58a1e0: am bef76b54: Merge "Add linux/sock_diag.h"
* commit 'df3ff45216413cdf4ff8f591d64c480ada534fa2':
  Add linux/sock_diag.h
2013-09-20 11:22:02 -07:00
Elliott Hughes
b36e2e38b1 am e74f77f9: am 48a909c9: am aad3c52e: Merge "Ensure we have the off64_t variant of every function that takes an off_t."
* commit 'e74f77f92d80f11616da699ac908fd5d1913e996':
  Ensure we have the off64_t variant of every function that takes an off_t.
2013-09-20 11:20:55 -07:00
Elliott Hughes
f4e3e21d82 am a5a508a9: am 35cfcc11: am f8e71bac: Merge "Add mmap64()"
* commit 'a5a508a9b6c51259950bab3e628355632ad17fee':
  Add mmap64()
2013-09-20 09:58:54 -07:00
Elliott Hughes
bc42ecb041 am 1b75f3e0: am fd5f6f19: am d5ddf40e: Merge "Fix host tests that need the shell."
* commit '1b75f3e07a8d20f45aa8a78578f294ac499529d0':
  Fix host tests that need the shell.
2013-09-20 09:58:03 -07:00
Elliott Hughes
1b56231c11 am 44fd0d92: am 94c325fb: am 269851bf: Merge "Declare __page_shift and __page_size with C linkage."
* commit '44fd0d92d6e65d0d003103d402240d28d26ae639':
  Declare __page_shift and __page_size with C linkage.
2013-09-20 09:58:02 -07:00
Elliott Hughes
35006b5223 am a3285dc9: am 8ff879a5: am a259472c: Merge "Fix mismatch between declaration and forward declaration"
* commit 'a3285dc9143a8175ff82bf1074720d04bed81faa':
  Fix mismatch between declaration and forward declaration
2013-09-20 09:58:00 -07:00
Elliott Hughes
e7fd29e3db am 823a4e0a: am 26e71c19: am 045f311b: Merge "Use and to find the tzdata."
* commit '823a4e0a7eab7859611189630d7748c254981ebf':
  Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
2013-09-20 09:57:48 -07:00
Nick Kralevich
df3ff45216 am 5a58a1e0: am bef76b54: Merge "Add linux/sock_diag.h"
* commit '5a58a1e0abf51402170abeb6feaceb53915b8a6e':
  Add linux/sock_diag.h
2013-09-20 08:24:59 -07:00
Nick Kralevich
5a58a1e0ab am bef76b54: Merge "Add linux/sock_diag.h"
* commit 'bef76b54a6fe747617334e3aaea892a19370cd29':
  Add linux/sock_diag.h
2013-09-20 08:22:28 -07:00
Nick Kralevich
bef76b54a6 Merge "Add linux/sock_diag.h" 2013-09-20 15:20:03 +00: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
48a909c9fd am aad3c52e: Merge "Ensure we have the off64_t variant of every function that takes an off_t."
* commit 'aad3c52e9d3e726eb59870b03c3fa89a3ba1a89a':
  Ensure we have the off64_t variant of every function that takes an off_t.
2013-09-19 17:40:39 -07:00
Elliott Hughes
aad3c52e9d Merge "Ensure we have the off64_t variant of every function that takes an off_t." 2013-09-20 00:37:28 +00:00
Nick Kralevich
8470f01cca Add linux/sock_diag.h
This file was generated using bionic/libc/kernel/tools/update_all.py

Change-Id: Iad33e96253978ed9a76d429d66eed9f245685c10
2013-09-19 16:44:53 -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
Elliott Hughes
a5a508a9b6 am 35cfcc11: am f8e71bac: Merge "Add mmap64()"
* commit '35cfcc11fa923c75ead9356c71466ecabfafcc42':
  Add mmap64()
2013-09-19 14:27:34 -07:00
Elliott Hughes
35cfcc11fa am f8e71bac: Merge "Add mmap64()"
* commit 'f8e71bac14a4bc52cc95c56adfe042c3938279b5':
  Add mmap64()
2013-09-19 14:25:00 -07:00
Elliott Hughes
f8e71bac14 Merge "Add mmap64()" 2013-09-19 21:22:42 +00:00
Daniel Leung
afcc0cccda 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>
2013-09-19 14:11:26 -07:00
Elliott Hughes
1b75f3e07a am fd5f6f19: am d5ddf40e: Merge "Fix host tests that need the shell."
* commit 'fd5f6f192ab6dcc01091b0e36af822dd3480f9b4':
  Fix host tests that need the shell.
2013-09-19 12:06:44 -07:00
Elliott Hughes
44fd0d92d6 am 94c325fb: am 269851bf: Merge "Declare __page_shift and __page_size with C linkage."
* commit '94c325fb3bd8844dcc58640afb8f33668b684bc1':
  Declare __page_shift and __page_size with C linkage.
2013-09-19 12:06:43 -07:00
Elliott Hughes
fd5f6f192a am d5ddf40e: Merge "Fix host tests that need the shell."
* commit 'd5ddf40ecf72a03e38164389555ccdade779ab5a':
  Fix host tests that need the shell.
2013-09-19 12:05:09 -07:00
Elliott Hughes
94c325fb3b am 269851bf: Merge "Declare __page_shift and __page_size with C linkage."
* commit '269851bf950049f16eeb2a402f700952480bcecf':
  Declare __page_shift and __page_size with C linkage.
2013-09-19 12:05:08 -07:00
Elliott Hughes
d5ddf40ecf Merge "Fix host tests that need the shell." 2013-09-19 19:04:10 +00:00
Elliott Hughes
269851bf95 Merge "Declare __page_shift and __page_size with C linkage." 2013-09-19 19:03:19 +00:00
Bernhard Rosenkraenzer
9ae59c02ca 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>
2013-09-19 11:55:36 -07:00
Elliott Hughes
a3285dc914 am 8ff879a5: am a259472c: Merge "Fix mismatch between declaration and forward declaration"
* commit '8ff879a528b8876db811f5abd4dbf0640e3a0408':
  Fix mismatch between declaration and forward declaration
2013-09-19 11:46:46 -07:00
Elliott Hughes
8ff879a528 am a259472c: Merge "Fix mismatch between declaration and forward declaration"
* commit 'a259472ca076ee230523e63502999be13a3f72d2':
  Fix mismatch between declaration and forward declaration
2013-09-19 11:44:11 -07:00
Elliott Hughes
a259472ca0 Merge "Fix mismatch between declaration and forward declaration" 2013-09-19 18:41:06 +00:00
Elliott Hughes
e60c4f0a6c Fix host tests that need the shell.
By making the /system/bin/sh available.

Change-Id: I99200c1ddc922a2f6b5cea8ff2da98aedbe70e7b
2013-09-19 11:28:20 -07:00
Elliott Hughes
823a4e0a7e am 26e71c19: am 045f311b: Merge "Use and to find the tzdata."
* commit '26e71c19875e36ca4f37993bd0b40cdf2d9aee4e':
  Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
2013-09-19 11:23:55 -07:00
Elliott Hughes
26e71c1987 am 045f311b: Merge "Use and to find the tzdata."
* commit '045f311b0a5b3ceed09dfc4b4246c99183a2cef4':
  Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
2013-09-19 11:21:21 -07:00
Elliott Hughes
045f311b0a Merge "Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata." 2013-09-19 18:19:00 +00:00
Elliott Hughes
cf178bf7d0 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
2013-09-19 11:17:42 -07:00
Nick Kralevich
9e71b5f676 am d85d0b4c: am 0c12f125: am 814bbd52: Merge "Update netlink.h from tip-of-tree external/kernel-headers"
* commit 'd85d0b4c2398dba3da126608c9fb79f6971a7b18':
  Update netlink.h from tip-of-tree external/kernel-headers
2013-09-18 21:12:54 -07:00
Nick Kralevich
d85d0b4c23 am 0c12f125: am 814bbd52: Merge "Update netlink.h from tip-of-tree external/kernel-headers"
* commit '0c12f125cfc90f83475532e64aa7f533e02e3798':
  Update netlink.h from tip-of-tree external/kernel-headers
2013-09-18 21:09:22 -07:00
Nick Kralevich
0c12f125cf am 814bbd52: Merge "Update netlink.h from tip-of-tree external/kernel-headers"
* commit '814bbd521affba78db04135515bae1f5e099bbd9':
  Update netlink.h from tip-of-tree external/kernel-headers
2013-09-18 21:06:43 -07:00
Nick Kralevich
814bbd521a Merge "Update netlink.h from tip-of-tree external/kernel-headers" 2013-09-19 04:04:07 +00:00
Elliott Hughes
89186cd219 am ca0f0662: am 2443358b: am 4a509d89: Merge "Add bionic-unit-tests-run-on-host special target"
* commit 'ca0f0662f42a5debe8469e1a9b06ebffb6e492aa':
  Add bionic-unit-tests-run-on-host special target
2013-09-18 19:22:09 -07:00