Commit graph

36568 commits

Author SHA1 Message Date
Christopher Ferris
cfadedb139 Merge "Fix UnwindTest repeatability." 2017-09-08 03:15:24 +00:00
Jiyong Park
299591e464 Merge "fix: boot fails on ASAN builds with VNDK restriction" into oc-mr1-dev
am: 80206d8f03

Change-Id: I051d1683e95171bc1e3e3d16007c5d25ea923bc2
2017-09-08 01:41:44 +00:00
TreeHugger Robot
80206d8f03 Merge "fix: boot fails on ASAN builds with VNDK restriction" into oc-mr1-dev 2017-09-08 01:20:30 +00:00
Jeff Tinker
17ffcc4280 Define priority for video threads
Video threads have soft realtime requirements that
must be met in order to maintain reliable frame delivery
even when the system is under high load. This CL
defines a new priority that can be used by video
threads, enabling them to be scheduled appropriately
relative to other system threads.

Change-Id: Idd57207e30309dfdff24389db0acf107532f9e5a
related-to-bug:63898080
2017-09-07 16:14:07 -07:00
George Burgess IV
ce61cde6d8 Merge "libsync: Fix a double-free." am: 16dd491aac am: 12f6c4809e
am: 614fc323ff

Change-Id: I4f19d7b30e1218a1ec5d51570c273b5e2dcfd522
2017-09-07 22:00:13 +00:00
George Burgess IV
614fc323ff Merge "libsync: Fix a double-free." am: 16dd491aac
am: 12f6c4809e

Change-Id: I6dd5583c7d267826c4c26baf3419c863e3948e81
2017-09-07 21:53:04 +00:00
George Burgess IV
12f6c4809e Merge "libsync: Fix a double-free."
am: 16dd491aac

Change-Id: I3df91f1d203423dd5f0ca6335812630c25d8bc01
2017-09-07 21:48:36 +00:00
Treehugger Robot
16dd491aac Merge "libsync: Fix a double-free." 2017-09-07 21:39:53 +00:00
Luis Hector Chavez
056283e86e Merge "init: Allow clean system shutdown upon SIGTERM" am: 61cb88add2 am: 721b2d6035
am: 69596c2d00

Change-Id: I4a54c3c076401ebda1623a6e1880f60fb5695c8c
2017-09-07 20:11:29 +00:00
Luis Hector Chavez
69596c2d00 Merge "init: Allow clean system shutdown upon SIGTERM" am: 61cb88add2
am: 721b2d6035

Change-Id: Id420e18f64e3abba6bd50a444ff4f9b05db3dc2d
2017-09-07 20:09:29 +00:00
Luis Hector Chavez
721b2d6035 Merge "init: Allow clean system shutdown upon SIGTERM"
am: 61cb88add2

Change-Id: If0a495fa067440f0b59969ac0dbc010b4687b52f
2017-09-07 20:06:58 +00:00
Treehugger Robot
61cb88add2 Merge "init: Allow clean system shutdown upon SIGTERM" 2017-09-07 19:59:29 +00:00
Luis Hector Chavez
9f97f47940 init: Allow clean system shutdown upon SIGTERM
This allows Android to cleanly shutdown when running in a PID namespace
in a way that does not rely on adbd running. This is useful to allow
Android to be running in a container and its lifetime managed by an
OCI-compliant tool.

Bug: 65415372
Test: `kill -TERM 1` as root is correctly dropped.
Test: `kill -TERM 1` from the init PID namespace causes init to cleanly shutdown.
Change-Id: Ia66ebdb436221919081bc4723337c0c7f1e53b09
2017-09-07 10:47:04 -07:00
Jiyong Park
63bc9290e6 Merge "libadf is a new member of VNDK" into oc-mr1-dev
am: 5809705759

Change-Id: I2218b2783ee8886c91c38d85a52a06c93d84c5eb
2017-09-07 17:46:41 +00:00
Jiyong Park
88618e2b30 Merge changes from topic "hide_log_time" into oc-mr1-dev
am: cd00582000

