Commit graph

33994 commits

Author SHA1 Message Date
Tianjie Xu
5f7bb2b1df Merge changes Ie89f709b,Ibf543a7d,I1d8092a1 am: 67897d47ce -s ours
am: 14f913817f  -s ours

Change-Id: I74f5fd6117de8b9aab9913cba352183348d56cd5
2017-06-30 15:50:42 +00:00
Tianjie Xu
14f913817f Merge changes Ie89f709b,Ibf543a7d,I1d8092a1
am: 67897d47ce  -s ours

Change-Id: I92f71f1f89759f5f670577b87650141ebf859efc
2017-06-30 15:46:13 +00:00
Treehugger Robot
67897d47ce Merge changes Ie89f709b,Ibf543a7d,I1d8092a1
* changes:
  Fix out of bound read in libziparchive
  Check filename memory bound when parsing ziparchive
  Fix out of bound access in libziparchive
2017-06-30 15:38:13 +00:00
Tianjie Xu
0fda1cf633 Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.

Bug: 36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Merged-In: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit 74464a1361)
2017-06-30 17:19:56 +09:00
Tianjie Xu
9e020e2d11 Check filename memory bound when parsing ziparchive
Add a check to ensure the filename boundary doesn't exceed the mapped
memory region. Also add the corresponding unit test.

Bug: 28802225
Test: New unit test passes.
Merged-In: Ibf543a7da3d7898952e9eb332c84cdfc67cf5aa4
Change-Id: Ibf543a7da3d7898952e9eb332c84cdfc67cf5aa4
(cherry picked from commit bcc4431f24)
2017-06-30 17:19:28 +09:00
Tianjie Xu
fba1a36fd9 Fix out of bound access in libziparchive
The boundary check of an invalid EOCD record may succeed due to the
overflow of uint32_t. Fix the check and add a unit test.

Test: Open the crash.apk and libziparchive reports the offset error as expected.

Bug: 31251826
Merged-In: I1d8092a19b73886a671bc9d291cfc27d65e3d236
Change-Id: I1d8092a19b73886a671bc9d291cfc27d65e3d236
(cherry picked from commit ae8180c06d)
2017-06-30 17:18:31 +09:00
Colin Cross
9a29d20486 Merge "Fix ScopedSignalHandler" am: 7dbf1a187e
am: 1deafe164b

Change-Id: Ie40e77a28100eddb12a85cc8bcd31f169f317805
2017-06-30 06:54:38 +00:00
Colin Cross
1deafe164b Merge "Fix ScopedSignalHandler"
am: 7dbf1a187e

Change-Id: Ic85a20682ecaa109d03827a694efd751e0fb9418
2017-06-30 06:50:38 +00:00
Treehugger Robot
7dbf1a187e Merge "Fix ScopedSignalHandler" 2017-06-30 06:44:40 +00:00
Luis Hector Chavez
40e88b22f2 Merge changes I0a95f87a,I36b22986 am: a703202093
am: 835d259e7a

Change-Id: I329bddc9b470da86d07bde3ce3ab8a69c37a38e2
2017-06-30 04:29:28 +00:00
Luis Hector Chavez
835d259e7a Merge changes I0a95f87a,I36b22986
am: a703202093

Change-Id: Id0ab2a68ade41db6c1327d9b96489bf0f9a223cb
2017-06-30 04:24:32 +00:00
Treehugger Robot
a703202093 Merge changes I0a95f87a,I36b22986
* changes:
  init: Use ScopedCaps for cap_init()
  init: Reland "Terminate gracefully when CAP_SYS_BOOT is absent"
2017-06-30 04:19:09 +00:00
Robert Benea
74c02e7b58 Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6
am: 46706e6824

Change-Id: I88b0928e78f4faf6eebfe94ef7c1e528dc543327
2017-06-30 02:36:53 +00:00
Robert Benea
46706e6824 Merge "Use mem cgroups in libprocessgroup if they're available"
am: d3afc124b6

Change-Id: Idd72671eb144343a73a02bfbde8603265ca78650
2017-06-30 02:32:24 +00:00
Robert Benea
d3afc124b6 Merge "Use mem cgroups in libprocessgroup if they're available" 2017-06-30 02:26:30 +00:00
Colin Cross
eac4ecc34f Fix ScopedSignalHandler
I4ae2d82fdfdd58cf8ef1dfb6c401cef4ba9d3e88 broke memunreachable_test
by replacing signal_ with signal.

