Commit graph

13472 commits

Author SHA1 Message Date
Elliott Hughes
5403d155a3 am e36b10a8: Merge "Switch libcutils from gethostbyname to getaddrinfo."
* commit 'e36b10a8179a6d55d374655f28b682633e19b009':
  Switch libcutils from gethostbyname to getaddrinfo.
2015-07-18 17:06:47 +00:00
Elliott Hughes
e36b10a817 Merge "Switch libcutils from gethostbyname to getaddrinfo." 2015-07-18 16:55:58 +00:00
Elliott Hughes
94ae41874a Switch libcutils from gethostbyname to getaddrinfo.
Needed for IPv6 support.

Bug: http://b/22559299
Change-Id: Id10d958b434b207e84bc2ec2ff83221f2c4e8168
2015-07-17 23:45:15 -07:00
Elliott Hughes
770b78bd23 am 683790ae: Merge "init: Fix bootchart trigger for emulator"
* commit '683790ae54cd0202385027d259f78894639911e7':
  init: Fix bootchart trigger for emulator
2015-07-16 21:23:30 +00:00
Elliott Hughes
c06c300115 am a1c344b9: Merge "Move mkdirs to adb_utils."
* commit 'a1c344b9de508dda83f60f9dea6559e7b6ea6c28':
  Move mkdirs to adb_utils.
2015-07-16 21:23:29 +00:00
Elliott Hughes
683790ae54 Merge "init: Fix bootchart trigger for emulator" 2015-07-16 21:11:23 +00:00
Elliott Hughes
a1c344b9de Merge "Move mkdirs to adb_utils." 2015-07-16 21:09:56 +00:00
Nick Kralevich
d9bb785244 am c66e37b2: Merge "init: refuse to start process if domain transition not defined"
* commit 'c66e37b2da62f536d698b0265321fb02929f7ea5':
  init: refuse to start process if domain transition not defined
2015-07-16 19:35:50 +00:00
Nick Kralevich
c66e37b2da Merge "init: refuse to start process if domain transition not defined" 2015-07-16 19:20:31 +00:00
Nick Kralevich
4800dbf1da init: refuse to start process if domain transition not defined
When SELinux is in enforcing mode, any process executed by
init must have a domain transition defined. See
https://android-review.googlesource.com/108640 for details. This
prevents an executable spawned by init from remaining in init's
(very powerful) SELinux domain.

However, this is only enforced when SELinux is in enforcing mode.
During new device bringup, it's common to run an Android device
in globally permissive mode. In globally permissive mode, SELinux
denials are logged only, but otherwise ignored. If appropriate
SELinux domain transitions are not defined from init to init spawned
processes, this could cause misleading SELinux denials attributed
to init instead of the child process.

To help address these misleading denials, modify init to not spawn
processes unless a domain transition is defined. This essentially
enforces the rules in https://android-review.googlesource.com/108640
on both permissive and enforcing kernels.

While I'm here, change some "freecon()" calls to "free()", with the
long term goal of deleting freecon() entirely.

Change-Id: I3ef3a372bb85df61a3f6234cb1113cc25fc6506a
2015-07-16 11:32:19 -07:00
Alex Vallée
1421614821 Move mkdirs to adb_utils.
There were duplicate implementations in commandline.cpp and
file_sync_client.cpp.

Change-Id: Ib448f76c0d7ffdcd577336b1c610a881425bc2db
2015-07-15 19:37:18 +00:00
Sami Tolvanen
6c3b205c40 am 759717ee: Merge "Update partition.*.verified even with ro.boot.veritymode set"
* commit '759717ee63f7d8a75089bc4adc308d190ec6b0ac':
  Update partition.*.verified even with ro.boot.veritymode set
2015-07-15 18:48:02 +00:00
Sami Tolvanen
759717ee63 Merge "Update partition.*.verified even with ro.boot.veritymode set" 2015-07-15 18:35:51 +00:00
Sami Tolvanen
2f42554f18 Update partition.*.verified even with ro.boot.veritymode set
We need to have partition.*.verified properties even when bootloader
is managing dm-verity mode, because we may have failed to set up the
verified partition and need a property to indicate this.

This means we still need to run fs_mgr_update_verity_state and walk
through all the partitions to verify the device mapper status, just
without updating verity mode.

Bug: 22489805
Change-Id: Iaf28185adb8b80e5452447e54e1f4e4417a34168
2015-07-15 09:11:13 +00:00
Yu Ning
9136f38aab init: Fix bootchart trigger for emulator
When launched with "-bootchart <timeout>", the Android emulator appends
"androidboot.bootchart=<timeout>" to the kernel command line, which
signals /init to start bootcharting. However, the current implementation
of bootchart_init() in init/bootchart.cpp does not parse the timeout
value correctly, preventing bootcharting to be enabled on the emulator.