Change-Id: I28004046f32523b4445cce9036c7170fc3a52f37
2017-09-07 17:37:59 +00:00
Jiyong Park
78c47e7f02 Don't rely on transitively included headers
am: e6474b7fa2  -s ours

Change-Id: I8608141db6d2c277086e5c8be6ae043da15f833c
2017-09-07 17:37:47 +00:00
TreeHugger Robot
5809705759 Merge "libadf is a new member of VNDK" into oc-mr1-dev 2017-09-07 12:12:30 +00:00
Jiyong Park
a07f3057d0 vendor apk is unbundled
For devices where VNDK restrictions are all enforced, vendor apks are
recognized as unbundled; since system partition and vendor partition can
be updated independently from each other.

However, since vendor apks are still bundled in the vendor partition,
they are allowed to do more than ordinaly unbundled apks that are
downloaded and installed to the data partition.

1) /vendor/lib is allowed. So the path is added to the search_paths and
permitted paths of the classloader namespace.
2) LLNDK libs are allowed in addition to the NDK libs. So, LLNDK lib list
from llndk.libraries.txt is added to the list from public.libraries.txt.
3) VNDK-SP libs are allowed. To do so, the classloader namespace is
linked to the 'vndk' namespace where VNDK-SP libs are searched and
loaded from. The list of available VNDK-SP libs is read from
vndksp.libraries.txt file.
4) Name of the namespace is changed to 'vendor-classloader-namespace'
since the namespace is configured differently from the ordinary
'classloader-namespace'.

Bug: 63553457
Test: 2017 pixel devices build and boots to the UI
Test: a vendor apk (e.g. TimeService.apk) works. Turn the airplain mode on.
Set time. Reboot the device. The time is not reset.
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: I447452eb025c0a0fd076b5c9ac081d453dc6074e
2017-09-07 20:26:10 +09:00
Adam Vartanian
47efc676c8 Fix integer overflow in utf{16,32}_to_utf8_length
Without an explicit check, the return value can wrap around and return
a value that is far too small to hold the data from the resulting
conversion.

No CTS test is provided because it would need to allocate at least
SSIZE_MAX / 2 bytes of UTF-16 data, which is unreasonable on 64-bit
devices.

Bug: 37723026
Test: run cts -p android.security
Change-Id: I56ba5e31657633b7f33685dd8839d4b3b998e586
2017-09-07 10:36:19 +01:00
Jiyong Park
26335f89b1 add llndk|vndksp.libraries.txt to vndk_package
List of llndk and vndk-sp libraries are written in the txt file so that
they can be available at run-time. The information is used by
libnativeloader to configure the classloader-namespace specially for
vendor apks.

Bug: 64882323
Test: build 2017 pixel devices. check that the two files exist on
/system/etc.

Change-Id: Ifbe339a5862f6ef57a8213a14a022765ccf77283
2017-09-07 11:51:29 +09:00
TreeHugger Robot
cd00582000 Merge changes from topic "hide_log_time" into oc-mr1-dev
* changes:
  Hide implementation details of log_time struct
  Don't rely on transitively included headers
2017-09-07 02:39:39 +00:00
Christopher Ferris
401da5cfa8 Merge "Add a method to share the process memory object." am: 18149b6764 am: 4044c9ad9f
am: 7de249836b

Change-Id: Ifeb730ca500f0c954f2cd184c37643f79156cb82
2017-09-07 00:24:30 +00:00
Christopher Ferris
7de249836b Merge "Add a method to share the process memory object." am: 18149b6764
am: 4044c9ad9f

Change-Id: Ic50ca4e5be70efa3dd07779ffee084747f394936
2017-09-07 00:20:34 +00:00
Christopher Ferris
4044c9ad9f Merge "Add a method to share the process memory object."
am: 18149b6764

Change-Id: I28ca654337aea1549f9d8e7f9f700b90ec01d2f7
2017-09-07 00:16:42 +00:00
Christopher Ferris
edccd84763 Fix UnwindTest repeatability.
- Rewrite some of the UnwindTest tests to properly wait for the process
  to be ready.