Test: memunreachable_test
Change-Id: I8148321e3a94530867106708a33b5b63ed867380
2017-06-29 17:13:35 -07:00
Elliott Hughes
94d5235c25 Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab
am: 09181f3dd9

Change-Id: I95e37353d84e69df12a2b5ef36b02b771cbbf0eb
2017-06-30 00:03:45 +00:00
Elliott Hughes
09181f3dd9 Merge "Remove more documentation for obsolete board configuration."
am: 73a6512bab

Change-Id: I964c133a654efbc3d40bbebc7247863455e8cb54
2017-06-29 23:59:43 +00:00
Elliott Hughes
73a6512bab Merge "Remove more documentation for obsolete board configuration." 2017-06-29 23:50:37 +00:00
Robert Benea
32375c2328 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ib9d1c8e3c797e75f160e0e92edf3f11c9d8e9f17
2017-06-29 23:49:00 +00:00
Christopher Ferris
fc04d39ab5 Merge "Remove assert, use CHECK instead." am: 5d6d932a60
am: a520b8baa8

Change-Id: I5ed89883d2bfaddc7e26c16abcb8a111776ee62b
2017-06-29 22:57:07 +00:00
Christopher Ferris
a520b8baa8 Merge "Remove assert, use CHECK instead."
am: 5d6d932a60

Change-Id: I84ca9a5e4a77c44a336245286c1d40d7fd4de003
2017-06-29 22:53:09 +00:00
Christopher Ferris
5d6d932a60 Merge "Remove assert, use CHECK instead." 2017-06-29 22:49:38 +00:00
Todd Poynor
93a45c0b6c Merge "healthd: notify listeners using local copy of list, drop lock" am: e29a6cda31
am: 51741d2f50

Change-Id: Iac44a0aaa44cb91666df0c24226457b6db4048b6
2017-06-29 22:33:36 +00:00
Todd Poynor
51741d2f50 Merge "healthd: notify listeners using local copy of list, drop lock"
am: e29a6cda31

Change-Id: I94c6b076148c65e82ef13fc75b4be15b3e930901
2017-06-29 22:29:36 +00:00
Treehugger Robot
e29a6cda31 Merge "healthd: notify listeners using local copy of list, drop lock" 2017-06-29 22:26:01 +00:00
Todd Poynor
8bd30b3cf3 healthd: notify listeners using local copy of list, drop lock
Binder currently may service an incoming oneway transaction whenever
an outbound oneway call is made (if there is already a pending
incoming oneway call waiting).  The unexpected nested method call
blocks forever on a recursive mutex acquire because healthd is single-
threaded.  The binder behavior is considered a bug and may change in
the future.  For now, work around this in healthd.

Make a local copy of the listeners list, then drop the lock and
perform the outbound calls on the local copy of the list.

Bug: 38201220
Test: Marlin with modified client calling scheduleUpdate() repeatedly
Change-Id: If35c2847556245921e2aff808ff747bb60356811
2017-06-29 22:25:40 +00:00
Luis Hector Chavez
7bb360230d init: Use ScopedCaps for cap_init()
This change homogenizes the use of std::unique_ptr for storing
capabilities in system/core/.

Bug: None
Test: m
Change-Id: I0a95f87a27b0261e9d321841d5140fc000473293
2017-06-29 14:41:23 -07:00
Luis Hector Chavez
519e5f0592 init: Reland "Terminate gracefully when CAP_SYS_BOOT is absent"
This change makes it possible for Android running in a container to
terminate cleanly instead of calling abort() when requested to shut
down.

Bug: 62388055
Test: `adb reboot` on bullhead causes no kernel panics
Test: `adb reboot` on a system without CAP_SYS_BOOT makes init terminate
       nicely

Change-Id: I36b2298610f5b4a2bf8b05103d04804883df2c88
2017-06-29 14:41:23 -07:00
Christopher Ferris
9416703f5b Remove assert, use CHECK instead.
- Use the CHECK macro everywhere that assert was used.
- Remove the _debug version of the tests and leave the CHECK macro so
  it's always checking in the code.

Bug: 23762183

Test: Ran unit tests.
Change-Id: Ie705eedae393d0e95bb9d99f852687a11881aef1
2017-06-29 10:29:43 -07:00
Elliott Hughes
5dc7736f60 Remove more documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I0a4ea974a81aadba1a554072ceff9f243a70be0d
2017-06-29 08:52:49 -07:00
Christopher Ferris
c45d756d70 Merge "Fix mac build." am: 51b4f48280
am: e1a58a8c5c

