Commit Graph

35188 Commits

Author SHA1 Message Date
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 fca673aa6b Merge "Fix ScopedSignalHandler" am: 7dbf1a187e am: 1deafe164b am: 9a29d20486
am: 33c6549f73

Change-Id: Ib6cac533bb0b8e42b6508ef72f4561e0d351e8eb
2017-06-30 07:03:38 +00:00
Colin Cross 33c6549f73 Merge "Fix ScopedSignalHandler" am: 7dbf1a187e am: 1deafe164b
am: 9a29d20486

Change-Id: I0d6f957a8cd0f6feeb2f2ccc89b858bdfa8190cd
2017-06-30 06:59:07 +00: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 ea8ac69141 Merge changes I0a95f87a,I36b22986 am: a703202093 am: 835d259e7a am: 40e88b22f2
am: 1b42dbf22c

Change-Id: Icf60412199db65e686c2f3b38087d0fc66cad7f6
2017-06-30 04:38:03 +00:00
Luis Hector Chavez 1b42dbf22c Merge changes I0a95f87a,I36b22986 am: a703202093 am: 835d259e7a
am: 40e88b22f2

Change-Id: I04e3d91d34d2c50d15ab2357db175b1f69796af1
2017-06-30 04:33:30 +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 ea5fd4d828 Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6 am: 46706e6824 am: 74c02e7b58
am: 888d9e198b

Change-Id: I6f3a475bfff19801792ff7017150be6955cdd631
2017-06-30 02:45:24 +00:00
Robert Benea 888d9e198b Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6 am: 46706e6824
am: 74c02e7b58

Change-Id: Iba2c643286063a9ffa22f3917f8acbcca1d77ef3
2017-06-30 02:41:24 +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
Elliott Hughes 482b485863 Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab am: 09181f3dd9 am: 94d5235c25
am: f4b01412f1

Change-Id: Ic734799f264d40d2f8d2c0ed297bdbfe46c14b88
2017-06-30 00:15:54 +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 f4b01412f1 Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab am: 09181f3dd9
am: 94d5235c25

Change-Id: I128a89de4783b152f4129d0c5f16e766ed349ea2
2017-06-30 00:07:45 +00: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 6a0c4e97cf Merge "Remove assert, use CHECK instead." am: 5d6d932a60 am: a520b8baa8 am: fc04d39ab5
am: 2b49c8ceb7

Change-Id: I194e5657b524da266e11398dbf93794c76efbdba
2017-06-29 23:05:45 +00:00
Christopher Ferris 2b49c8ceb7 Merge "Remove assert, use CHECK instead." am: 5d6d932a60 am: a520b8baa8
am: fc04d39ab5

Change-Id: Ifae83c8dd425b554b948b7b25edffc9e8981f2bf
2017-06-29 23:01:25 +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 1e7d612d86 Merge "healthd: notify listeners using local copy of list, drop lock" am: e29a6cda31 am: 51741d2f50 am: 93a45c0b6c
am: 4ec2a299fa

Change-Id: I65d608c4537a6bc369c96cf8333c03d160f5943a
2017-06-29 22:48:01 +00:00
Todd Poynor 4ec2a299fa Merge "healthd: notify listeners using local copy of list, drop lock" am: e29a6cda31 am: 51741d2f50
am: 93a45c0b6c

Change-Id: Iefecfe113c997f946488dc1db83feb4a12cb3ba6
2017-06-29 22:37: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
Josh Gao 0c96c5f281 Revert "adb: turn on libusb by default." am: aabd9a09b5
am: b6e271d219

Change-Id: Ia6d3bab69db3d034f443b0652f21fb7e110e4d97
2017-06-29 20:48:56 +00:00
Josh Gao b6e271d219 Revert "adb: turn on libusb by default."
am: aabd9a09b5

Change-Id: I704426213b4470cdd35513abe6fd5fb7a592d973
2017-06-29 20:44:57 +00:00
Josh Gao aabd9a09b5 Revert "adb: turn on libusb by default."
This reverts commit f2f0b31850.

libusb seems to be causing flakiness on some machines. Disable it for
now.

Bug: http://b/62962248
Test: python test_device.py (with DeviceOfflineTest commented out)
Change-Id: Ia9de78ab772c22574cf5ca7facb78f22af6d7a71
(cherry picked from commit 969110ca4a)
2017-06-29 11:22:55 -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
Steven Moreland fca20d8aa1 logd + liblogd to Android.bp
Test: boot, adb logcat produces output
Change-Id: I89e7f9a19e139d3f5a71040b1555d01913946b85
2017-06-29 09:29:36 -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
TreeHugger Robot 41d11bdb5c Merge "Don't look up parent user SID." 2017-06-29 11:52:12 +00:00
Christopher Ferris ecb00831c3 Merge "Fix mac build." am: 51b4f48280 am: e1a58a8c5c am: c45d756d70
am: 80cca3b25c

Change-Id: Iae543bcdbde92c65603f0f10b8c810305ab4cf3d
2017-06-29 07:22:43 +00:00
Christopher Ferris 80cca3b25c Merge "Fix mac build." am: 51b4f48280 am: e1a58a8c5c
am: c45d756d70

Change-Id: Id2b214a43c90e0a56161eb195c8efd641e2825f5
2017-06-29 07:18:28 +00: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 1f56fbff17 Merge "Allow SLOG* to vendors" am: 6afbd476ab am: eacf704a6c am: 708f8295e0
am: dfed7fb8ca

Change-Id: Id33825d72c8fa402a952cddd58c9a50f878ef3ff
2017-06-29 04:11:27 +00:00