Commit graph

6833 commits

Author SHA1 Message Date
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
e16baef4d2 libsysutils: Get rid of warnings
- UNUSED argument warnings
- Remove LOG_NDEBUG define

(cherry picked from commit 696f267ff5)

Change-Id: I48b0942adfdb7a46a7693e580bc6ed5a685b0d5b
2014-01-27 15:06:22 -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
Elliott Hughes
fb6d601f5a Merge "Use <stdint.h> for INT32_MIN and INT32_MAX." 2014-01-25 01:25:50 +00:00
Elliott Hughes
81eb357b58 Use <stdint.h> for INT32_MIN and INT32_MAX.
Bug: 12708004
Change-Id: I99f222b2db1d128abf6ffbf7173a5aaff48f8e85
2014-01-24 16:08:03 -08:00
Colin Cross
4800e20eaf Merge "system/core: rename aarch64 target to arm64" 2014-01-24 20:32:49 +00:00
Brian Carlstrom
794b587b37 Merge "Fix entry handling for 0 length entries." 2014-01-24 18:18:12 +00:00
Nick Kralevich
0620e3ddb8 Merge "adbd: switch to su domain when running as root" 2014-01-24 17:59:39 +00:00
Narayan Kamath
48953a1b8f Fix entry handling for 0 length entries.
Two minor issues were fixed:
- The offset to entry data can be the same as the
  central directory offset when the last entry in the
  file has length 0 and is stored (not deflated). Fix
  a check that disallowed this. We already have a strict
  check that entry data must end before the central directory,
  so we're covered.
- We would attempt to map a segment of length 0 when writing
  an entry whose length is 0. We should just return early in
  this case.

bug: 12623277
Change-Id: I2a4ca0c4d170cc3cbf326e5ca13894acd9c434c9
2014-01-24 13:41:55 +00:00
Colin Cross
d4146e6091 system/core: rename aarch64 target to arm64
Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
2014-01-23 18:01:14 -08:00
Colin Cross
5bd11b4887 Merge changes Ib13d9654,I98723ccd
* changes:
  system/core: remove $(KERNEL_HEADERS) from includes
  libcutils: fix atomic_memory_store_barrier
2014-01-24 00:26:59 +00: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
Colin Cross
3510637c85 libcutils: fix atomic_memory_store_barrier
dmb isht is not a valid instruction, fix it to be dmb ishst
(data memory barrier, inner shareable, on writes).

Change-Id: I98723ccd8618b7863cb55da53dc29b979c9905a5
2014-01-22 19:04:28 -08:00
Nick Kralevich
d49aa2537c adbd: switch to su domain when running as root
When adbd runs as root, it should transition into the
su domain. This is needed to run the adbd and shell
domains in enforcing on userdebug / eng devices without
breaking developer workflows.

Introduce a new device_banner command line option.

Change-Id: Ib33c0dd2dd6172035230514ac84fcaed2ecf44d6
2014-01-22 14:20:17 -08:00
Christopher Ferris
1db584b899 Merge "Attempt to fix Mac build" 2014-01-18 23:47:21 +00:00
Brian Carlstrom
db5911a08a Attempt to fix Mac build
Change-Id: I1364255bfed7788a35531962508bad804b8d5b7f
2014-01-18 13:55:54 -08:00
Nick Kralevich
0a72d2930a Merge "Fix "adb push /sdcard/filename"" 2014-01-18 01:01:11 +00:00
Nick Kralevich
72917837e6 Fix "adb push /sdcard/filename"
Don't assume that calling chown(filename, getuid(), getgid())
will always succeed. In the case of /sdcard, a file you create
will be owned by root, so the chown call will fail.

Instead, use uid=gid=-1 so that the chown call is truly a no-op.

Ignore the results of calling chmod. Again, for /sdcard, the
chmod call will never succeed, because the file isn't owned by
the shell user.

