Commit graph

44837 commits

Author SHA1 Message Date
Treehugger Robot
8a5a918ef8 Merge "Add the two best build system janitors." 2019-03-25 20:35:13 +00:00
Suren Baghdasaryan
7b2187c372 Merge "libprocessgroup: make sure SetupCgroups is called once and only by init" 2019-03-25 20:24:51 +00:00
Yi Kong
9b1f1ee4cc Merge "[libbacktrace] Modernize code to use override keyword" 2019-03-25 19:56:48 +00:00
Treehugger Robot
3d2fb41f17 Merge "Fix parse_apex_configs doc in README.md" 2019-03-25 18:49:41 +00:00
Suren Baghdasaryan
5ce165ec2e lmkd: Fix meminfo logs missing SwapTotal and having wrong field order
Previous change If154dc364711bf7c86f32e24ddcd10be359386de called
"lmkd: Do not downgrade/ignore events when swap is full" added SwapTotal
into meminfo structure without adding the field into events.logtag file.
This results in logs which missing field and all fields starting with
"SwapFree" get reordered as a result. Fix this by adding the missing field
into events.logtag.

Bug: 129274901
Test: Confirm correct information in the logcat
Change-Id: Ia4de3790a7e9d49a0e4cba8b3161a715eaf6532e
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-25 11:04:11 -07:00
Elliott Hughes
d8a4f1463d Add the two best build system janitors.
Test: N/A
Change-Id: Ib5351b50652a7d1e0ab537aedfe6d4335f507cde
2019-03-25 10:25:13 -07:00
Suren Baghdasaryan
798e805715 libprocessgroup: make sure SetupCgroups is called once and only by init
SetupCgroups is called by init process during early-init stage and is not
supposed to be called again by anyone else. Ensure that the caller is the
init process, make sure cgroup.rc file is written only one time, keep the
file descriptor to cgroup.rc file open by the init process to ensure all
its further mappings stay valid even if the file is deleted.

Bug: 124774415
Test: build, run, verify no errors or warning in the logcat

Change-Id: I70ccec551fc07c380333566f618b969667dcf783
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-25 16:22:10 +00:00
Elliott Hughes
443fdb2fdc Merge "Clean up some mess by only building Android-specific code for the device." 2019-03-25 16:14:23 +00:00
Treehugger Robot
42a5dd9c41 Merge "Fix sed command on Mac builds" 2019-03-25 13:37:21 +00:00
Treehugger Robot
6534c60e43 Merge "Do not fail when there is no vndk namespace" 2019-03-25 12:34:16 +00:00
Nicolas Geoffray
7b50fc4bef Merge "Allow makefiles to be parsed in a trimmed down manifest." 2019-03-25 11:58:04 +00:00
Yi Kong
13f2d18e30 [libbacktrace] Modernize code to use override keyword
Generated by clang-tidy.

Test: m checkbuild
Change-Id: I4506a9624002250117148413ea6990749cc1a4da
2019-03-25 02:22:42 -07:00
Nicolas Geoffray
7f03e4eea1 Allow makefiles to be parsed in a trimmed down manifest.
Test: m
Change-Id: Id0e52eacc8e8b5fa75af2050a72be6a8bdadc984
Exempt-From-Owner-Approval: Unbreaks ART team
2019-03-25 09:14:33 +00:00
Treehugger Robot
dddf40a7f5 Merge changes from topic "b/129002747"
* changes:
  Make VTS run libdm_test
  Create a VTS test from liblp_test
2019-03-25 05:09:36 +00:00
Kiyoung Kim
23ff8eb9c2 Do not fail when there is no vndk namespace
Some of the legacy devices may not have vndk namespace. To make this
work, libnativeloader should not fail when it fails to search for vndk
namespace.

