Commit graph

44681 commits

Author SHA1 Message Date
Logan Chien
e1324405a4 Merge "Fix runtime namespace links for vendor processes"
am: c2aad281fc

Change-Id: Ib696a207258159181fecba4793eafec264da6f30
2019-01-06 21:32:31 -08:00
Logan Chien
c2aad281fc Merge "Fix runtime namespace links for vendor processes" 2019-01-07 05:19:49 +00:00
Logan Chien
c0bb441b15 Fix runtime namespace links for vendor processes
This commit removes the soname filter from the namespace fallback link
from `runtime` to `system` in the vendor process.  This fixes the
problem that vendor process might fail to load `libnetd_client.so`,
`libc_malloc_debug.so`, `libc_malloc_debug_leak.so`, and other libc
dependencies.

This commit also removes the namespace fallback link from `runtime` to
`default` in the vendor process.  According to the comments in [1], the
original intention was to allow the access to `/system/${LIB}` not
`/vendor/${LIB}`.  Furthermore, `com.android.runtime` suppose to work
without libraries from `/vendor/${LIB}`.

[1] https://android-review.googlesource.com/c/858456

Bug: 119867084
Bug: 122025516  # Motivation of this commit
Test: Executables under vendor partition are not blocked by
`libnetd_client.so` not found error.

Change-Id: I682baada9d755910832474bb3d8307cd49c21ece
2019-01-07 11:14:34 +08:00
Sandeep Patil
22e1ae9e22 Merge changes from topic "fiemap-writer-1"
am: 32b695daa7

Change-Id: I9725ff0adf14304c9b545b16e6b880aa9af8234c
2019-01-06 17:58:09 -08:00
Treehugger Robot
32b695daa7 Merge changes from topic "fiemap-writer-1"
* changes:
  fiemap_writer: enforce filesystem optimal block size alignment
  fiemap_writer: Fix file pinning / pinning status check code.
2019-01-07 01:48:46 +00:00
Bowgo Tsai
d8bc732ad3 Merge "Skip building libfs_avb unittest for Mac"
am: 301b394a36

Change-Id: I5736dc7a4527a7a91ded176b150bf651061296a1
2019-01-05 23:56:48 -08:00
Treehugger Robot
301b394a36 Merge "Skip building libfs_avb unittest for Mac" 2019-01-06 07:46:44 +00:00
Bowgo Tsai
a99a1f275c Skip building libfs_avb unittest for Mac
Bug: 117960205
Test: m libfs_avb_host_unittest
Change-Id: Ib53efe3e36a3f70134b2431c2c0bfed52fdd3df6
2019-01-06 13:41:45 +08:00
Sandeep Patil
eb28e0c44b fiemap_writer: enforce filesystem optimal block size alignment
... instead of using the block size from the underlying block device.

Bug: 121211685
Test: fiemap_writer_test /dev/block/sda21 (on blueline)

Change-Id: I6038d3f06505a397280b0482e33814b4883be9a2
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-05 17:38:31 -08:00
Sandeep Patil
d2b2e21f59 fiemap_writer: Fix file pinning / pinning status check code.
The IsFilePinned() function is still not being called because I am still
seeing # blocks moved when I run following test on
aosp_blueline-userdebug.

 $ fiemap_writer_test /dev/block/sda21 \
 --gtest_filter=FiemapWriterTest.CheckWriteError

Bug: 122138114
Test: fiemap_writer_test /dev/block/sda21

Change-Id: I08d74093a082674d621772d202143d2f32e7c665
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-05 15:29:54 -08:00
Bowgo Tsai
4bbecc85e2 Merge "Adding libfs_avb unittest framework"
am: 0dd3725982

Change-Id: Ie259009a797e1967972294a06790c535d272fea3
2019-01-05 03:10:37 -08:00
Treehugger Robot
0dd3725982 Merge "Adding libfs_avb unittest framework" 2019-01-05 10:57:13 +00:00
Bowgo Tsai
a76ec62f85 Merge "fs_mgr_avb: introducing class VBMetaData"
am: aed2ee9664