Bug: 12441485
Change-Id: I11eaf1d6f6049c1158afc29754fbb7af2baf2c78
2014-01-17 16:16:42 -08:00
Elliott Hughes
6192eedb43 Merge "Fix 'r' for LP64." 2014-01-17 18:03:40 +00:00
Elliott Hughes
2430a064bd Fix 'r' for LP64.
Change-Id: I8332a0a8045a70b3992fe34b0b9e334a721265a9
2014-01-17 09:50:56 -08:00
Christopher Ferris
17b9c82765 Merge "Add PROT_* constants not found on windows." 2014-01-17 16:26:37 +00:00
Christopher Ferris
0dbce4564b Add PROT_* constants not found on windows.
Change-Id: Ic515363ed66dfb2d8e1a6fdfa274508b3a91311d
2014-01-17 08:25:26 -08:00
Christopher Ferris
eb8d73b675 Merge "Rewrite libbacktrace to be all C++." 2014-01-17 15:07:18 +00:00
Christopher Ferris
46756821c4 Rewrite libbacktrace to be all C++.
This includes removing the map_info.c source and replacing it with the
BacktraceMap class to handle all map related code.

Change all callers of libbacktrace map functionality.

Also modify the corkscrew thread code so that it doesn't need to build
the map twice (once in the corkscrew format and once in the libbacktrace
format).

Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
2014-01-16 16:12:29 -08:00
Elliott Hughes
524b3a0c40 Merge "Remove obsolete 'setconsole' command." 2014-01-16 23:55:50 +00:00
Elliott Hughes
c1e91b0034 Remove obsolete 'setconsole' command.
Change-Id: I643a48653006b97bb10d7b996ecc003dbafad590
2014-01-16 14:50:23 -08:00
Elliott Hughes
7cd1561410 Merge "system/core 64-bit cleanup." 2014-01-16 21:59:58 +00:00
Elliott Hughes
ccecf14254 system/core 64-bit cleanup.
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.

Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
2014-01-16 12:54:18 -08:00
Nick Kralevich
7580661df1 Merge "fs_mgr: increase verboseness on mount errors" 2014-01-16 19:14:30 +00:00
Nick Kralevich
e847f429f4 Merge "restorecon /data/misc/media." 2014-01-15 20:06:52 +00:00
William Roberts
071f28ae0e fs_mgr: increase verboseness on mount errors
While debugging a mount error, the dmesg output was less
than ideal. The error would be declared but why the mount
failed, and what options were passed was not present. This
patch ensures that the mount options and underlying
errno are printed.

Change-Id: I2b3a2c113149df878c0a8a10ef86fd9e4f909658
2014-01-15 13:26:26 -05:00
Stephen Smalley
9e9f05e5eb restorecon /data/misc/media.
Otherwise it will be mislabeled on upgrades with existing userdata.

Change-Id: Ibde88d5d692ead45b480bb34cfe0831baeffbf94
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-01-15 13:19:31 -05:00
Nick Kralevich
37fd839fc2 Merge "Revert "fs_mgr: correct warning on unused function parameter"" 2014-01-15 06:20:42 +00:00
Nick Kralevich
bc7776716a Revert "fs_mgr: correct warning on unused function parameter"
The build is broken.

system/core/fs_mgr/fs_mgr.c:824:77: error: expected '(' before 'unused'
                      const char *blk_device, long long length  __attribute__(unused))
                                                                             ^
system/core/fs_mgr/fs_mgr.c: In function 'fs_mgr_add_entry':
system/core/fs_mgr/fs_mgr.c:824:56: warning: unused parameter 'length' [-Wunused-parameter]
                      const char *blk_device, long long length  __attribute__(unused))
                                                        ^
make: *** [out/target/product/generic_x86/obj/STATIC_LIBRARIES/libfs_mgr_intermediates/fs_mgr.o] Error 1
make: *** Waiting for unfinished jobs....
This reverts commit 21095d0cae.

