Commit graph

44474 commits

Author SHA1 Message Date
Xin Li
77f2dbffe1 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
am: 72335650ef  -s ours

Change-Id: I37442bf00664f54412453aec8c812213609f1c56
2018-12-13 13:30:27 -08:00
Xin Li
0acfc87001 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 2f2f638fdf  -s ours

Change-Id: Ieb3bb5fae81eebeca7596ca4901c2dc77ec8733e
2018-12-13 11:26:27 -08:00
Christopher Ferris
1b080f4548 Merge "Fix handling of ro segments for embedded libs."
am: 583ce2deff

Change-Id: I525d51e3f5aab094f4ce374d7eca27d02bf444ca
2018-12-13 10:51:00 -08:00
Josh Gao
96cf6ece63 Merge changes I042f25f8,I973f42c5,Icb4acea5
am: 78f94a39f2

Change-Id: I5d42e99e6b518c6379c242df51089fc3dd5e526f
2018-12-13 10:50:25 -08:00
Tom Cherry
b65ce990fa Merge "fs_mgr: remove -Wno-unused-variable from cflags"
am: fc216d664a

Change-Id: Ia378eb64aa3df5564d7bd5aa4c1fc8160174b9af
2018-12-13 10:49:33 -08:00
Treehugger Robot
72335650ef Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Christopher Ferris
583ce2deff Merge "Fix handling of ro segments for embedded libs." 2018-12-13 03:18:58 +00:00
Josh Gao
78f94a39f2 Merge changes I042f25f8,I973f42c5,Icb4acea5
* changes:
  adbd: add source/sink services.
  adb: make `adb raw` bidirectional.
  adb: remove incorrect use of RTTI.
2018-12-13 01:26:49 +00:00
Treehugger Robot
fc216d664a Merge "fs_mgr: remove -Wno-unused-variable from cflags" 2018-12-12 22:27:46 +00:00
Josh Gao
6eb788298b adbd: add source/sink services.
Add some services that skip the service fd to see how much of a benefit
it'll be to eliminate it.

Test: adb raw source:$((300 * 1024 * 1024)) | pv > /dev/null
Test: dd if=/dev/zero bs=1M count=100 | pv | adb raw sink:$((100 * 1024 * 1024))
Change-Id: I042f25f85b16ae9869cb1f1e306d8671b024ed97
2018-12-12 12:54:28 -08:00
Josh Gao
e89a55dd41 adb: make adb raw bidirectional.
Test: adb raw shell:
Change-Id: I973f42c55c71ffd125e58f76d29100a2d5b0c308
2018-12-12 12:54:28 -08:00
Josh Gao
ce5ce87a66 adb: remove incorrect use of RTTI.
We were dynamic_casting to UsbConnection to check for USB connections,
but the actual type was a BlockingConnectionAdapter wrapping a
UsbConnection, with the result that unplugging an inaccessible (due to
permissions) device on Linux wouldn't make the device go away.

Test: manual
Change-Id: Icb4acea5fd3c3baa9691698686213e122e898e4a
2018-12-12 12:54:03 -08:00
Tom Cherry
898b642d8a fs_mgr: remove -Wno-unused-variable from cflags
Don't know why this was ever specified, but seems reasonable to remove
it now that we're so close.

Test: build
Change-Id: Ia8d056cd1c9660b3c22531317098ace78e661d6a
2018-12-12 10:30:10 -08:00
Yi Kong
78f6832bd1 Merge "Ignore null-pointer-arithmetic warning from dlmalloc include"
am: 25a83f0176

Change-Id: I28e8d63ea5df8f10d3a75c51a490c62d812b9c9a
2018-12-12 10:22:32 -08:00
Treehugger Robot
25a83f0176 Merge "Ignore null-pointer-arithmetic warning from dlmalloc include" 2018-12-12 18:08:01 +00:00
Chih-Hung Hsieh
e3092f6eea Merge "Fix performance-for-range-copy warnings"
am: fe3becb56b

Change-Id: I143ea8b6ad519e2ce3e404cf7a8a95fb3eb4d08f
2018-12-12 10:05:37 -08:00
Tom Cherry
7481fe9316 Merge "Start using new C++ Fstab class widely"
am: 07eea062d5

Change-Id: I9b362037be9e4a105e2386cbd8e513e324550a04
2018-12-12 10:04:13 -08:00
Treehugger Robot
fe3becb56b Merge "Fix performance-for-range-copy warnings" 2018-12-12 17:46:46 +00:00
Tom Cherry
07eea062d5 Merge "Start using new C++ Fstab class widely" 2018-12-12 17:42:45 +00:00
Tom Cherry
23319ebebf Start using new C++ Fstab class widely
Bug: 62292478
Test: boot
Test: adb-remount-test.sh

Change-Id: Id4715af4c1f03e2cfc67de92d3ea58e933685e51
2018-12-12 17:08:09 +00:00
Martin Stjernholm
49b81b9332 Merge "Linker namespace configuration for the Runtime APEX."
am: bd660496c8

