Commit graph

243 commits

Author SHA1 Message Date
Ian Rogers
59ec765382 Host multilib build of both 32-bit and 64-bit libraries.
Change-Id: I54f91f385b109fc664a1a1f9320affb2a846fef1
2014-06-05 15:26:22 -07:00
Elliott Hughes
b122da648d Merge "Fix libcutils/dlmalloc_stubs.c build breakage." 2014-06-04 03:50:33 +00:00
Elliott Hughes
7f0ef73e70 Fix libcutils/dlmalloc_stubs.c build breakage.
Change-Id: I344c410c100ce13c7a88063bf5354ad61c50094b
2014-06-03 20:48:44 -07:00
Mathieu Chartier
e942d1f9ea Fix build.
Change-Id: I7b0cf6a248c74f1a06e0b5d51a5be13124ced6a0
2014-06-03 18:12:29 -07:00
Mathieu Chartier
0b9674f241 Fix build.
Change-Id: I6bafe6221e1ce7e4b04269df90996ab08b050e93
2014-06-03 15:32:10 -07:00
Mathieu Chartier
03b87b49fa Merge "Make host ashmem_create_region seed only once." 2014-06-03 19:02:35 +00:00
Mathieu Chartier
1104ae8cfc Make host ashmem_create_region seed only once.
Not seeding this each call should help reduce collisions when multiple
threads are calling ashmem_create_region. Also cleaned up code by
deleting gotos, and making formatting consistent.

Bug: 15394258
Change-Id: Iafdaea57b2317e0eb7c40d7b5595c523814fd88c
2014-06-03 11:47:58 -07:00
Hong-Mei Li
88f7683d9c libcutils: fix rw FS remount check issue
In some condition, some of FS would set disable_roll_forward option.
In this case, when we do power off or reboot, the power down progress
would stuck at android_reboot for 360 sec.
The reason is, remount_ro_done function check key word "rw" to determine
whether all the read-write FS has been remounted as read-only FS.
Unfortunately, it takes disable_roll_forward as a rw flag too by
mistake, so the check would always fail, until reach 360 sec threshold.

The patch would match "rw," from mount options, this can avoid the issue
successfully.