Change-Id: I64f8c4d9c17c0e3bbf2eb427a2c0b81bbe66ec3a
2014-01-15 06:18:54 +00:00
Nick Kralevich
7169b2303d Merge "fs_mgr: correct warning on unused function parameter" 2014-01-15 05:57:33 +00:00
Elliott Hughes
3352c50375 Merge "Copy the bionic -fstack-protector hack into libbacktrace." 2014-01-15 00:46:48 +00:00
Elliott Hughes
1380ddcab2 Copy the bionic -fstack-protector hack into libbacktrace.
aarch64 doesn't support -fstack-protector yet.

Change-Id: Id1e589742ba074f59d3390d059248c9b371aff58
2014-01-14 16:44:31 -08:00
Elliott Hughes
21ecc30cd0 Merge "Fix fastbootd build for 64-bit." 2014-01-15 00:24:37 +00:00
Elliott Hughes
4f24125ccc Fix fastbootd build for 64-bit.
Change-Id: I04bef46f0125fd6a8fc0cb966bd257ad594aff1e
2014-01-14 16:17:08 -08:00
Elliott Hughes
aead003c8b Merge "Don't set LD_LIBRARY_PATH globally." 2014-01-14 23:59:09 +00:00
Elliott Hughes
d47ffb8890 Merge "AArch64: Add atomic functions" 2014-01-14 23:32:22 +00:00
Ashok Bhat
c15d2ce5fc AArch64: Add atomic functions
This patch adds atomic functions for AArch64. The functions
will be revisited later for potential optimizations using
assembly or otherwise.

This patch also introduces new 64-bit atomic functions for
LP64 platforms.

Change-Id: Id2127dd01cea65025f939e955d73d27e95d8687e
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-01-14 12:45:58 -08:00
William Roberts
21095d0cae fs_mgr: correct warning on unused function parameter
target thumb C: libfs_mgr <= system/core/fs_mgr/fs_mgr.c
system/core/fs_mgr/fs_mgr.c: In function 'fs_mgr_add_entry':
system/core/fs_mgr/fs_mgr.c:828:56: warning: unused parameter 'length' [-Wunused-parameter]
                      const char *blk_device, long long length)

Change-Id: Ide1bfa120c4f8d8e2f643929cb84c1be065e3310
2014-01-14 15:04:56 -05:00
Christopher Ferris
91e2019f81 Merge "Create a bare bones host libbacktrace on mac." 2014-01-14 18:03:10 +00:00
Christopher Ferris
f67c6410d1 Create a bare bones host libbacktrace on mac.
This allows the libbacktrace library to compile for host on mac.

Bug: 12474939
Change-Id: I32cbcf996e6fe9057e5065ba21f89086343704a0
2014-01-13 23:57:35 -08:00
Christopher Ferris
688701990d Merge "Next phase of the move, reformat use C++ features." 2014-01-14 01:18:20 +00:00
Elliott Hughes
bb07b536f5 Don't set LD_LIBRARY_PATH globally.
On a 64-bit system, 64-bit processes will want one path, 32-bit processes
another. The dynamic linker already provides the correct defaults for
native code, and we've coupled the VM and dynamic linker so that
LD_LIBRARY_PATH will be set correctly in any VM during startup if it's not
being manually overridden.

Change-Id: Icbffc0d451dbc242cdfb9267413d8bcac434e108
2014-01-13 16:49:54 -08:00
Nick Kralevich
105f6b6686 Merge "restorecon_recursive("/sys") speed boot time" 2014-01-14 00:19:53 +00:00
Christopher Ferris
20303f856f Next phase of the move, reformat use C++ features.
Use the libbacktrace C++ interface instead of the C interface in debuggerd.

Reformat the debuggerd code to be closer to Google C++ style.

Fix all debuggerd casts to be C++ casts.

Add a frame number to the frame data structure for ease of formatting and
add another FormatFrameData function.

Change the format_test to use the new FormatFrameData function.

Modify all of the backtrace_test to use the C++ interface.

Change-Id: I10e1610861acf7f4a3ad53276b74971cfbfda464
2014-01-13 14:21:52 -08:00