Change-Id: Ifabb004afbfe16d859328a715777f133bda5ead1
2019-01-04 22:53:55 -08:00
Treehugger Robot
aed2ee9664 Merge "fs_mgr_avb: introducing class VBMetaData" 2019-01-05 06:41:14 +00:00
Matthew Maurer
5ff2ff69eb Merge "trusty: Add trusty unittest control utility"
am: 1f9461786e

Change-Id: I4a62aaa52340d9e1f7d57e02f3a53bca5110e645
2019-01-04 20:31:04 -08:00
Matthew Maurer
1f9461786e Merge "trusty: Add trusty unittest control utility" 2019-01-05 04:23:25 +00:00
Mark Salyzyn
688a052ad8 Merge "llkd: enhance list properties"
am: 70718dba91

Change-Id: I8eb8e70915e1c06da30878b2cfe23a67d98f2b09
2019-01-04 19:25:42 -08:00
Treehugger Robot
70718dba91 Merge "llkd: enhance list properties" 2019-01-05 03:11:50 +00:00
Tom Cherry
7c7c2a4e27 Merge "ueventd: create a /dev/block/by-name/ symlink without a partition name"
am: 9a9a4ad84c

Change-Id: Ic08d5f4d5a29b9a70a981aabce81726f3823f989
2019-01-04 17:18:35 -08:00
Tom Cherry
9a9a4ad84c Merge "ueventd: create a /dev/block/by-name/ symlink without a partition name" 2019-01-05 01:06:16 +00:00
David Anderson
c1bfb941eb Merge "liblp: Allow GSI metadata to bypass slot suffixing checks."
am: dbce5856d5

Change-Id: I6b92174cb7553e9fed451c4446916643b95362de
2019-01-04 15:13:23 -08:00
David Anderson
5702d1bae9 Merge "liblp: Add API for adding predetermined linear extents to partitions"
am: c80c6ac9dd

Change-Id: I43131627701ab4adb04a6e98e30b8802199fd7bc
2019-01-04 15:12:50 -08:00
David Anderson
dbce5856d5 Merge "liblp: Allow GSI metadata to bypass slot suffixing checks." 2019-01-04 23:03:37 +00:00
David Anderson
c80c6ac9dd Merge "liblp: Add API for adding predetermined linear extents to partitions" 2019-01-04 23:03:10 +00:00
Mark Salyzyn
46ff9f1315 Merge "llkd: check stack for wait_on_page_bit_killable"
am: b815e6ccd4

Change-Id: Ic7bf5d17d5960c1f89b1477e93d080ec731791f2
2019-01-04 14:09:49 -08:00
Mark Salyzyn
eeeb6677ca Merge "llkd: report stack signature matched"
am: 3cd02e8908

Change-Id: I66ae4a065c293302b53acde42d5a2c2fb03ce970
2019-01-04 14:08:49 -08:00
Treehugger Robot
b815e6ccd4 Merge "llkd: check stack for wait_on_page_bit_killable" 2019-01-04 21:55:15 +00:00
Treehugger Robot
3cd02e8908 Merge "llkd: report stack signature matched" 2019-01-04 21:54:53 +00:00
Michael Ryleev
129fadf051 trusty: Add trusty unittest control utility
It is designed to connect to user specified port and
implements unittest logging protocol supported by
typical unittest ap running on Trusty side.

Test: manual
Change-Id: I6e37ccee9b9e4dde563ef0e4f531b42091cc2bd8
2019-01-04 11:54:26 -08:00
Mark Salyzyn
8a5f081763 llkd: enhance list properties
Because of the limited length of properties, and to ease the
complexity of product and vendor adjustments, the comma separated
list properties will use a leading comma to preserve the defaults
and add or subtract entries with + and - prefixes respectively.

