Commit graph

56085 commits

Author SHA1 Message Date
Nikita Ioffe
a36f7c1f93 Merge "Fix ota test case" 2020-01-17 12:18:53 +00:00
Oli Lan
90c523b30b Give x permission on apex data directories.
This gives search (x) permission on the parent apex data
directory /data/misc/apexdata so that directories below it
may be opened. It also gives that permission on the apex
data directories themselves.

Bug: 147848983
Test: Build & flash, check perms are correct
Change-Id: I27c4ea01602002c89d0771a144265e3879d9041a
2020-01-17 11:41:04 +00:00
Automerger Merge Worker
4a7a61d2c6 Merge "Add version #29 and #30 to liblog" am: d82d9851de
Change-Id: I82e8d2669b62ac379d22c4c87677afc375c6876d
2020-01-17 03:20:28 +00:00
Automerger Merge Worker
66e60c7b77 Merge "Add user for credstore." am: 4659cdaf5c
Change-Id: I49067be08beac18a36c78225390e8f2a1018bac9
2020-01-17 03:19:01 +00:00
Treehugger Robot
d82d9851de Merge "Add version #29 and #30 to liblog" 2020-01-17 03:11:11 +00:00
nelsonli
d83f390896 [vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed
Create KernelLibcutilsTest and add it to vts-core.
VtsKernelLibcutilsTest just run the test of libcutils_test_static
and filter-out all of the test except AshmemTest#. We can just use the
include-filter to do the same thing.

Bug: 147789274
Test: atest KernelLibcutilsTest
Change-Id: Idb5cee3596bf063c2419f1a11055a17ad3075e26
2020-01-17 09:48:58 +08:00
Junyong Sun
1ffccf5c8b adb: windows: fix adb execute root cmd with no tips
fwrite can cross windows platform to show log on terminal,
so we use it instead of WriteFdExactly.

Change-Id: I252c15a0bc72e1dbd98b7b5ec8000ecdcde16416
Signed-off-by: Junyong Sun <sunjy516@gmail.com>
2020-01-17 09:39:21 +08:00
Elliott Hughes
22690af334 Update shell_and_utilities docs for R.
Change-Id: I4db2aea050f101d2594242336d0413662fd2f0f3
2020-01-16 15:54:16 -08:00
Treehugger Robot
4659cdaf5c Merge "Add user for credstore." 2020-01-16 23:07:35 +00:00
Marco Ballesio
38c735e6ef llkd: ignore frozen processes
verify a process frozen state by reading its frezer cgroup value and
don't consider it as loop-locked if frozen.

Bug: 145698592
Test: llkd_unit_test
Test: Manually froze a few processes and waited for llkd timeout, verifying that
      no processes are killed, no reboot or ramdump occur and no llkd events are
      logged.
Change-Id: Iea02cd86dbd1df0e6658d02581aa4bb9b658f107
2020-01-16 22:55:37 +00:00
Nikita Ioffe
c3ea429112 Fix ota test case
It was failing with:
build/make/core/main.mk:2: Calling make directly is no longer supported.
build/make/core/main.mk:3: Either use 'envsetup.sh; m' or 'build/soong/soong_ui.bash --make-mode'
build/make/core/main.mk:4: *** done.  Stop.

Test: system/core/bootstat/boot_reason_test.sh ota
Change-Id: I4fea25f1c09e6ec2f346b6de3749699e254ffd26
2020-01-16 20:14:25 +00:00
Chong Zhang
265eee2006 Add version #29 and #30 to liblog
bug: 147759770
test: build
Change-Id: I38bcab9bc14088adbdbc3a92620f89a6fe397994
2020-01-16 11:11:44 -08:00
David Zeuthen
e83f386653 Add user for credstore.
The credstore system daemon is running as an unprivileged user. This
CL adds this user and also creates a directory (/data/misc/credstore/)
where this daemon can store its data.

Bug: 111446262
Test: N/A
Change-Id: I8da2c32dd04fef797870b8a7bbc5e499bed71f9e
2020-01-16 07:32:04 -05:00
Howard Chen
ea4f8eaffb Merge "Refine the first stage mount for DSU"
am: 62f35129d4

Change-Id: I4327d04403ab3c362681b254523cdae159aeeef0
2020-01-15 22:01:42 -08:00
Howard Chen
62f35129d4 Merge "Refine the first stage mount for DSU" 2020-01-16 05:33:09 +00:00
Xin Li
841ebe9c22 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Id3510157a16fb8f40f852ecfe7de3dafbc3f2828
2020-01-15 15:59:16 -08:00
Tom Cherry
391f68a4e5 Merge "Require liblog for libbase in all configurations"
am: f633b62b63

Change-Id: I6d29f632adafef399575e53b4e475323a480444a
2020-01-15 15:24:58 -08:00
Tom Cherry
f633b62b63 Merge "Require liblog for libbase in all configurations" 2020-01-15 23:20:07 +00:00
Nikita Ioffe
0d523b28cb Merge "Don't reboot into recovery during userspace reboot"
am: 661c77be0f

Change-Id: I4f7399e1e5f3983e8742a987d9377fcfac8d2245
2020-01-15 14:25:52 -08:00
Nikita Ioffe
661c77be0f Merge "Don't reboot into recovery during userspace reboot" 2020-01-15 22:22:18 +00:00
Ryan Savitski
f0f7e70186 init: add builtin check for perf_event LSM hooks
Historically, the syscall was controlled by a system-wide
perf_event_paranoid sysctl, which is not flexible enough to allow only
specific processes to use the syscall. However, SELinux support for the
syscall has been upstreamed recently[1] (and is being backported to
Android R release common kernels).
[1] da97e18458

As the presence of these hooks is not guaranteed on all Android R
platforms (since we support upgrades while keeping an older kernel), we
need to test for the feature dynamically. The LSM hooks themselves have
no way of being detected directly, so we instead test for their effects,
so we perform several syscalls, and look for a specific success/failure
combination, corresponding to the platform's SELinux policy.

If hooks are detected, perf_event_paranoid is set to -1 (unrestricted),
as the SELinux policy is then sufficient to control access.

This is done within init for several reasons:
* CAP_SYS_ADMIN side-steps perf_event_paranoid, so the tests can be done
  if non-root users aren't allowed to use the syscall (the default).
* init is already the setter of the paranoid value (see init.rc), which
  is also a privileged operation.
* the test itself is simple (couple of syscalls), so having a dedicated
  test binary/domain felt excessive.

I decided to go through a new sysprop (set by a builtin test in
second-stage init), and keeping the actuation in init.rc. We can change
it to an immediate write to the paranoid value if a use-case comes up
that requires the decision to be made earlier in the init sequence.

Bug: 137092007
Change-Id: Ib13a31fee896f17a28910d993df57168a83a4b3d
2020-01-15 20:58:15 +00:00
Steven Moreland
0714a9eae2 Merge "libcutils: fallback to /dev/ashmem"
am: 6e016ef80e

Change-Id: Ie8fcbadf4841a0b8537657598cd5dc1a01742f67
2020-01-15 11:51:00 -08:00
Ricky Wai
3fabcf5fcf Merge "Create /mnt/data_mirror/cur_profiles in init.rc"
am: ec7be0dc0f

Change-Id: Ic4fd8ca304f95a475470eae390e79aee83c3d7db
2020-01-15 11:50:29 -08:00
Treehugger Robot
6e016ef80e Merge "libcutils: fallback to /dev/ashmem" 2020-01-15 19:48:26 +00:00
Treehugger Robot
ec7be0dc0f Merge "Create /mnt/data_mirror/cur_profiles in init.rc" 2020-01-15 19:47:52 +00:00
Mark Salyzyn
92f7bbfbe5 llkd: test: llkd.sleep also check for __arm64_sys_openat
4.19 kernel reported __arm64_sys_openat instead of SyS_openat, so
the test for llkd.sleep also needs to check for that as well.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 147486902
Test: llkd_unit_test
Change-Id: Ibb4b4ca45391e35fd03fcb8e7ccea01f547b76e1
2020-01-15 09:08:48 -08:00
Mark Salyzyn
be2e2f2beb llkd: requires sys_admin permissions
As a result of commit f8a00cef17206ecd1b30d3d9f99e10d9fa707aa7
("proc: restrict kernel stack dumps to root")
the userdebug feature where llkd can monitor for live lock
signatures in the stack traces broke.

So now userdebug variant of llkd requires sys_admin permissions.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: llkd_unit_test
Bug: 147486902
Change-Id: I31572afa08daa490a69783855bce55313eaed96c
2020-01-15 09:08:48 -08:00
Alessio Balsini
30c681dd37 Snapshot merge progress percentage
Compute and print the progress percentage of the dm-snapshot devices
merging after an update is marked as successful.
All the snapshot devices are queried for their update states and all
their allocated, metadata and total sectors are summed as if the system
consists of a single big snapshot device, as well as the initial
allocated sectors to keep trace of the absolute progress. Then the merge
percentage is computed on the numbers for this fake snapshot device.

Bug: 139088917
Test: manual OTA
Change-Id: Ia9a51742105c90b7fd043f3cbf4249877def7f08
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-01-15 16:32:37 +00:00
Nikita Ioffe
05506f05b6 Don't reboot into recovery during userspace reboot
In case one of the cryptfs calls to vdc fails, first try a normal
reboot.

Test: manual
Bug: 135984674
Bug: 143970043
Change-Id: I5706d9cd6c3a08fa06329ffb7d141de632620e3d
2020-01-15 16:27:39 +00:00
Tom Cherry
45f06c49fa Merge "liblog: remove log_portability.h"
am: e2dad0a296

Change-Id: I24befb7f47f376697e2d121f5e18933cb81e2c37
2020-01-15 08:12:29 -08:00
Tom Cherry
902c974556 Merge "liblog: use libbase_headers for TEMP_FAILURE_RETRY"
am: 2ea787137f

Change-Id: I8e77472bb4eaa1b046892e866f0b19411169f368
2020-01-15 08:11:51 -08:00
Tom Cherry
e2dad0a296 Merge "liblog: remove log_portability.h" 2020-01-15 16:10:30 +00:00
Tom Cherry
2ea787137f Merge "liblog: use libbase_headers for TEMP_FAILURE_RETRY" 2020-01-15 16:09:45 +00:00
Nikita Ioffe
03fd199578 Merge "Change scope of ro.init.userspace_reboot.is_supported to public"
am: 60ddf3a29a

Change-Id: I3c67b57b6ea6be072b2cf8166ee92bd1908d8b1c
2020-01-15 06:18:01 -08:00
Nikita Ioffe
60ddf3a29a Merge "Change scope of ro.init.userspace_reboot.is_supported to public" 2020-01-15 14:14:08 +00:00
Alessio Balsini
122035fd3a Merge "Refactor update status management as protobuf"
am: 5c63dc9322

Change-Id: I9a995365cbbf354a8f3da09f1d900d9e52b5e4a9
2020-01-15 06:07:46 -08:00
Martijn Coenen
4cde8c3eaa Merge "Disable dm-verity hash prefetching."
am: e4505960b9

Change-Id: I844c05358e1d100feacb047124c975a4d86a23d8
2020-01-15 06:05:48 -08:00
Treehugger Robot
5c63dc9322 Merge "Refactor update status management as protobuf" 2020-01-15 14:04:25 +00:00
Treehugger Robot
e4505960b9 Merge "Disable dm-verity hash prefetching." 2020-01-15 13:13:01 +00:00
Songchun Fan
bed2e0c828 Merge "[incrementa;] set mode and encryption for /data/incremental"
am: f7593a9a2a

Change-Id: I491bbbeac963e58770eaa4d76e418bf4dfa08a41
2020-01-14 19:06:25 -08:00
Treehugger Robot
f7593a9a2a Merge "[incrementa;] set mode and encryption for /data/incremental" 2020-01-15 02:58:02 +00:00
Steven Moreland
22197eaea7 Merge "remove deprecated bp 'subdirs'"
am: aba02dbe6e

Change-Id: I76fa69b2a3e68e3a1df3bf3fe233d84ff4bf4423
2020-01-14 18:02:25 -08:00
Treehugger Robot
aba02dbe6e Merge "remove deprecated bp 'subdirs'" 2020-01-15 01:37:27 +00:00
Yifan Hong
d12410d2f9 Merge "fastboot: Mount /metadata before overlayfs teardown."
am: 38f3706ab3

Change-Id: Ibe451d178c80a040773fbd929cb1949db5737469
2020-01-14 17:33:39 -08:00
Yifan Hong
38f3706ab3 Merge "fastboot: Mount /metadata before overlayfs teardown." 2020-01-15 01:31:59 +00:00
Peter Collingbourne
bba5ea0622 Merge "Add unique_fd::operator{==,!=} overloads that take a unique_fd."
am: 9ef741ccac

Change-Id: Ie361658e875008f06bb8d50e476ce0c9ef377aa6
2020-01-14 17:25:44 -08:00
Peter Collingbourne
9ef741ccac Merge "Add unique_fd::operator{==,!=} overloads that take a unique_fd." 2020-01-15 01:24:01 +00:00
Tom Cherry
a5d5040108 Merge changes from topic "remove-log_to"
am: acd17330df

Change-Id: I910aa933ac8a1393c1bcac56b5cc12c1602c2095
2020-01-14 14:18:23 -08:00
Tom Cherry
f06cfd7fe4 storaged: replace LOG_TO() macros with LOG()
am: b8c1147c4a

Change-Id: I75b9569172694f57951a4462e57e36dbee702e72
2020-01-14 14:18:18 -08:00
Tom Cherry
acd17330df Merge changes from topic "remove-log_to"
* changes:
  base: remove LOG_TO(), PLOG_TO() and LOG_STREAM_TO() macros
  storaged: replace LOG_TO() macros with LOG()
2020-01-14 22:16:57 +00:00