Change-Id: I426356ef94fe8cde53913403d9b5175ecf502885
2017-06-29 07:14:01 +00:00
Christopher Ferris
e1a58a8c5c Merge "Fix mac build."
am: 51b4f48280

Change-Id: Ibd1f92670c0238f094616125be0080c8d5c0a50b
2017-06-29 07:10:46 +00:00
Christopher Ferris
51b4f48280 Merge "Fix mac build." 2017-06-29 07:02:08 +00:00
Jiyong Park
708f8295e0 Merge "Allow SLOG* to vendors" am: 6afbd476ab
am: eacf704a6c

Change-Id: I234763f63446115ce8726c1c0a0c931b25bcee0b
2017-06-29 04:03:29 +00:00
Jiyong Park
eacf704a6c Merge "Allow SLOG* to vendors"
am: 6afbd476ab

Change-Id: I56d66068757cd962c237a8292aa481d96b417f17
2017-06-29 03:58:59 +00:00
Treehugger Robot
6afbd476ab Merge "Allow SLOG* to vendors" 2017-06-29 03:53:38 +00:00
Christopher Ferris
bfd6292db6 Fix mac build.
Test: Built.
Change-Id: I455381d29045dc6dddfb2b77dcde312722c06ebf
2017-06-28 20:44:48 -07:00
Christopher Ferris
8a35b33389 Merge "Add .gnu_debugdata support." am: 9302daeb1d
am: 8af6071173

Change-Id: Ifdd8fc69b05e35c9300466407a10a4d641086d92
2017-06-29 01:29:39 +00:00
Jiyong Park
9ffeab85bf Allow SLOG* to vendors
Not only vendor libs, but also Android libs that are marked as
vendor_available are using SLOG*. Since both pure vendor libs and
Android libs available to vendors are using the same liblog headers for
VNDK, SLOG* needs to be visible via the headers.

Bug: 63088165
Test: BOARD_VNDK_VERSION=current m -j ATFWD-daemon
(or any other vendor modules using SLOG*)

Change-Id: Idfb74887a42d2418d3896bfdf5be3b4fc8e4c27f
2017-06-29 10:25:25 +09:00
Christopher Ferris
8af6071173 Merge "Add .gnu_debugdata support."
am: 9302daeb1d

Change-Id: Idfa6a275050fdf638229e8417f6bb0008fe13dc8
2017-06-29 01:25:03 +00:00
Christopher Ferris
9302daeb1d Merge "Add .gnu_debugdata support." 2017-06-29 01:15:21 +00:00
Christopher Ferris
bae69f1892 Add .gnu_debugdata support.
Update the unwind_info tool to dump all of the sections.

Bug: 23762183

Test: Passes new unit tests.
Change-Id: I8b223bc208a1a2ef06ed333e6d96943c8f273681
2017-06-28 15:23:10 -07:00
Renaud Paquay
73bf5a910f Merge "Add (partial) support for Windows long paths" am: 9ed76f0acc
am: d82ff9fb87

Change-Id: Idc8bb805b3ff77b67ac140316c1201e5055f77b4
2017-06-28 19:26:23 +00:00
Renaud Paquay
d82ff9fb87 Merge "Add (partial) support for Windows long paths"
am: 9ed76f0acc

Change-Id: Iaa5ea4cb9bc8c045ac33c014f1283f2ef1936e56
2017-06-28 19:22:22 +00:00
Treehugger Robot
9ed76f0acc Merge "Add (partial) support for Windows long paths" 2017-06-28 19:15:38 +00:00
Renaud Paquay
e3e7813e5f Add (partial) support for Windows long paths
* Update android::base::utf8::open/unlink to support Windows long
  paths

* Add android::base::utf8::fopen, also with support for Windows long
  paths

* Upcoming CLs will add additional APIs to support additional use cases

Test: Added tests to utf8_test
Bug: 38268753
Change-Id: If72af327f3487766f5370a2f43ee9cabd4a8a810
2017-06-28 17:12:37 +00:00
Elliott Hughes
164f9c9e16 Merge "Remove documentation for obsolete board configuration." am: 3f4cea940d
am: a96d1aebdb

Change-Id: Icaf550946be2fa7a4bf35c5b183e2562b7f2a92b
2017-06-28 16:44:57 +00:00
Elliott Hughes
a96d1aebdb Merge "Remove documentation for obsolete board configuration."
am: 3f4cea940d

Change-Id: I61c8310bbca3690e2b7f9764429c118db780c551
2017-06-28 16:40:41 +00:00
Treehugger Robot
3f4cea940d Merge "Remove documentation for obsolete board configuration." 2017-06-28 16:36:52 +00:00