Bug: 129011845
Test: m -j
Change-Id: I6f68aeb6ae84a00985cc20561b2fcdb461be9724
Merged-In: Id9147d4aeee9ba2b301b6893dea5884dce9c14fa
2019-03-25 13:59:40 +09:00
Nick Kralevich
832bd17a0b Merge "zip_archive.cc: delete android_errorWriteLog" 2019-03-23 03:08:35 +00:00
Nick Kralevich
a72477630d Merge "entry_name_utils-inl.h: clear top bit before shifting" 2019-03-23 03:08:07 +00:00
Hridya Valsaraju
1a9a02c9a6 Make VTS run libdm_test
Bug: 129002747
Test: vts-tradefed run commandAndExit vts-kernel --primary-abi-only --module VtsKernelLibdmTest

Change-Id: If0fb06bde561ae839d3aff96a73eb395082b4653
2019-03-22 15:11:49 -07:00
Hridya Valsaraju
4e3b6332ab Create a VTS test from liblp_test
Bug: 129002747
Test: vts-tradefed run commandAndExit vts-kernel --primary-abi-only --module VtsKernelLiblpTest

Change-Id: I6497428ec1ce93f4c1814c3185c490d3701f1140
2019-03-22 15:11:49 -07:00
Yifan Hong
5f4cb8a240 libbase: realpath is wrapped with TEMP_FAILURE_RETRY
Although man page for realpath doesn't say so, the bionic
implementation of realpath may exit with error code
EINTR. In such cases, retry.

Test: boots (sanity)
Change-Id: Ic5feb7152374a81bd2f475ad74c4bc8c3afb3a20
2019-03-22 14:26:25 -07:00
Yifan Hong
26328e80b1 liblp: Replace open with GetControlFileOrOpen
... so that fds from init can be used.

Bug: 126233777
Test: unit tests

Change-Id: Ife652e61305ef4fb6a02edfa765a91b5959d1b4b
2019-03-22 14:26:25 -07:00
Hridya Valsaraju
d5b690993b Merge "Fuzzy_fastboot must set back the original slot after test" 2019-03-22 21:09:08 +00:00
Mark Salyzyn
605eab93c6 Merge "fs_mgr: overlay: test is alarming on legacy eng builds." 2019-03-22 18:08:20 +00:00
Mark Salyzyn
b43448941a fs_mgr: overlay: test is alarming on legacy eng builds.
On taimen-eng build, the test reports:

  [  WARNING ] user fastboot missing required to invalidate, ignoring a failure
  ERROR: expected "cat: /vendor/hello: No such file or directory"
         got "Hello World! Fri Mar 22 08:56:32 PDT 2019"
  [  FAILED  ] vendor content after flash vendor

Which is a result of a corner case problem on devices that need to
use overlayfs to support adb remount, but do not have fastbootd as
required by Dynamic Android Partitions (DAP).  These legacy non-DAP
devices we consider this a Known Issue.

The message however is too alarming when reporting this Known Issue
that the test has notified you it accepts.  Use standard notification
output format, and change the result to a series of WARNING instead.

The output would then look like:

  [  WARNING ] user fastboot missing required to invalidate, ignoring a failure
  [  WARNING ] expected "cat: /vendor/hello: No such file or directory"
  [  WARNING ] got "Hello World! Fri Mar 22 08:56:32 PDT 2019"
  [  WARNING ] vendor content after flash vendor

Which still tells us there is an issue, but does not cause a state
of extreme alarm when looking at the test output.

Test: adb-remount-test.sh
Bug: 120448575
Bug: 128876541
Bug: 123079041
Change-Id: I1d8d60f23f7670ade7eae1be629264f7507e0cfd
2019-03-22 09:41:20 -07:00
Victor Hsieh
59183120c2 Initialize fs-verity keys in shell script
This gives us two benefits:
  - Better compatibility to keyctl(1), which doesn't have "dadd"
  - Pave the way to specify key's security labels, since keyctl(1)
    doesn't support, and we want to avoid adding incompatible option.