- Add a TestScopedPidReaper to make sure that fork process get killed even
  if the test fails. Add this to all tests that fail.
- Create a quiesce function to be used by all of the tests that will
  wait after attaching to a process.

Bug: 65287279

Test: Ran unit tests on hikey960 board and on host repeatedly.
Change-Id: I57084120396f34d8dfb852f3d814bef2056f1b54
2017-09-06 17:08:44 -07:00
Christopher Ferris
18149b6764 Merge "Add a method to share the process memory object." 2017-09-07 00:01:10 +00:00
Jiyong Park
5d0b8597f9 Revert "libcutils_header exports liblog_headers"
am: 5e73998997

Change-Id: I5d0c89e109d631d13080da83baccd327c6a1fb45
2017-09-06 21:25:14 +00:00
Steven Moreland
25db8dc21b Add vendor_available to liblog_headers.
Renamed NDK headers to "liblog_ndk_headers"
(these names aren't used anywhere).

libutils_headers now properly export liblog_headers.

Test: with BOARD_VNDK_VERSION=current
Change-Id: I7b2d9e77e313e3f2ef362a19a03f4c23874d589a
Merged-In: I3a85385f588b84393c57fd6d1bcac620f708f0f1
2017-09-06 12:55:32 -07:00
Yifan Hong
e2c51809f7 Add sys/cdefs.h to log/log_main.h.
for liblog.vendor. __ANDROID_API__ is __ANDROID_API_FUTURE__
with BOARD_VNDK_VERSION=current, so we need it defined.

Bug: 33241851
Test: BOARD_VNDK_VERSION=current m libgui.vendor
      (that uses liblog.vendor)

Change-Id: I340ec048094c027828f516d891250651e0c88eea
Merged-In: I340ec048094c027828f516d891250651e0c88eea
2017-09-06 12:54:41 -07:00
Tom Cherry
e4dcb98e49 Merge "Log pid for writes to sys.powerctl" am: 2827106d7d am: c1968fb0c9
am: 17b2996743

Change-Id: I418f732c92e8ae8effe2645e6b2703976fbcd316
2017-09-06 17:14:55 +00:00
Tom Cherry
17b2996743 Merge "Log pid for writes to sys.powerctl" am: 2827106d7d
am: c1968fb0c9

Change-Id: I3912b76dfca15e9d49d6c657c5081745b163af1b
2017-09-06 17:12:52 +00:00
Tom Cherry
c1968fb0c9 Merge "Log pid for writes to sys.powerctl"
am: 2827106d7d

Change-Id: I2fb780c5809d4c18950c114c07a7363723aa121a
2017-09-06 17:09:08 +00:00
Tom Cherry
2827106d7d Merge "Log pid for writes to sys.powerctl" 2017-09-06 16:58:23 +00:00
Jiyong Park
abe0163cb7 Merge "Mark libgrallocusage as vendor_available" am: 9c8781f479 -s ours am: bc3ae0aaea -s ours
am: b162af0a64  -s ours

Change-Id: Id70565ab6c4fc372799ddd8e92301d27b9d8d38e
2017-09-06 16:09:19 +00:00
Jiyong Park
b84d541c1e Merge "Don't rely on transitively included headers" am: 45eeea2dcd am: 18e92a5495
am: f89ee4038e

Change-Id: I4f1457203642e73a6e8e9d831661ebf1f940cf63
2017-09-06 16:04:18 +00:00
Jiyong Park
b162af0a64 Merge "Mark libgrallocusage as vendor_available" am: 9c8781f479 -s ours
am: bc3ae0aaea  -s ours

Change-Id: I57e167c1e4bb0d2c165a58984f8f97f9d8b782fd
2017-09-06 16:02:38 +00:00
Jiyong Park
f89ee4038e Merge "Don't rely on transitively included headers" am: 45eeea2dcd
am: 18e92a5495

Change-Id: Ie66f108c2d2afad4b22e19abf591114338e21dd1
2017-09-06 16:00:55 +00:00
Jiyong Park
bc3ae0aaea Merge "Mark libgrallocusage as vendor_available"
am: 9c8781f479  -s ours

Change-Id: I448037b8c228190df54d7e39b2ad05fc7511302e
2017-09-06 15:59:02 +00:00
Jiyong Park
18e92a5495 Merge "Don't rely on transitively included headers"
am: 45eeea2dcd

Change-Id: I1d822d54a1da50b99c1153335b03d68c331b8d4d
2017-09-06 15:56:53 +00:00
Treehugger Robot
9c8781f479 Merge "Mark libgrallocusage as vendor_available" 2017-09-06 15:52:22 +00:00
Treehugger Robot
45eeea2dcd Merge "Don't rely on transitively included headers" 2017-09-06 15:51:46 +00:00
Jiyong Park
98c0d030c9 Hide implementation details of log_time struct
In the future, the sizes of tv_sec and tv_nsec (or even the size of
log_time struct itself) can change due to the 32-bit overflow expected
to happen in the year 2138. In order to hide such implementation details
to the clients of liblog, the two macros LOG_TIME_SEC and LOG_TIME_NSEC
are introduced.

Furthermore, vendors are provided with a simplified version of log_time.h
without C++ APIs. In doing so, log_time.h no longer includes time.h.
This breaks several modules that implicitly relied on the hidden
dependency, which should be fixed.

Bug: 37629934
Test: build with BOARD_VNDK_VERSION=current
Change-Id: I01b36078c1d8f3f44824be20ae769ba1465b6feb
2017-09-06 15:30:50 +09:00
Jiyong Park
e6474b7fa2 Don't rely on transitively included headers
One must explicitly include what it need.
time.h for clock_gettime

Bug: 37629934
Test: build
Merged-In: I992eac637f373b204aa161b0b26f5563e952c27e
Change-Id: I992eac637f373b204aa161b0b26f5563e952c27e
2017-09-06 15:30:32 +09:00
Ting-Yuan Huang
5d1706346c Merge "Suppress false-positive static analyzer warnings" am: 0c89aaec1f am: 2ee27bfd0d
am: d3ffb4344e

Change-Id: Ica8a4b2e224e278308e9dca377751e462be4ae6d
2017-09-06 05:16:45 +00:00
Ting-Yuan Huang
d3ffb4344e Merge "Suppress false-positive static analyzer warnings" am: 0c89aaec1f
am: 2ee27bfd0d

Change-Id: I3a66607388d54bc5faec076baa2280dde9bddb01
2017-09-06 05:13:18 +00:00
Ting-Yuan Huang
2ee27bfd0d Merge "Suppress false-positive static analyzer warnings"
am: 0c89aaec1f

Change-Id: Ifa3e4010ee1ce152f17bdc14f4e73d647c05a76a
2017-09-06 05:09:15 +00:00
Treehugger Robot
0c89aaec1f Merge "Suppress false-positive static analyzer warnings" 2017-09-06 05:04:29 +00:00
Jiyong Park
4729da4c8a libadf is a new member of VNDK
The library is used by both platform (e.g. libminui) and vendors (for
theor HW composer HAL impl).

Bug: 64050301
Test: 2017 pixel devices build
Test: libadf.so is in /system/lib[64]/vndk directory
Change-Id: I20b8b9728cdc56a7491266070740c3330d4324dc
2017-09-06 13:31:12 +09:00
Jiyong Park
bab16584ce Don't rely on transitively included headers
One must explicitly include what it need.
time.h for clock_gettime

Bug: 37629934
Test: build
Change-Id: I992eac637f373b204aa161b0b26f5563e952c27e
2017-09-06 13:04:57 +09:00
Jiyong Park
5e73998997 Revert "libcutils_header exports liblog_headers"
This reverts commit 8f63b6cfca.

Reason for revert: the use of cutils/log.h is discouraged. clients should use log/log.h. aosp/420955

Bug: 37342627
Change-Id: I6605aa89b0ef2b9afd0fdd52c1dee1ee0021debd
2017-09-06 01:48:43 +00:00