Commit graph

39990 commits

Author SHA1 Message Date
Jerry Zhang
6e9a327504 adb: Retry io in case of interrupt
io_submit sleeps waiting for the gadget
to be enabled. Currently if that sleep
is interrupted it will shut down adb,
causing it to have to start back up again.

Rather than return EINTR if interrupted,
io_submit actually completes and the EINTR
is found later when looking through events.
Since an io that is interrupted will be
small anyway, add a loop to retry small ios.

Also upgrade aio logs in accordance with
their importance.

Fixes: 75981904
Test: adb works, logs show successful interrupt handling
Change-Id: I35973fce130ee849ce59fef80d15b65afb816ba4
2018-03-23 00:11:05 +00:00
Benedict Wong
1f70d1cac5 Merge "Set SPI Allocation Timeout to One Hour" into pi-dev 2018-03-21 17:03:39 +00:00
TreeHugger Robot
be3cd3c0d8 Merge "/postinstall/* does not search for a lib in /vendor or /odm" into pi-dev 2018-03-20 18:56:40 +00:00
Tom Cherry
16e2e9d4da Merge "Revert "init: Reboot after timeout passes during reboot"" into pi-dev 2018-03-20 18:42:43 +00:00
Benedict Wong
89c9c9b18b Set SPI Allocation Timeout to One Hour
This change increases the default expiration length of an SA to 1h. The
IPsec API expects that SPIs are allocated indefinitely, but potential
for instability requires that these get cleaned up automatically. As
such, the duration was chosen as a sane, but long timeout value.