Test: See keys loaded in /proc/keys
Bug: 128607724
Change-Id: Ia45f6e9dea80d037c0820cf1fd2bc9d7c8bb6302
2019-03-22 09:18:00 -07:00
Suren Baghdasaryan
b552c4ad9a Merge "libprocessgroup: Deliberately leak TaskProfiles and CgroupMap instances." 2019-03-22 16:04:56 +00:00
Yifan Hong
567f1874fd init: expand prop in 'file'
Allow having properties in 'file' option of a service.

Test: boots (sanity)
Test: lpdumpd
Bug: 126233777
Change-Id: I55158b81e3829b393a9725fd8f09200690d0230f
2019-03-21 16:00:00 -07:00
Yifan Hong
dd6eefca30 libcutils: android_get_control_file uses realpath.
If the path to android_get_control_file is a symlink, the final sanity
check will fail that the fd does not have the same path as the given
file. We can't expect callers to readlink() because this would change
the environment key. Instead, try to call realpath on both paths.

Bug: 126233777
Test: lpdump
Change-Id: I0df10d7dbe3e572b8335faad812e5cd80bff1733
2019-03-21 16:00:00 -07:00
Elliott Hughes
7acb0d39e8 Clean up some mess by only building Android-specific code for the device.
Test: treehugger
Change-Id: Id44721ccd1817d8c537b226f60a58b7cb691fb01
2019-03-21 14:59:45 -07:00
Vic Yang
87215c2530 Fix parse_apex_configs doc in README.md
Test: None
Change-Id: I0871e640cfcab706a5396e3824a1f75239c29840
2019-03-21 11:59:29 -07:00
Colin Cross
b566e3cb2f Merge "Catch SIGBUS in HeapWalker" 2019-03-21 17:48:03 +00:00
Vic Yang
4a85f3c92a Fix sed command on Mac builds
Bug: 119423884
Test: Manually test sed command on Mac
Change-Id: I8df32b2476a01e2b758ea81f00dae0b6179ba79a
2019-03-21 10:16:06 -07:00
Pete Bentley
cc6c50a123 Tighten native API surface.
AsynchronousCloseMonitor is moved into libandroidio by
r.android.com/910073 and so libjavacore no longer needs to
be linked to the conscrypt namespace.

Bug: 123744297
Test: m && flashall
Test: atest CtsLibcoreOkHttpTestCases
Test: atest CtsLibcoreTestCases
Change-Id: Id720b59e4ef42a2c0226b497a1cc3c54f7a837d0
2019-03-21 17:13:14 +00:00
Yurii Zubrytskyi
1265bc9c6f Merge "[base] Convert Starts/Ends/Equals string functions to string_view" 2019-03-21 17:08:48 +00:00
Peter Collingbourne
dba6d44376 libprocessgroup: Deliberately leak TaskProfiles and CgroupMap instances.
This avoids a race between destruction on process exit and concurrent
access from another thread.

Bug: 129023204
Change-Id: Iecafa67a78e2cce53687156e7f91547b4a23ec13
2019-03-21 17:00:48 +00:00
Nick Kralevich
104771e55e zip_archive.cc: delete android_errorWriteLog
The process of determining whether or not to emit a safetynet error
entry while processing a malformed file relies on addition overflow.
Since this is only logging, and logging which isn't used, delete the
code instead of trying to fix the logic which is causing the integer
overflow.

This change is necessary to enable integer sanitization on this code.

Somewhat related to Bug: 122975762
Test: atest ziparchive-tests

Change-Id: I6b41ccf7881348cb4e5236324eaa44a05662a725
2019-03-21 09:58:56 -07:00
Yurii Zubrytskyi
59d876c7a2 [base] Convert Starts/Ends/Equals string functions to string_view
Test: UTs

