Commit graph

34719 commits

Author SHA1 Message Date
Dan Albert
6c95c3edcd Merge "Indicate that a packet was truncated." am: 046160959c am: e76c8020ba
am: c83ec67ec3

Change-Id: I61c12bc6fbcd205c2421831a64ffb783249a2222
2017-06-27 23:06:56 +00:00
Dan Albert
c83ec67ec3 Merge "Indicate that a packet was truncated." am: 046160959c
am: e76c8020ba

Change-Id: I24adc5cda36ba74afa2bda3e86e13af834b15a2c
2017-06-27 23:03:57 +00:00
Dan Albert
e76c8020ba Merge "Indicate that a packet was truncated."
am: 046160959c

Change-Id: Id672c3c987c2ba2b12c8296b659038d95bfd48f8
2017-06-27 23:00:57 +00:00
Treehugger Robot
046160959c Merge "Indicate that a packet was truncated." 2017-06-27 22:50:48 +00:00
Todd Poynor
84c07a584a healthd: notify listeners using local copy of list, drop lock am: fd68370074
am: 4d88b49320

Change-Id: Ie6b6fbd17a2c2003206bd3f337aeda3a0bb3a389
2017-06-27 22:03:40 +00:00
Mark Salyzyn
872206fd80 Merge changes Ibe1feb39,I05be83e4,If1422e4d am: a4f086ab20 am: 3a156e6c2b
am: ca0c0bb96e

Change-Id: I21636d01cf0cb0bd581104d2bfb5624877bfaf6a
2017-06-27 21:57:34 +00:00
Mark Salyzyn
ca0c0bb96e Merge changes Ibe1feb39,I05be83e4,If1422e4d am: a4f086ab20
am: 3a156e6c2b

Change-Id: I8c75910845dbf6dfbb50ad38eb234dcd68dce70f
2017-06-27 21:55:26 +00:00
Todd Poynor
8ffe398168 healthd: notify listeners using local copy of list, drop lock am: fd68370074
am: a1f4cddfea

Change-Id: Iaf638e874c2b601ce0927c2747243dea5119f8a0
2017-06-27 21:54:31 +00:00
Todd Poynor
a1f4cddfea healthd: notify listeners using local copy of list, drop lock
am: fd68370074

Change-Id: I8b8c8bb2b2eede878bb44afcaa08f73142a10d64
2017-06-27 21:52:29 +00:00
Todd Poynor
4d88b49320 healthd: notify listeners using local copy of list, drop lock
am: fd68370074

Change-Id: I6ab2f3131139a553bf9e8eb927e266ab128a5f49
2017-06-27 21:52:28 +00:00
Mark Salyzyn
3a156e6c2b Merge changes Ibe1feb39,I05be83e4,If1422e4d
am: a4f086ab20

Change-Id: I7e5d431c992f9860ca7b42ca81edfbfd1d8e0a1c
2017-06-27 21:52:06 +00:00
Treehugger Robot
a4f086ab20 Merge changes Ibe1feb39,I05be83e4,If1422e4d
* changes:
  init.rc: setup console-ramoops-0
  healthd: check console-ramoops-0
  fs_mgr: check console-ramoops-0
2017-06-27 21:46:30 +00:00
Elliott Hughes
97f2fa94a5 Merge "Allow configuration of the number of tombstones." am: 3e8d923276 am: 216ac36534
am: 03cec0a7db

Change-Id: Ifb9389c6252139bb656c1dd991261d9d8b6430e6
2017-06-27 21:06:57 +00:00
Elliott Hughes
03cec0a7db Merge "Allow configuration of the number of tombstones." am: 3e8d923276
am: 216ac36534

Change-Id: I2a7b3950d841b7d458c0a66f402f49780caae6a0
2017-06-27 21:03:58 +00:00
Elliott Hughes
216ac36534 Merge "Allow configuration of the number of tombstones."
am: 3e8d923276

Change-Id: I6c523c75801518b8cee7aa375b9b58f0914d150f
2017-06-27 21:01:16 +00:00
Elliott Hughes
3e8d923276 Merge "Allow configuration of the number of tombstones." 2017-06-27 20:57:08 +00:00
Dan Albert
9893f93950 Indicate that a packet was truncated.
Test: make checkbuild, check adb log
Bug: None
Change-Id: I0006ed284697f01966fdd79ca0b05dbc6d2eecf0
2017-06-27 13:26:14 -07:00
Todd Poynor
fd68370074 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-27 11:58:17 -07:00
Mark Salyzyn
4eb0ba058c init.rc: setup console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ibe1feb39ef9081b1ab2316510674bf181bdc7b0c
2017-06-27 09:32:38 -07:00
Mark Salyzyn
26f1dd764c healthd: check console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: I05be83e40dfc1730ed62b74a146123cdb8573ca6
2017-06-27 09:28:57 -07:00
Mark Salyzyn
cab56c0ba5 fs_mgr: check console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: If1422e4df09b68c44f16608b1d191aeb6378c66b
2017-06-27 09:10:16 -07:00
Ben Fennema
52c61939c3 Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93 am: cd3584e90b
am: 609b4cf6a5