Bug: 72316671
Test: Added CTS tests to enforce this behavior
Merged-In: I47aef9cea4a09da253b2ec048a8797af5fa25529
Change-Id: I47aef9cea4a09da253b2ec048a8797af5fa25529
(cherry picked from commit 00308f8554)
2018-03-20 11:32:40 -07:00
Jiyong Park
955029aa1b /postinstall/* does not search for a lib in /vendor or /odm
There has been no section in the linker config file for the binaries
under /postinstall. As a result, the binaries were run with the legacy
default config where /vendor/lib and /odm/lib are added to the search
paths. This is causing selinux denials as the binaries for OTA are not
allowed to access /vendor/lib or /odm/lib, but the dynamic linker calls
realpath(3) on the paths to canonicalize them.

Fixing the issue by letting /postinstall/* binaries to run with a
dedicated linker namespace config, where /vendor/lib and /odm/lib are
not added to the search paths. Not having the paths is okay because
he OTA binaries should not have dependency to the libs there.

Bug: 75287236
Test: do the OTA, selinux denials on postinstall_file is not shown
Test: above test should pass on  wahoo, marlin and pre-treble devices
Merged-In: I49c11a0929002adfef667890c0a375c2b41054f4
Change-Id: I49c11a0929002adfef667890c0a375c2b41054f4
(cherry picked from commit d7e6cb27b6)
2018-03-21 01:25:55 +09:00
Tom Cherry
ea31ac2514 Revert "init: Reboot after timeout passes during reboot"
This reverts commit c9fec9d2be.

Looks like ext4 can't handle a system reboot happening in the middle
of an unmount.  We'll have to find another way to handle this.

Bug: 74817735
Bug: 75310371
Test: reboot device
Merged-In: Ib4f7f7fd29988a31a99f146c40f6d987c1fef15e
Change-Id: I7c097ba5734e2e4ff320c8b02fb58324d9380513
2018-03-20 13:39:00 +00:00
TreeHugger Robot
bfb490e3e8 Merge "Allow vendor_init_actionable to persist.sys.usb.usbradio.config" into pi-dev 2018-03-20 03:46:42 +00:00
Jaekyun Seok
56f832e561 Allow vendor_init_actionable to persist.sys.usb.usbradio.config
persist.sys.usb.usbradio.config can be used as an action trigger in
vendor init scripts.

Bug: 75202311
Bug: 74266614
Test: succeeded building and tested on pixels
Change-Id: I123b5ebce4bbf33f41222c2e11137d52e38ff9f8
2018-03-20 07:40:16 +09:00
Yabin Cui
414df3e583 Always set the sp reg to the cfa for DWARF.
There are a few places where it is assumed that this register is
set to the cfa value when interpreting DWARF information.

Add a testcase for unwinding art_quick_osr_stub on ARM.

Bug: 73954823

Test: Ran libunwindstack/libbacktrace unit tests.
Test: Random debuggerd -b of process on a hikey.
Test: Ran the 137 art test on host.
Change-Id: Ida6ccdc38c3cfeea6b57fe861a0cc127b150b790
(cherry picked from commit 11e96fe48a)
2018-03-19 11:11:19 -07:00
TreeHugger Robot
8dca85f0c8 Merge "adb: checks device state when using adb disable-verity for AVB" into pi-dev 2018-03-17 08:03:18 +00:00
TreeHugger Robot
6665d991e1 Merge "Support /odm partition" into pi-dev 2018-03-16 07:07:39 +00:00
Bowgo Tsai
45a00fdcce adb: checks device state when using adb disable-verity for AVB
adb disable-verity will toggle a flag in /vbmeta and introduce AVB
verification error on next boot. If the device is LOCKED, it will make
the device unbootable because verification error isn't allowed when the
device is locked.

Also indicating 'adb root' when failed to get verity state.

Bug: 70969453
Test: adb disable-verity should pop-up warning if the device is locked.

Change-Id: I1ed705e34334ea2231c96b16ddb8d225067af2f0
Merged-In: I1ed705e34334ea2231c96b16ddb8d225067af2f0
(cherry picked from commit 8cc9c3835a)
2018-03-16 15:06:23 +08:00
Bowgo Tsai
6795ef7bb2 Support /odm partition
Bug: 64195575
Test: boot a device

Change-Id: I52c0da32aef80c060f6efa47ddf62577fb543ad8
Merged-In: I52c0da32aef80c060f6efa47ddf62577fb543ad8
(cherry picked from commit 39476ffd8a)
2018-03-16 15:02:00 +08:00
TreeHugger Robot
8c907c65e6 Merge "Handle ARM thumb function symbols." into pi-dev 2018-03-16 04:56:25 +00:00
TreeHugger Robot
4031e1a46e Merge "Stop using SO_SNDBUFFORCE" into pi-dev 2018-03-16 03:00:44 +00:00
Christopher Ferris
b70b4a5bcd Handle ARM thumb function symbols.
ARM thumb functions will have the zero bit set to one, which can cause
function name lookups to fail.

Add an ARM special GetFunctionName that handles this condition.

Fix a couple of the function offsets in unit tests.

Bug: 74844137

Test: Ran unit tests.
Test: Ran debuggerd -b on processes on a bullhead device.
Change-Id: Ibd407db34eaaa641f91fdb4f589c44a0dcc0216a
(cherry picked from commit 704ec9adba)
2018-03-15 19:28:23 -07:00
Ryo Hashimoto
3d95d88b14 Stop using SO_SNDBUFFORCE
Use SO_SNDBUF which doesn't require CAP_NET_ADMIN instead.
Change the value of kFuseMaxWrite to 128KB.

In the kernel code, there is a constant FUSE_MAX_PAGES_PER_REQ which
limits the size of requests to 128KB.

Bug: 74725300
Test: atest android.os.storage.cts.StorageManagerTest

Change-Id: Ic3a8f1a7378d027a6c0ee054cedc2c9f4b7509ad
2018-03-15 14:22:27 +09:00
TreeHugger Robot
5f96d51507 Merge "Revert "libutilscallstack is private VNDK-SP"" into pi-dev 2018-03-15 04:17:05 +00:00
Jiyong Park
78df555af3 Revert "libutilscallstack is private VNDK-SP"
CallStack.cpp was part of libutils, but has been separated into a new
library libutilscallstack [1] and then made invisible to vendors [2].
However, this is causing problem to the vendors who have been using
the CallStack class from libutils, because the class is no longer
available to them.

In order to support them, marking libutilscallstack as
'vendor_available: true'.

This reverts commit a32678df55.

[1] https://android-review.googlesource.com/c/platform/system/core/+/591954
[2] https://android-review.googlesource.com/c/platform/system/core/+/599754
Bug: 74600214
Test: m -j
Test: 2016/2017 pixel devices boots to the UI and Photo Editing works

Merged-In: Iaa232ed978378b566a4710e2320ee6ed04572e14
Change-Id: Iaa232ed978378b566a4710e2320ee6ed04572e14
(cherry picked from commit 130fea3478)
2018-03-15 10:46:30 +09:00
Jerry Zhang
9a1be3ad0e adb: Remove usages of ENDPOINT_ALLOC
All devices that previously used ENDPOINT_ALLOC
are on the new async io routines. None of the devices
using aio_compat have ENDPOINT_ALLOC so remove the
code to stop logging failures.

Fixes: 74213465
Test: adb works
Change-Id: I0c903eb76b006b6bcce48cec24f5353fa47cc128
2018-03-14 22:11:59 +00:00
Mark Salyzyn
fec2e2c783 logd: identical check access message data out of range
(cherry pick from commit 22712428b8)

Discovered while running AddressSanitizer, binary events were fed
into logd that were smaller than the binary event string header.
Fix is to check the buffer sizes before performing the memcmp
operation.

Test: compile
Bug: 74574189
Change-Id: Ic01ef6fb0725258d9f39bbdca582ed648a1adc5d
2018-03-14 07:26:20 -07:00
TreeHugger Robot
84379567d3 Merge "Include iface index in the netlink event" into pi-dev 2018-03-14 01:44:36 +00:00
Jaekyun Seok
3b613ccedc Export init.svc.console as an actionable property
The state of console can be used to set up a device for debugging.

Bug: 74266614
Test: succeeded building and tested with Pixels
Change-Id: I3691fa2819594a521e05dad150550ab309a78c68
Merged-In: I3691fa2819594a521e05dad150550ab309a78c68
(cherry picked from commit cba467eeda)
2018-03-14 06:12:43 +09:00
Chia-I Wu
1114794e57 Merge "graphics: include graphics-sw.h from graphics.h" into pi-dev 2018-03-13 19:18:39 +00:00
Chia-I Wu
9bae89be3a graphics: include graphics-sw.h from graphics.h
This reverts commit 94f641c33 in effect.  The way for framework to
avoid including graphics-sw.h is

 - include graphics-base.h directly
 - do not include HAL headers

Bug: 70526789
Test: builds
Change-Id: I3cd0fbdce2605a59c24f83c680bede95693abfcf
2018-03-13 10:13:51 -07:00
TreeHugger Robot
05749a7b5a Merge "ueventd: Increase uevent buffer size to 2MB" into pi-dev 2018-03-13 07:45:19 +00:00
TreeHugger Robot
ad2f24c97e Merge "Adding /odm support" into pi-dev 2018-03-13 06:50:11 +00:00
Daniel Mentz
bd93ad50ac ueventd: Increase uevent buffer size to 2MB
Let's increase the receive buffer size for the NETLINK_KOBJECT_UEVENT
socket to 2MB. Unless a large number of uevents queue up, that memory is
not allocated anyways. The receive buffer size serves only as an upper
limit for the total amount of memory consumed by all skbs queued to a
specific socket.

We experienced situations where ueventd got blocked for multiple seconds
while writing to /dev/kmsg, and the receive buffer overflowed in the
meantime.

Bug: 72648767
Change-Id: Ice6d7b9c5ed9c83efbad6111086ce95ac6432561
2018-03-13 05:35:44 +00:00
Christopher Ferris
8e216a0bb4 Merge "Don't implicitly dereference DW_CFA_def_cfa_expression." into pi-dev 2018-03-13 01:18:45 +00:00
Bowgo Tsai
ca8b2c6995 Adding /odm support
Treble system-as-root GSI needs to work on devices with and without /odm
partition. This change creates the following symlinks for devices without
/odm partition:

  /odm/app ->/vendor/odm/app
  /odm/bin ->/vendor/odm/bin
  /odm/etc ->/vendor/odm/etc
  /odm/firmware ->/vendor/odm/firmware
  /odm/framework ->/vendor/odm/framework
  /odm/lib -> /vendor/odm/lib
  /odm/lib64 -> /vendor/odm/lib64
  /odm/overlay -> /vendor/odm/overlay
  /odm/priv-app -> /vendor/odm/priv-app

For devices with odm partition, /odm will be used as the mount point and
those symlinks will be hidden after mount.

Bug: 70678783
Test: boot a A/B device without /odm partition, checks those symlinks exist
Test: boot a A/B device with /odm partition, checks those symlinks don't exist
Change-Id: I4d960b52e2754f461188f3ab562c751f502046ea
(cherry picked from commit 00749affc4)
2018-03-13 08:41:50 +08:00
Chia-I Wu
ecbb3324e0 Merge "graphics: move some flex pixel formats to graphcis-sw.h" into pi-dev 2018-03-12 22:41:08 +00:00
David Srbecky
c4772ae94c Don't implicitly dereference DW_CFA_def_cfa_expression.
The specification isn't entirely clear. Follow the gdb interpretation.

Bug: 73954823
Test: libunwindstack_test
Change-Id: If72717f54eed84e442f43af19e615143a9796b68
(cherry picked from commit 3692f25199)
2018-03-12 14:08:49 -07:00
TreeHugger Robot
23d45d1cc7 Merge "Base: Add default tag manipulation" into pi-dev 2018-03-10 03:09:52 +00:00
Andreas Gampe
3aa893647c Base: Add default tag manipulation
Allow the default tag (the program name) to be overwritten.

(cherry picked from commit 1923e768ef)

Bug: 34867873
Test: m
Test: logging_test
Test: manual
Merged-In: I4ef32bad413a7cc82e46ce16a2f26212925964b1
Change-Id: I4ef32bad413a7cc82e46ce16a2f26212925964b1
2018-03-09 13:20:05 -08:00
Chia-I Wu
94f641c333 graphics: move some flex pixel formats to graphcis-sw.h
Some of the flex pixel formats are software-only.  Move them to
graphics-sw.h to identify files that use them.

Bug: 70526789
Test: builds
Change-Id: I42757af810028f53bb6389c637a00c493041a4fb
2018-03-09 12:26:45 -08:00
Chenbo Feng
c64745ce13 Include iface index in the netlink event
The TrafficController inside netd also get notified when the interface
on device added or removed, and it need both ifaceName and ifaceIndex
information from Netlink event. Add the ifaceIndex in the event can
avoid the TrafficController to run if_nametoindex again when receive
the event.

Bug: 30950746
Bug: 73137611
Test: new interface show up in bpf interface map.

(cherry picked from commit 5e5e5e9a73)

Change-Id: Ia3b4aeb8eff345ce7cf03ccec88f0893cfe125c0
2018-03-09 12:46:20 +09:00
Steven Moreland
432cdb6391 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679 am: e9df4d52f7 am: dd95a7f10d am: f546acd3fa -s ours am: 9ce034ce8a -s ours
am: 4e13bf0e73  -s ours

Change-Id: Ib936ca8e664938dce3c4f6f12e0d26f165c6e2d1
2018-03-09 03:10:02 +00:00
Steven Moreland
4e13bf0e73 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679 am: e9df4d52f7 am: dd95a7f10d am: f546acd3fa -s ours
am: 9ce034ce8a  -s ours

Change-Id: I6dc6d1628deb2992d292672a20e1b7209ca8fcb5
2018-03-09 03:04:48 +00:00
Steven Moreland
9ce034ce8a [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679 am: e9df4d52f7 am: dd95a7f10d
am: f546acd3fa  -s ours

Change-Id: I00bb77d99b2e4548215a64a80d89c214b0759c10
2018-03-09 02:57:24 +00:00
Android Build Merger (Role)
f546acd3fa [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679 am: e9df4d52f7 am: dd95a7f10d
Change-Id: Ic2cae6509c07e60fe66494b4b37fc5f0d29f068e
2018-03-09 01:49:02 +00:00
Android Build Merger (Role)
dd95a7f10d [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679 am: e9df4d52f7
Change-Id: Ifab7435d2c707247b64b6debccbdd00224bdc6af
2018-03-09 01:49:01 +00:00
Android Build Merger (Role)
e9df4d52f7 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913 am: f479f90679
Change-Id: Ib19d60a2933bf9ca6aa7eaeb285055d0f2c01452
2018-03-09 01:49:00 +00:00
Android Build Merger (Role)
f479f90679 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe am: dc2153c913
Change-Id: Ia9d1a2f4387bdd11085163ffea0e99d22d43757f
2018-03-09 01:48:58 +00:00
Android Build Merger (Role)
dc2153c913 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14 am: 35629db6fe
Change-Id: I1f668592187eef0bb882372f42529d147ce49786
2018-03-09 01:48:57 +00:00
Android Build Merger (Role)
35629db6fe [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0 am: 4ca82d1d14
Change-Id: Ifc14cf3778241da9ba4d06e3e8913c08dec085ce
2018-03-09 01:48:55 +00:00
Android Build Merger (Role)
4ca82d1d14 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd am: 726007edf0
Change-Id: I61308a749e84d4a909d22e4365bbd403fcf67dd4
2018-03-09 01:48:54 +00:00
Android Build Merger (Role)
726007edf0 [automerger] String16: remove integer overflows am: d0648d8dc6 am: 9de539d0dd
Change-Id: Iaf27e11e7beb60499e8c44c8659a13a02c923cbd
2018-03-09 01:48:53 +00:00
Android Build Merger (Role)
9de539d0dd [automerger] String16: remove integer overflows am: d0648d8dc6
Change-Id: Ib1bb7df40aac5be2ff7a704038279e4768b18f88
2018-03-09 01:48:52 +00:00
Steven Moreland
f50ca832cd String16: remove integer overflows am: 0e5fbea01c am: b02e0ab211
am: 1549baa415

Change-Id: I3d528c5445b6cb0cd58f24743e6442a2aea2344a
2018-03-08 22:24:22 +00:00