Without the leading comma, the list is explicitly specified as before.

Cleanup:
- use empty() instead of space() == 0 (or converse if != 0)
- if (unlikely) pprocp can not be allocated, to a to_string(ppid) check

For testing, observe before and after llkd_unit_test below to
confirm leading comma effects for example:

livelock: ro.llk.stack=wait_on_page_bit_killable,bit_wait_io,\
                       __get_user_pages,cma_alloc
livelock: ro.llk.stack=...,SyS_openat,...

Test: llkd_unit_test
Bug: 120983740
Change-Id: Ia3d164c2fdac5295a474c6c1294a34e4ae9d0b61
2019-01-04 11:43:15 -08:00
Mark Salyzyn
b658ffa2f3 llkd: check stack for wait_on_page_bit_killable
User process in S state blocked by deadlock in I/O system

wait_on_page_bit is covered by regular D state tracking.

Bug: 120776455
Test: long term stability on multiple devices
Change-Id: Icdb99b8095f384cb440f0f2bdeba86c5991b9ef4
2019-01-04 10:46:05 -08:00
Mark Salyzyn
22e05fb5a4 llkd: report stack signature matched
Adjusted debugging messaging to add clarity.  Report _which_ stack
signature matched that triggered the kernel panic.  Reduce the noise
associated with missing /stack to VERBOSE as that is for development
debugging only.

Test: observe during unit test we see something like following logs:

livelock: Found SyS_openat in stack for pid XXX
livelock: S 120.000s XXX->YYY port-bridge [kill]
livelock: Killing '/vendor/bin/port-bridge' (XXX) to check forward\
          scheduling progress in S state for\
          '/vendor/bin/port-bridge' (YYY)
. . .
livelock: Found SyS_openat in stack for pid XXXXX
livelock: S 120.000s XXXXX->XXXXX llkd_unit_test [kill]
livelock: Killing '/data/nativetest64/llkd_unit_test/llkd_unit_test\
          (XXXXX) to check forward scheduling progress in S state

Test: llkd_unit_test
Bug: 33808187
Change-Id: Ifac7dd9a656208563bb20e28739abb741358d964
2019-01-04 10:46:05 -08:00
David Anderson
126e481972 liblp: Allow GSI metadata to bypass slot suffixing checks.
Bug: 121210348
Test: manual test
Change-Id: I40634c72b0255197a5c16e23553f4cf54bc32579
2019-01-03 18:19:43 -08:00
David Anderson
189727089e liblp: Add API for adding predetermined linear extents to partitions
Bug: 121210348
Test: manual test
Change-Id: Ie9af456d5193e962a3bcf0cc5dcd22e794d143f6
2019-01-03 18:18:45 -08:00
Steven Moreland
f4e7272d8c Merge "CallStack: include prefix/tag when unlinked"
am: 1476931e02

Change-Id: I386a6b343e8a1de1fd282ec61d3f63601b97f4da
2019-01-03 16:57:42 -08:00
Treehugger Robot
1476931e02 Merge "CallStack: include prefix/tag when unlinked" 2019-01-04 00:45:38 +00:00
Steven Moreland
8338072591 CallStack: include prefix/tag when unlinked
Bug: N/A
Test: manual
Change-Id: I8f7a19744af938a02d876ab81c1dafee04744f96
2019-01-03 10:17:07 -08:00
Sandeep Patil
da23f043df Merge "fiemap_writer: First cut implementation with write() support."
am: ac535f9713

Change-Id: I84b8a0992e66fe29c5fd16c273109533942969cb
2019-01-03 08:06:43 -08:00
Sandeep Patil
ac535f9713 Merge "fiemap_writer: First cut implementation with write() support." 2019-01-03 15:56:15 +00:00
Bowgo Tsai
b92fc1f423 fs_mgr_avb: introducing class VBMetaData
Currently vbmeta images are stored in AvbSlotVerifyData defined in
libavb, which contains some fields that isn't needed by fs_mgr.
e.g., loaded_partition, rollback_indexes. Adding a new class VBMetaData
to replace it.