Change-Id: Ice84d7764a4394b3f101673b5b310860adf59fd6
2017-06-26 22:54:10 +00:00
Ben Fennema
609b4cf6a5 Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93
am: cd3584e90b

Change-Id: I8127f1b5f6b6b7667e65c53d0ae5ee91ba28d92e
2017-06-26 22:52:09 +00:00
Ben Fennema
cd3584e90b Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
am: 449bfd7a93

Change-Id: I9f3d0f0e4dc147d9d2a5a1e41486805ada29d62a
2017-06-26 22:49:41 +00:00
Treehugger Robot
449bfd7a93 Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" 2017-06-26 22:43:37 +00:00
Josh Gao
cb39742d3a Merge "Revert "adb: turn on libusb by default."" am: b22067677e am: de931dab2d
am: 947a301852

Change-Id: Ideabacf8cd79adaf6fb828874ac636ed88707240
2017-06-26 22:17:29 +00:00
Josh Gao
947a301852 Merge "Revert "adb: turn on libusb by default."" am: b22067677e
am: de931dab2d

Change-Id: I19b7d82bcc60c6942e4faa1db2ee2999a1d698a0
2017-06-26 22:13:41 +00:00
Josh Gao
de931dab2d Merge "Revert "adb: turn on libusb by default.""
am: b22067677e

Change-Id: I0fae08024b03bea8d03e9d5611575ebdba9b7e54
2017-06-26 22:01:36 +00:00
Treehugger Robot
b22067677e Merge "Revert "adb: turn on libusb by default."" 2017-06-26 21:33:34 +00:00
Ben Fennema
acd7b7b0c0 libcutils: fs_config: fix "system/<partition>/" aliasing
Pull prefix checking into fs_config_cmp and make prefix_cmp be a
glorified partial ? strncmp() : strcmp()

Results before:
[ RUN      ] fs_config.system_alias

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: vendor/lib/hw didn't match system/vendor/lib

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/vendor/bin/wifi didn't match vendor/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/odm/bin/wifi didn't match odm/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/oem/bin/wifi didn't match oem/bin/wifi
system/core/libcutils/tests/fs_config.cpp:247: Failure
Value of: check_fs_config_cmp(fs_config_cmp_tests)
  Actual: true
Expected: false
[  FAILED  ] fs_config.system_alias (6 ms)

Results after:
[ RUN      ] fs_config.system_alias
[       OK ] fs_config.system_alias (0 ms)

Bug: 62204623
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Change-Id: I8282827002816e86ea3014fed29eabf43b837815
Signed-off-by: Ben Fennema <fennema@google.com>
2017-06-26 14:13:52 -07:00
Elliott Hughes
35bb6d2a89 Allow configuration of the number of tombstones.
Bug: http://b/62810514
Test: altered the property, got more tombstones
Change-Id: Iba8089915fa715658d2dfecb076c6a61321243bd
2017-06-26 14:00:00 -07:00
Josh Gao
969110ca4a 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
2017-06-26 13:17:58 -07:00
Bowgo Tsai
61cdb66230 Merge "AVB: allow no metadata in the generic system.img for project Treble" am: c70bf5836c am: caa5b4417f
am: 2410d0c792

Change-Id: I5b03a7ac1cdb883df27aca8122c4a1383d805126
2017-06-24 01:51:47 +00:00
Bowgo Tsai
2410d0c792 Merge "AVB: allow no metadata in the generic system.img for project Treble" am: c70bf5836c
am: caa5b4417f

Change-Id: I4859e15d3bf05c22a708761e91b2e52fbb28ca1f
2017-06-24 01:40:33 +00:00
Bowgo Tsai
caa5b4417f Merge "AVB: allow no metadata in the generic system.img for project Treble"
am: c70bf5836c

Change-Id: I583d9357df07c958778533599b9d91d00c255eb0
2017-06-24 01:35:01 +00:00
Treehugger Robot
c70bf5836c Merge "AVB: allow no metadata in the generic system.img for project Treble" 2017-06-24 01:28:25 +00:00
Bowgo Tsai
60f19a0792 AVB: allow no metadata in the generic system.img for project Treble
The generic system.img released from project Treble can't contain any verity
metadata (e.g., vboot 1.0, AVB, or any other implementation) because it's
*generic*. To make any device can boot with it, `avbctl disable-verification`
is introduced to set a new flag AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED
in the top-level vbmeta to disable the entire AVB verification process. This
should be done prior to flash the generic system.img. See the following link
for details:

    https://android-review.googlesource.com/#/c/418399/

This CL checks whether AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED is
set in the top-level vbmeta. When set, skip verifying the vbmeta structs
against androidboot.vbmeta.{hash_alg, size, digest} because it will be
absent in kernel cmdline. Also, only top-level vbmeta struct is read then
returned by libavb in this case.