This bug was introduced by commit 841b263 ("Further refactoring of the
bootchart code"). Fix it to honor the "androidboot.bootchart" trigger.

Change-Id: I221fe2c2f40a3a04bd478c3a083f7723bc309c8c
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-07-15 16:41:51 +08:00
Daniel Rosenberg
074ee014b5 am a0ced754: Merge "Remove creation of root directory folders"
* commit 'a0ced754367e75051d64c62ee4e2f1e4b9208169':
  Remove creation of root directory folders
2015-07-14 01:11:46 +00:00
Daniel Rosenberg
0039241124 am e7ed68ad: Merge "libcutils: fs_config: Add folders normally created in init.rc"
* commit 'e7ed68ad47bfa55b197a60fe95ce5a5f2905db10':
  libcutils: fs_config: Add folders normally created in init.rc
2015-07-14 01:11:44 +00:00
Daniel Rosenberg
f3cd170cdb am 3470855e: Merge "rootdir: Create folders in Android.mk"
* commit '3470855eef4e095ef254673575dd6366e972586c':
  rootdir: Create folders in Android.mk
2015-07-14 01:11:42 +00:00
Daniel Rosenberg
a0ced75436 Merge "Remove creation of root directory folders" 2015-07-14 00:57:19 +00:00
Daniel Rosenberg
e7ed68ad47 Merge "libcutils: fs_config: Add folders normally created in init.rc" 2015-07-14 00:56:25 +00:00
Daniel Rosenberg
3470855eef Merge "rootdir: Create folders in Android.mk" 2015-07-14 00:55:24 +00:00
Calin Juravle
ed5c99eacc am 09a0b17d: Merge "Allow native bridge to work without a code cache"
* commit '09a0b17d863b919f109a6377a4b3e1e75bb67a98':
  Allow native bridge to work without a code cache
2015-07-13 13:02:42 +00:00
Calin Juravle
09a0b17d86 Merge "Allow native bridge to work without a code cache" 2015-07-13 12:50:44 +00:00
Tao Bao
75b3f8c9a6 am 87101256: Merge "libsparse: Wrap sparse_crc32.h to be C++ compatible."
* commit '871012566441e1b14b03ef0584402f31b668c96a':
  libsparse: Wrap sparse_crc32.h to be C++ compatible.
2015-07-11 21:58:33 +00:00
Tao Bao
8710125664 Merge "libsparse: Wrap sparse_crc32.h to be C++ compatible." 2015-07-11 21:46:46 +00:00
Tao Bao
a29c0127fa libsparse: Wrap sparse_crc32.h to be C++ compatible.
Change-Id: Ic6b1721859937984619a262c459f1f734d81c149
2015-07-11 12:48:42 -07:00
jgu21
cef898fa8f Allow native bridge to work without a code cache
In isolatedProcess, the app_code_cache_dir is not needed
for native bridge. This commit allows native bridge to work
without a code cache in isolatedProcess.

Change-Id: I8580268d5ec6ca8d44e4500c3fafe10408e1e0d3
Signed-off-by: jgu21 <jinghui.gu@intel.com>
2015-07-10 11:22:09 +08:00
Christopher Ferris
c03e40fb81 am a3ee46f1: Merge "Dump memory going from unreadable to readable."
* commit 'a3ee46f1056fd52b05b627319cf82da75c6c7e59':
  Dump memory going from unreadable to readable.
2015-07-09 23:48:37 +00:00
Christopher Ferris
a3ee46f105 Merge "Dump memory going from unreadable to readable." 2015-07-09 23:38:26 +00:00
Pirama Arumuga Nainar
850745382a am 8cd62808: Merge "Use delete[] to de-allocate pointers from new[]"
* commit '8cd62808d40de4ebd3ce95ea151fcc13260103fd':
  Use delete[] to de-allocate pointers from new[]
2015-07-09 22:50:56 +00:00
Pirama Arumuga Nainar
8cd62808d4 Merge "Use delete[] to de-allocate pointers from new[]" 2015-07-09 22:40:32 +00:00
Christopher Ferris
456abbabf2 Dump memory going from unreadable to readable.
If the first read when dumping memory returns no data, skip ahead to
the next page boundary and try and read from there. This fixes a case
where the address at which to start dumping memory is unreadable, but
crosses back into readable memory.

Bug: 22234753
Change-Id: Ie28d5c027013577ca06f5396aba498366a3b6749
2015-07-09 15:35:47 -07:00
Dan Albert
00599eca74 am e84205bf: Merge "Revert "Turn on -Wformat-nonliteral.""
* commit 'e84205bf6ee391c9e2fec14b6bffc1f9f096bfdf':
  Revert "Turn on -Wformat-nonliteral."
2015-07-09 20:49:15 +00:00
Dan Albert
e84205bf6e Merge "Revert "Turn on -Wformat-nonliteral."" 2015-07-09 20:35:36 +00:00
Dan Albert
286bb6ddbd Revert "Turn on -Wformat-nonliteral."
One of my build aliases doesn't play nice with USE_MINGW=1, so my build lied to me. Will revert until I fix it up.

This reverts commit 459df8f3a1.

Change-Id: I7905c5ae5ee85fb2d228ce63d81c79f140998c18
2015-07-09 20:35:09 +00:00
Dan Albert
fcdc3141d3 am a35affb5: Merge "Turn on -Wformat-nonliteral."
* commit 'a35affb5fc9e7cd19a2669a82cda19789314a783':
  Turn on -Wformat-nonliteral.
2015-07-09 20:00:55 +00:00
Dan Albert
a35affb5fc Merge "Turn on -Wformat-nonliteral." 2015-07-09 19:48:55 +00:00
Pirama Arumuga Nainar
837eff22c8 Use delete[] to de-allocate pointers from new[]
Upstream clang has a new diagnostic, '-Wmismatched-new-delete' to
generate a warning (that becomes an error with -Werror) when delete is
used to deallocate pointers created with 'new[]'.  This patch fixes
'delete's that trigger this warning/error.

Change-Id: I7551e856b4b13bfae4cb78b5664d8652322683cf
2015-07-09 10:50:04 -07:00
Dan Albert
459df8f3a1 Turn on -Wformat-nonliteral.
Apparently there are two classes of this warning in clang.
-Wformat-security is only emitted for cases of
`func(nonliteral_fmt_string)` (no args), and -Wformat-nonliteral is
emitted for cases *with* arguments. For whatever reason, the latter
isn't included in -Wextra and must be manually enabled.

To make this more easily portable to Windows, move the existing
gnu_printf/__printf__ decision into base/macros.h as ATTRIBUTE_FORMAT.

Change-Id: I3b0990e1d1f0a2e9c13b32f5cd60478946cb5fc6
2015-07-09 10:47:24 -07:00
Elliott Hughes
9d748c8bf4 am a6241a02: Merge "Replace HAVE_WIN32_IPC with _WIN32."
* commit 'a6241a0298de5e773ef113626ca4686f9c038868':
  Replace HAVE_WIN32_IPC with _WIN32.
2015-07-09 17:29:46 +00:00
Elliott Hughes
a6241a0298 Merge "Replace HAVE_WIN32_IPC with _WIN32." 2015-07-09 17:16:13 +00:00
Elliott Hughes
095307ec49 Replace HAVE_WIN32_IPC with _WIN32.
Change-Id: Ie9dc064fb23a4e4bd4856c9668784dec0be9d2d6
2015-07-09 10:03:18 -07:00
Daniel Rosenberg
64dffd3975 Remove creation of root directory folders
Folders in the root directory are now created during the build,
as we may be building without a ramdisk, and when we do that,
the root directory will be read-only.  With those changes,
these mkdirs will never need to run.

Change-Id: I49c63e8bfc71d28e3f938ed41f81d108359fa57a
2015-07-08 16:37:13 -07:00
Daniel Rosenberg
bbe796d231 libcutils: fs_config: Add folders normally created in init.rc
When the ramdisk is built into the system image, we need to create
those folders during the build.

Change-Id: I40881940c75e379d7599dc1f743b35fbc7cc66e8
2015-07-08 16:37:13 -07:00
Daniel Rosenberg
58458b66d4 rootdir: Create folders in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I157ccbebf36bee9916f3f584551704ec481ae1d1
2015-07-08 16:37:13 -07:00
Christopher Ferris
0473a1ea51 am b6deb331: Merge "New property that determines when to wait for gdb."
* commit 'b6deb33120a2b84b64fbf63bf2ec17bc8d13d2e3':
  New property that determines when to wait for gdb.
2015-07-08 23:17:10 +00:00
Christopher Ferris
b6deb33120 Merge "New property that determines when to wait for gdb." 2015-07-08 23:07:21 +00:00
Christopher Ferris
d79f2bebcc New property that determines when to wait for gdb.
Use debug.debuggerd.wait_for_gdb being set to non-zero to
determine if debuggerd should stop and wait for someone to
attach gdb to the crashing process.

Bug: 22233908
Change-Id: Id55a1572b479a70d395b7270392ce6fb70dbfdca
2015-07-08 16:01:49 -07:00
Daniel Rosenberg
32933ff511 am dc4fa7f6: Merge "Fix "adb remount" for when the root directory is in system.img"
* commit 'dc4fa7f68a5cf2a2d94b9e2c401d7af0bcf2f5ca':
  Fix "adb remount" for when the root directory is in system.img
2015-07-08 20:27:31 +00:00
Daniel Rosenberg
dc4fa7f68a Merge "Fix "adb remount" for when the root directory is in system.img" 2015-07-08 20:15:15 +00:00