Change-Id: I5233cbc177818fe91624867e7c84188356b85a73
2018-12-12 07:44:47 -08:00
Martin Stjernholm
bd660496c8 Merge "Linker namespace configuration for the Runtime APEX." 2018-12-12 15:36:35 +00:00
Martin Stjernholm
f1038896ad Linker namespace configuration for the Runtime APEX.
Needs to support e.g. app_process in "default" -> libnativehelper in
"runtime" -> platform libs in "default" -> libc etc in "runtime".

Always make sure to switch namespaces when switching library paths between
/system and the APEX, so that internal library dependencies in both
locations are loaded from their own directory. E.g. libc++ and libbase live
in both places, and their dependents must always load the version they were
compiled with.

Bug: 119867084,113373927
Test: Flash and reboot device
Test: Remount / read-write, then on device: rm -f system/lib{,64}/lib{c,m,dl}.so; system/bin/dex2oat -h; stop && start
Test: mmma bionic/tests/ && adb root && adb shell rm -rf /data/nativetest\* && adb push out/target/product/taimen/data/nativetest* /data/ && adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: cts-tradefed run commandAndExit cts -m CtsJniTestCases
Change-Id: I6c4fc2f1abea1fb8851546e258ffaaa4ef6fe7d0
2018-12-12 11:44:07 +00:00
Yi Kong
e9ce7aa8ab Ignore null-pointer-arithmetic warning from dlmalloc include
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:4286:61: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
        if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
                                                            ^~~~~~~~~~~~~
  system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2731:17: note: expanded from macro 'TOP_FOOT_SIZE'
    (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
     ~~~~~~~~~~~~~^~~~~~~~~~~~~
  system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2218:55: note: expanded from macro 'chunk2mem'
  #define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                      ^
  system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:1622:14: note: expanded from macro 'align_offset'
   ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\

Test: m checkbuild
Bug: 72331524
Change-Id: Iefc3b4ae6b36ba9f6cb908c03301cbe429ade320
2018-12-11 23:08:32 -08:00
Greg Kaiser
27740d4d3e Merge "fs_mgr_fstab: Add Adiantum support"
am: bb81135fda

Change-Id: Ic5f90dbd5301e46a2f96d706f21f51e7ba5951dc
2018-12-11 21:15:15 -08:00
Greg Kaiser
bb81135fda Merge "fs_mgr_fstab: Add Adiantum support" 2018-12-12 04:59:25 +00:00
Christopher Ferris
01040b10b2 Fix handling of ro segments for embedded libs.
When a shared library is loaded directly from an apk, the new way the
linker splits a shared library into a read-only and execute segment
broke unwinding. Modify the code to handle this case.

Other changes:
- Modify the algorithm for finding read-only map entries. Before, the code
  would search the entire map for the closest offset. Now it simply looks
  at the previous map. I did this because the old code was too lenient and
  might still work even if the linker changes. I want this to break if the
  linker behavior changes so that I can analyze the change.
- Update the tools to use PTRACE_SEIZE instead of PTRACE_ATTACH since
  PTRACE_ATTACH doesn't work in all cases.
- Small refactor of the GetFileMemory function.
- Add new unit test cases and new offline unwind test cases.

Bug: 120618231

Test: Ran new unit tests, ran original failing test.
Change-Id: I4bade55cf33220d52f1d5e9b0cbbbcc8419669d4
2018-12-11 19:16:29 -08:00
Yi Kong
bb3a285bb5 Merge "Ignore expansion-to-defined warning from dlmalloc include"
am: a54a660892

Change-Id: I0d214c2996647b1bd6ad35f9e6b0050c38206160
2018-12-11 18:52:34 -08:00
Yi Kong
a54a660892 Merge "Ignore expansion-to-defined warning from dlmalloc include" 2018-12-12 02:27:48 +00:00
Sandeep Patil
0b414e2539 Merge "libmeminfo: Add ReadSysMemInfo variants"
am: 556fc786c6

Change-Id: I645a11191018b841ec629b3cf5cd1b64a279791d
2018-12-11 17:49:12 -08:00
Treehugger Robot
556fc786c6 Merge "libmeminfo: Add ReadSysMemInfo variants" 2018-12-12 01:25:51 +00:00
Greg Kaiser
eefd2e9006 fs_mgr_fstab: Add Adiantum support
Adiantum is a crypto method Android is supporting for devices
which don't have AES CPU instructions.  See the paper
"Adiantum: length-preserving encryption for entry-level processors"
(https://eprint.iacr.org/2018/720.pdf) for more details.

We add Adiantum to our list of supported encryption modes.

Bug: 112010205
Test: Tested on a device
Change-Id: I14a400164803a1e217d378ad9bd8b67a61b8b7d0
2018-12-11 15:39:09 -08:00
Chih-hung Hsieh
095ed6f891 Merge "Fix cert-dcl16-c clang-tidy warnings."
am: 8ae3ca87fd

Change-Id: I6941c50d7b7bc3ed08eb6d2e3cfc6913f227417a
2018-12-11 15:01:08 -08:00
Xin Li
2f2f638fdf DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Id4f4f66ffb8104d953957f1c44dff6f549a387bb
2018-12-11 14:46:12 -08:00
TreeHugger Robot
212e791c0a Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master 2018-12-11 21:49:26 +00:00
Chih-hung Hsieh
8ae3ca87fd Merge "Fix cert-dcl16-c clang-tidy warnings." 2018-12-11 21:31:15 +00:00
Xin Li
337a781009 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I0ab5735530d24f669cc43c961cf2118427b32a7b
2018-12-11 20:23:55 +00:00
Chih-Hung Hsieh
1b7b7979af Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I3ad102f2b0f971266d57488a3bd57d312f7ee3e6
2018-12-11 10:51:13 -08:00
Sandeep Patil
2f0b6ebfbe libmeminfo: Add ReadSysMemInfo variants
The new variant is primarily used in framework. See: go/ag/5780400
for usage. Also add tests, benchmarks and fix several issues found in SysMemInfo
class.

New benchmark results are:
--------------------------------------------------------------
Benchmark                       Time           CPU Iterations
--------------------------------------------------------------
BM_ReadMemInfo_old           7726 ns       7696 ns      90201
BM_ReadMemInfo_new           7554 ns       7525 ns      90358
BM_ZramTotal_old             6446 ns       6406 ns     108361
BM_ZramTotal_new             6529 ns       6488 ns     106545
BM_MemInfoWithZram_old      14485 ns      14412 ns      48492
BM_MemInfoWithZram_new      20572 ns      20459 ns      33438
--------------------------------------------------------------

The reason for BM_MemInfoWithZram_new shows worse numbers is because
the new API also tries to find more than 1 zram device (if it exists).
The old implementation hard coded everything to "/sys/block/zram0/"

Test: libmeminfo_test 1
Bug: 114325007
Bug: 111694435

Change-Id: I246d9e9a54986ee9b2542d1eaac79ecf7310b23a
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-12-11 10:38:33 -08:00
Chih-Hung Hsieh
5d08f63950 Fix cert-dcl16-c clang-tidy warnings.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl16-c
Change-Id: I069b2c861cf7c349445c15bf789908377fe7227f
2018-12-11 10:38:27 -08:00
Andy Hung
5759ca8da2 Merge "Revert "Remove obsolete ueventd.rc rules.""
am: 36b5dd845c

Change-Id: I9447430a88eb399c705707765bb0694280132165
2018-12-11 10:03:04 -08:00
Treehugger Robot
36b5dd845c Merge "Revert "Remove obsolete ueventd.rc rules."" 2018-12-11 17:47:11 +00:00
Roland Levillain
1e08eabf7c Merge "Revert "Add Android Runtime APEX lib directories to the system linker configuration.""
am: c400ced93d

Change-Id: I1b682e2bd6ef307332edcb59fd2cf916f11cc68e
2018-12-11 05:57:17 -08:00
Treehugger Robot
c400ced93d Merge "Revert "Add Android Runtime APEX lib directories to the system linker configuration."" 2018-12-11 13:41:10 +00:00
Roland Levillain
9b79db5ebf Revert "Add Android Runtime APEX lib directories to the system linker configuration."
This reverts commit 2f56b1fff8.

Reason for revert: Breaks bionic-unit-tests's dlfcn.dladdr_libc
and x86 CtsJniTestCases' JniStaticTest.test_linker_namespaces.

Bug: 113373927
Bug: 120661824
Change-Id: I9b34bcb240a42bf99c6d8b58db4b18a4f6d36961
2018-12-11 10:20:33 +00:00
Andy Hung
3fddf92465 Revert "Remove obsolete ueventd.rc rules."
This reverts commit d3b0b2708b.

Reason for revert: Regression in USB audio handling

Test: USB audio playback on Crosshatch
Bug: 120795549
Change-Id: Ibd05cd9b419f3e7988ce24a45f800d4bfe91ef6a
2018-12-11 04:14:30 +00:00
David Anderson
0447f87bad Merge "liblp: Reclaim wasted space from unaligned partitions."
am: 0059bc76c3

Change-Id: I45f97a3bd14d669012bbd09368ca8abc94f4a1f9
2018-12-10 16:56:37 -08:00
David Anderson
0059bc76c3 Merge "liblp: Reclaim wasted space from unaligned partitions." 2018-12-11 00:35:42 +00:00
Tom Cherry
157854d564 Merge "fs_mgr: fix typo"
am: e610ad619e

Change-Id: I84653ab374f0383e3647b8857ba2d6ac83fcd906
2018-12-10 14:20:04 -08:00
Tom Cherry
e610ad619e Merge "fs_mgr: fix typo" 2018-12-10 21:44:30 +00:00