Note that another flag AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED, usually
set by `adb disable-verity`, is used to signal fs_mgr to skip setting up
dm-verity, but libavb still verifies all vbmeta structs. fs_mgr will
also verify all vbmeta structs against androidboot.vbmeta.{hash_alg,
size, digest} from kernel cmdline as well.

Also rename SetUpAvb() to SetUpAvbHashtree() to better fit its usage.
This function will return kDisabled when any of the above two flags is set.

Finally, regardless of which flag is set or not set, we still only allow two
return values from avb_slot_verify():

   - AVB_SLOT_VERIFY_RESULT_OK: it's still possible to get this value
     when any of these flags are set in build time. e.g.,
     BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS=--flags 2

   - AVB_SLOT_VERIFY_RESULT_ERROR_VERIFICATION: in most cases we should
     get this value, because the flags are likely set at run time.

Bug: 62523303
Test: boot device with 'avbctl disable-verification'.
Test: boot device with 'avbctl enable-verification'.
Test: boot device with 'adb disable-verity'.
Test: boot device with 'adb enable-verity'.

Test: build image with BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS=--flags 2, then boot device.
      repeat the above steps to boot device again.

Change-Id: Ie8436f3e0e82c78490208f3b85eac5238a9fdfdb
2017-06-24 09:20:15 +08:00
Tom Cherry
99d93f4462 Merge "init: create android::init:: namespace" am: 040212706b am: d3d79b2196
am: b57e1180e3

Change-Id: Ic6d35273820d70136a6085bf49dcf3afcbb24f24
2017-06-23 23:24:21 +00:00
Tom Cherry
b57e1180e3 Merge "init: create android::init:: namespace" am: 040212706b
am: d3d79b2196

Change-Id: I3dccff251dda7d7452e33a7e71178c59f0c22169
2017-06-23 23:19:53 +00:00
Tom Cherry
d3d79b2196 Merge "init: create android::init:: namespace"
am: 040212706b

Change-Id: Iff22100c7357ccc4a2a48c50b093375b5dd8a4b9
2017-06-23 23:15:21 +00:00
Tom Cherry
040212706b Merge "init: create android::init:: namespace" 2017-06-23 23:07:23 +00:00
Jeff Vander Stoep
d47d328b41 Merge "Revert "crash_dump: during early boot, output to kmsg on userdebug."" into oc-dr1-dev
am: 75a32dead5

Change-Id: Ia893832c1428858afd8d8726a789a5989dafa9a0
2017-06-23 23:01:27 +00:00
TreeHugger Robot
75a32dead5 Merge "Revert "crash_dump: during early boot, output to kmsg on userdebug."" into oc-dr1-dev 2017-06-23 22:45:48 +00:00
NIEJuhu
4eaface969 Merge "libsysutils: Fix vold vulnerability in FrameworkListener" am: 45b4fe454a am: bac524b0cd
am: 56f021f0a4

Change-Id: I9ed0e9e8cab7d26573464651932995b257e18904
2017-06-23 20:53:12 +00:00
NIEJuhu
56f021f0a4 Merge "libsysutils: Fix vold vulnerability in FrameworkListener" am: 45b4fe454a
am: bac524b0cd

Change-Id: I95154db2cad94aa4c9560b9abeec3c1967891d9f
2017-06-23 20:46:55 +00:00
Christopher Ferris
8f937188e2 Merge "Add section parsing and function name handling." am: 62a17c6c4a am: ee5c756d25
am: c37b983738

Change-Id: I256da8e2c77c74f9e9add0aa7670a0a3b09f7f8c
2017-06-23 20:43:42 +00:00
Christopher Ferris
c37b983738 Merge "Add section parsing and function name handling." am: 62a17c6c4a
am: ee5c756d25

Change-Id: Iaf9dd25a0982916c6c2b06bf7ba618e1b2b452e1
2017-06-23 20:38:53 +00:00
NIEJuhu
bac524b0cd Merge "libsysutils: Fix vold vulnerability in FrameworkListener"
am: 45b4fe454a

Change-Id: I19d92353e5c425b4e8b1fd07e68da29975e2d991
2017-06-23 20:38:40 +00:00
Jeff Vander Stoep
5fdc4cc746 Revert "crash_dump: during early boot, output to kmsg on userdebug."
This reverts commit bf2dd48241.

Addresses:
avc: denied { relabelto } for name="kmsg_debug" dev="tmpfs" ino=10642
scontext=u:r:init:s0 tcontext=u:object_r:device:s0 tclass=chr_file

Bug: 62101480, 35197529
Test: build and boot device. Verify selinux denial no longer occurs.
Change-Id: I28ce16f50eec20ef15c1721f41b66f22a84e7cca
2017-06-23 13:37:54 -07:00
Andreas Gampe
5b77682b0d Merge "Debuggerd: Fix debuggerd_test" into oc-dr1-dev
am: 394c1ad959  -s ours

Change-Id: I89a8416c2be1c26d23fff3d80939b48131b3f17d
2017-06-23 20:33:17 +00:00