Change-Id: I3751656d44e7a814488169c53d3e8af0da44f262
2019-03-21 16:29:46 +00:00
Nick Kralevich
c5da03f448 entry_name_utils-inl.h: clear top bit before shifting
Attempting to shift a uint8_t which has the top bit set results in a
value outside of the range allowable for a uint8_t. The process of
converting this value back to a uint8_t triggers ubsan's
implicit-conversion sanitizer.

Ensure the high order bit is stripped before shifting, so that the
shifted value fits into the allowable uint8_t range.

This change is necessary to enable integer sanitization on this code.

Somewhat related to Bug: 122975762
Test: atest ziparchive-tests

Change-Id: I940c8b2828ac88348d80f731274b990e35de6631
2019-03-21 09:29:31 -07:00
Luke Huang
9f409f2e4c Enlarge cmd buffer size of FrameworkListener
Only Netd and Logd use FrameworkListener currently.
Run realted test to ensure anything are still fine.

Bug: 126307309
Test: built, flashed, booted
      system/netd/tests/runtests.sh pass
      atest CtsLogdTestCases

Change-Id: Iacd0cc13f23f457a0868a8a706080c3edc9a3cbd
2019-03-21 23:09:16 +08:00
Vic Yang
c3e96512c0 Merge "Add support for no-vendor-variant VNDK" 2019-03-21 04:30:47 +00:00
David Anderson
ee725f610f init: Support booting off GSIs installed to non-userdata block devices.
Bug: 126230649
Bug: 127953521
Test: GSI boots when installed to sdcard on hikey960
      GSI boots when installed to /data/gsi
Change-Id: Id59926ebe363939c8c5745bb1bf5bd13722dae7e
2019-03-20 18:22:00 -07:00
Mark Salyzyn
ddae5c85b9 Merge "bootstat: add 4 reboot reasons to known set" 2019-03-21 00:18:37 +00:00
Colin Cross
87315e9d2f Catch SIGBUS in HeapWalker
SIGBUS shouldn't happen, since all of the regions being walked
were previously read out of /prod/pid/maps, but it seems to happen
rarely.  Catch it so it can produce a better log message.

Bug: 128983715
Test: atest memunreachable_test
Change-Id: I82d3941a382a0451c0dda12f5eb849ad8d697bc9
2019-03-20 16:06:52 -07:00
Nick Kralevich
30dec070dd libziparchive: add integer checks
The code in libziparchive has lots of questionable looking but not
obviously wrong integer operations. In order to shake out integer bugs
in libziparchive (for example, commit
1ee4892e66 from bug 31251826) and provide
protection against security bugs, enable some integer sanitization
options in libziparchive.

Bug: 122975762
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=941802
Test: device boots and no obvious problems.
Change-Id: I215d81892a6eff12d692648c69a03e8200b334d7
2019-03-20 13:04:02 -07:00
Evgenii Stepanov
b4ef0beb99 Merge "Fix libmemunreachable vs hwasan conflict." 2019-03-20 19:41:29 +00:00
Jone Chou
d51036d641 bootstat: add 4 reboot reasons to known set
- reboot,rtc
- reboot,dm-verity_device_corrupted
- reboot,dm-verity_enforcing
- reboot,keys_clear

Test: none
Bug: 128929506
Bug: 128929604
Change-Id: I5438c236abb67b74c7b9d717930c0ea69f70540d
Signed-off-by: Jone Chou <jonechou@google.com>
2019-03-20 16:53:29 +00:00
Treehugger Robot
ee3cce8b7b Merge "init: make sepolicy dependency optional" 2019-03-20 16:42:29 +00:00
Treehugger Robot
4dd15cbe24 Merge "fs_mgr: remount: manufacture a missing / entry for default fstab" 2019-03-20 15:01:16 +00:00
Treehugger Robot
6bddf40d31 Merge "Add more tests for dynamic partitions" 2019-03-20 04:32:23 +00:00
Treehugger Robot
b0f125d581 Merge "Add a test for logical partitions." 2019-03-20 04:32:03 +00:00