Change-Id: I409f9dc88c9ee5cf049615ea9dcccaf195b6bc5a
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
2014-06-02 22:45:37 -07:00
Elliott Hughes
0bff5bd952 Fix win32 undefined reference to `_socket_network_client_timeout'.
Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
2014-05-20 12:13:29 -07:00
Elliott Hughes
36739556db Fix Windows socket_network_client.c build failures.
Change-Id: Ie67a2305ade02e078bf0edf54104c295b091b1b7
2014-05-19 16:47:12 -07:00
Ken Lierman
aecc6a6657 Bound the ADB connect time with a non-blocking connect
After a disconnect, the initial blocking connect takes
a long time to return, while subsequent calls return
quicks.  Switch to a non-blocking connect to make the
re-connect time more consistent and faster overall.

Change-Id: I21d02b22a8eb9a457c2f1fa95eb17894d5612ccd
Signed-off-by: Ken Lierman <ken.lierman@windriver.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
2014-05-19 16:16:42 -07:00
Ying Wang
9f437d7181 Remove unused LOCAL_LDLIBS.
Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
2014-05-07 15:36:05 -07:00
Elliott Hughes
752115dda7 Merge "Add Silvermont architecture cache sizes" 2014-05-05 21:59:53 +00:00
Mark Salyzyn
02a7c3a7c3 libcutils: win_sdk build issues
Change-Id: Ic431166f686aebfd0ee00ad3224b95237ff7a0de
2014-05-05 10:29:56 -07:00
Mark Salyzyn
edc70938be libcutils: Mac build pulls in __unused from sys/cdefs.h
Change-Id: I2da8a52e07cef0b749f7e60709536e98bd96660e
2014-05-02 19:50:20 +00:00
Mark Salyzyn
12717169a5 libcutils: turn on -Werror
- Deal with some -Wunused / -Wunused-variable issues

Change-Id: I28c23fb213382a392ec30935749fb359e072d664
2014-05-01 17:58:17 -07:00
Elliott Hughes
855fcc3114 Use the si_code value bionic passes us.
Bionic needs to re-raise various signals, which means the si_code
debuggerd sees has been clobbered. If bionic sends us the original
si_code value, we can use that instead of the one we see when the
ptrace the crashed process' siginfo.

Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
2014-04-25 20:20:39 -07:00
Henrik Smiding
c27a444e54 Add Silvermont architecture cache sizes
Adds Silvermont specific cache sizes for memset16/32 SSE optimization.

Change-Id: Ib5ea086d57544e74ac384ee1ef516b8511392f70
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
2014-04-18 11:31:54 +08:00
Jens Gulin
d3c8d5b8d4 Handle errno properly to avoid corrupt str_parms
A normal sequence of calls is as follows:
str_parms_create_str, str_parms_add_str, str_parms_destroy.
In some cases the destroy caused double free.

str_parms_add_str will clone the input and send it to hashmapPut
for storage. If hashmapPut did not store the strings it will raise
errno = ENOMEM and leave caller with ownership of the strings.
In any of these cases it will be safe to destroy the str_parms.

But what if it wasn't hashmapPut that said NOMEM? What if there
was a stale NOMEM already before a successful hashmapPut?
In that case the strings will be successfully added to the list
(if new), but when str_parms_add_str sees the NOMEM it will free
them anyway, leaving dangling pointers in the str_parms!!

It is the responsibility of the caller to clear errno before any
interesting call. This patch makes sure that str_parms_add_str
reacts only on errno emmitted from hashmapPut.

Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
2014-04-03 11:19:54 -07:00
Mark Salyzyn
0c3d19ff3d Merge "libcutils: 64-bit compile issues" 2014-03-07 23:33:31 +00:00
Mark Salyzyn
0425b64e0b libcutils: 64-bit compile issues
- Use inttypes.h to print uint64_t values.

Change-Id: Ia10a3b67cadcce282563467a464ec07066cc2051
2014-03-07 15:28:43 -08:00
Alex Ray
157e1b645a libcutils: add method to get klog level
Change-Id: I55e8311bae97703be26e57b415a8ab0a6d9b4361
2014-03-07 13:58:02 -08:00
Paul Kocialkowski
a7e2e7634c libcutils: Socket type might contain bitwise OR flags
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Change-Id: Ia5c8f136793a989fc1d71c61292afe4e5cf169fa
2014-02-26 11:33:45 -08:00
Elliott Hughes
acc0a23a20 Merge "Remove dead code." 2014-02-20 20:06:38 +00:00
Elliott Hughes
b784f37341 Remove dead code.
We have benchmarking for memset in bionic itself, and a benchmarking
framework for other native benchmarking.

Change-Id: I241a288a96d3b2d37f3d51b04a519ac23f18a989
2014-02-20 11:12:41 -08:00
Stephen Smalley
eb3f421e02 Enable building init with -Wall -Werror.
Eliminates various warnings from SELinux-related code.

Bug: 12587913
Change-Id: I28921f0ebd934324436609540d95ccef58552b64
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-02-19 09:15:09 -05:00
Mark Salyzyn
3bca606117 libcutils: resolve warning in iosched_policy.c
(cherry picked from commit 407038cd93)

Change-Id: I35b0d1eeba21cc1ed9645a5acfa180ed20797c56
2014-01-27 15:20:23 -08:00
Mark Salyzyn
b957baccd2 libcutils: bug str_parms.c:str_parms_get_float().
str_parms_get_float did not return the output into
*val. Only output if returning with no error. Audit
shows no internal users of this library function

(cherry picked from commit 8e71ddeac0)

Change-Id: I14a3f08a098072a159dd93f85ead36b3f445816f
2014-01-27 15:07:58 -08:00
Mark Salyzyn
2b94cc264f libcutils: UNUSED argument warnings
(cherry picked from commit ba02cd1e9b)

Change-Id: Ie427d481298af8d911bb2b157ebba30954335354
2014-01-27 15:07:15 -08:00
Mark Salyzyn
a6aad4cdb3 libcutils: Move list.c to inlines on list.h
(cherry picked from commit 0ea3624b3e)

Change-Id: I0572555a194d2560e74dfbf07abcec05e9a276a2
2014-01-27 15:04:56 -08:00
Colin Cross
65dd88becc system/core: remove $(KERNEL_HEADERS) from includes
The kernel headers are already in the include path, and manually
adding them again will break on a multiarch build, where the
kernel headers may be different for each arch.

Change-Id: Ib13d96543f2c97b1b487a46e1748ceb2c5724169
2014-01-22 19:06:04 -08:00
Christopher Ferris
1da83c3ecc Init the abort_msg_address value.
When initiating a manual dump, the abort_msg_address parameter is random
garbage. Initialize this value to 0.

Change-Id: I9ba817ee6104f47cfcb2b746bfa6f02a259c86d7
2014-01-10 14:46:03 -08:00
The Android Open Source Project
66ed50af68 Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEAD
Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
2013-11-22 13:44:43 -08:00
Pavel Chupin
dccdb94284 Replace __reboot call with syscall
__reboot is hidden for 64-bits and should be hidden on others

Change-Id: Ib6435269aac7fa726e49cc02f8f76d2be2875bc6
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-11-21 12:35:12 -08:00
Elliott Hughes
14e28d39f7 Fix a bunch of small system/core bugs.
Missing frees in:
  adb/file_sync_client.c
  fastboot/fastboot.c
  libsparse/output_file.c

Missing closedirs in:
  adb/file_sync_service.c
  cpio/mkbootfs.c
  libcutils/dir_hash.c

Potential buffer overrun in:
  gpttool/gpttool.c

Incorrect NULL check in:
  libsparse/backed_block.c

Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
2013-10-29 14:12:46 -07:00
Pavel Chupin
9ff8767bc6 Eliminate text relocations in x86 optimized memset versions
Change-Id: Ieb72af8cf7f93210a68a87b1e2538deb5642f4d5
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-24 21:42:30 +04:00
Elliott Hughes
9640b30dd7 Use %zd for size_t.
Change-Id: I0139243c309e85236eb00bb471736bdd99eeec84
2013-10-18 17:11:00 -07:00
Elliott Hughes
6891df7a65 am 45ddf184: am 9b8a929d: Merge "libcutils doesn\'t need to be looking at bionic\'s privates."
* commit '45ddf184960225862c6e178588034cce676683e3':
  libcutils doesn't need to be looking at bionic's privates.
2013-10-10 10:40:11 -07:00
Elliott Hughes
7f7b12b8eb am 5baecee3: am be18538d: Merge "Cleanup x86 flags and memset versions"
* commit '5baecee3c6bf348b77b8785bcd8e35362a3507fb':
  Cleanup x86 flags and memset versions
2013-10-10 10:40:10 -07:00
Elliott Hughes
478c566a90 libcutils doesn't need to be looking at bionic's privates.
Change-Id: Ib11a0c1bdc4b85c58274b21a07aa92f958d23713
2013-10-10 09:50:56 -07:00
Pavel Chupin
4aa51cd468 Cleanup x86 flags and memset versions
ARCH_X86_HAVE_SSE2 is always true

Change-Id: I680493d14280aafad5448aec727e8d9a84a6db00
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-10 20:20:16 +04:00
Ying Wang
f47c01da18 am 1690a5a6: am aa62be65: Merge "Use SSE2 enhanced memset for capable x86 processors"
* commit '1690a5a6943d4e4b65d5e4dcd077702c2c8f40a0':
  Use SSE2 enhanced memset for capable x86 processors
2013-09-26 10:56:52 -07:00
Daniel Leung
51546ee32c Use SSE2 enhanced memset for capable x86 processors
Originally, if TARGET_ARCH_VARIANT is x86-atom, the SSE2 enhanced
memset is used. This patch extends this to all x86 processors which
support SSE2 (i.e. ARCH_X86_HAVE_SSE2 is true).

Indentation added to the ifeq cases to make this easier to read.

Change-Id: I05f49e237a95359d3f2e3216b037e3fc1a0fbcb0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-24 12:53:18 -07:00
Jeff Sharkey
500f3ffad4 am 0ee7d8c6: Fix Mac builds, for realz.
* commit '0ee7d8c68b57c02d02f707d6f71c731234d56eec':
  Fix Mac builds, for realz.
2013-09-20 18:04:53 -07:00
Jeff Sharkey
0ee7d8c68b Fix Mac builds, for realz.
Change-Id: I63e21b90e5b8a8f016dd04ceca4354793faa5e37
2013-09-20 18:00:15 -07:00
Jeff Sharkey
68955fc82e am 4481c325: Fix Mac builds.
* commit '4481c325b16d4a42fd0ebf4c8a2bb5bcc09daf5e':
  Fix Mac builds.
2013-09-20 17:39:27 -07:00
Jeff Sharkey
4481c325b1 Fix Mac builds.
Change-Id: I0eb029395a3afd2f93a7632d7d3d20d28c2ab189
2013-09-20 17:35:15 -07:00
Jeff Sharkey
9729b41574 am 44d6342c: Remove mkdir() side effect, add .nomedia, utils.
* commit '44d6342caa0db1f613809e9ba1ea8d9af0183b74':
  Remove mkdir() side effect, add .nomedia, utils.
2013-09-20 15:57:58 -07:00
Jeff Sharkey
44d6342caa Remove mkdir() side effect, add .nomedia, utils.
Before this change, FUSE lookup() would have the side effect of
creating the directory on behalf of apps.  This resulted in most
directories being created just by Settings trying to measure disk
space.  Instead, we're switching to have vold do directory creation
when an app doesn't have enough permissions.

Create fs_mkdirs() utility to create all parent directories in a
path as needed.  Allow traversal (+x) into /storage directories.

Fix FUSE derived permissions to be case insensitive.  Mark well-known
directories as .nomedia when created.

Bug: 10577808, 10330221
Change-Id: I53114f2e63ffbe6de4ba6a72d94a232523231cad
2013-09-20 14:21:09 -07:00
Colin Cross
8da6e9c717 am c9ff3714: am 596e9c63: Merge "fix valgrind ioctl warning."
* commit 'c9ff37144a7943ee1bc247cef3620c8cce22049d':
  fix valgrind ioctl warning.
2013-09-05 12:57:15 -07:00