Bug: 112103720
Bug: 117960205
Test: boot crosshatch
Change-Id: I480461dad3c6aca7e028097662a3b06c3aa6646d
2019-01-03 18:17:56 +08:00
Bowgo Tsai
583540330c Adding libfs_avb unittest framework
This commit adds the fundamental test framework for the upcoming
changes in libfs_avb. It replies on 'avbtool' to append AVB
metadata and then extracts the vbmeta content into an internal
|vbmeta_images_| variable for comparison later.

Bug: 117960205
Test: m libfs_avb_host_unittest
Test: ./out/host/linux-x86/nativetest/libfs_avb_host_unittest/libfs_avb_host_unittest
Test: atest --rebuild-module-info
Test: atest libfs_avb_host_unittest

Change-Id: I0cb8e8f04bc4b8628576565e7ff1920d7c81ecac
2019-01-02 09:58:08 +00:00
Sandeep Patil
0d0d22d649 Merge "meminfo: Use getprogname(3) in all tools."
am: 40d06258b6

Change-Id: I56c9f3e5eb7b7889a580979059ff318643146d5f
2018-12-31 19:56:12 -08:00
Sandeep Patil
40d06258b6 Merge "meminfo: Use getprogname(3) in all tools." 2019-01-01 03:49:55 +00:00
Sandeep Patil
7b20fb677e meminfo: Use getprogname(3) in all tools.
Test: procrank2 -h;librank2 -h;procmem2 -h
Bug: none

Change-Id: Ieccd943b7140a7866694eea047969500bb3bb972
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-12-30 13:42:20 -08:00
Sandeep Patil
faa257ee0f fiemap_writer: First cut implementation with write() support.
The library is meant to help write to a file using its FIEMAP and the
raw block device.

Bug: 121211685
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21 1073741824
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21 \
      --gtest_filter=FiemapWriter.CheckBlockDevicePath
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21 32768 \
      --gtest_filter=FiemapWriter.CheckWriteError
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21 \
      --gtest_filter=VerifyBlockWritesExt4.CheckWrites
Test: fiemap_writer_test /data/local/tmp/foo.raw /dev/block/sda21 \
      --gtest_filter=VerifyBlockWritesF2fs.CheckWrites

Change-Id: I7b580afddc829c1064ebb52b7a6c7600a2fb2772
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-12-29 11:11:30 -08:00
Ryan Haining
20f1be47d3 Merge "Allow dlopen()ing libraries from the netd APEX on pasan build"
am: 0c2d673fcc

Change-Id: Icbd4782ad63959c0a5affb197edbd3cf1c22f104
2018-12-28 13:25:43 -08:00
Ryan Haining
0c2d673fcc Merge "Allow dlopen()ing libraries from the netd APEX on pasan build" 2018-12-28 21:14:46 +00:00
Ken Chen
30200f1e24 Allow dlopen()ing libraries from the netd APEX on pasan build
This is a workaround to allow us to use libnetd_resolv.so from
the resolver APEX before b/120661824 is fixed.

We cannot put the APEX into the search path due to b/120661824,
but we can put it into the permitted path,

Bug: b/122073006
Test: builds, boots
Test: system/netd/tests/runtests.sh
Change-Id: If6f13ba9dc249d019b820a7c37cf6d4cdd8d0a7d
2018-12-28 17:20:01 +08:00
Tom Cherry
7f3b0468fa Merge "init: document the early init boot phase"
am: cf557efb19

Change-Id: I5bec3c54d0e3f42e49d42af2a9d8baf282635001
2018-12-27 16:58:53 -08:00
Tom Cherry
cf557efb19 Merge "init: document the early init boot phase" 2018-12-28 00:48:45 +00:00