Commit graph

74913 commits

Author SHA1 Message Date
Treehugger Robot
ee0584b2db Merge "Add property_service to hwasan-postsubmit" 2022-03-19 01:14:37 +00:00
Florian Mayer
e866ce421d Merge "Add libcutils to hwasan-postsubmit" 2022-03-19 00:25:31 +00:00
Florian Mayer
bf6f7fafb6 Merge "Add libpackagelistparser to hwasan-postsubmit" 2022-03-19 00:21:49 +00:00
Florian Mayer
3a99e7d2c4 Merge "Add socket_lazy to hwasan-postsubmit" 2022-03-19 00:15:53 +00:00
Treehugger Robot
5d2c849c73 Merge "libsnapshot: Fix vts_libsnapshot_test" 2022-03-19 00:14:27 +00:00
Florian Mayer
4a40c57e74 Merge "Add pull_lazy to hwasan-postsubmit" 2022-03-18 23:31:53 +00:00
Florian Mayer
1aa501ba3b Merge "Add liblp to hwasan-postsubmit" 2022-03-18 23:10:24 +00:00
Florian Mayer
303e218dbe Merge "Add healthd to hwasan-postsubmit" 2022-03-18 23:09:56 +00:00
Florian Mayer
d25baf462d Add property_service to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I0d7ac4acc8d5171d40bdd4dc4e03fc32f4348edb
2022-03-18 21:47:10 +00:00
Florian Mayer
582c282731 Add libpackagelistparser to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I20deb6453704726b03937f2242e45b5dedcf9cf1
2022-03-18 21:41:03 +00:00
Florian Mayer
bb015aacd0 Add libcutils to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I16013b864b3cc7850f46db0163efc59a69485b8d
2022-03-18 21:38:21 +00:00
Florian Mayer
f7be3cc3ac Add socket_lazy to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I395ebdecd5c98d1b669fc34270d5081a12076fef
2022-03-18 21:31:30 +00:00
Florian Mayer
84f39e5728 Add pull_lazy to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I3f9ebeebcfd1b69651731130ab22638dd1f218cf
2022-03-18 21:31:09 +00:00
Florian Mayer
92c1ef9e97 Add liblp to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I6514e9f170d03ee2d2673d115a9c8337ac6941b0
2022-03-18 21:23:51 +00:00
Florian Mayer
6e2276b28a Add healthd to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I710628acb0fffcbf670e4e30059f3cfa284f9540
2022-03-18 21:19:00 +00:00
Akilesh Kailash
44343d4416 libsnapshot: Fix vts_libsnapshot_test
Fix SnapshotUpdateTest.QueryStatusError which
was failing on targets where userspace-snapshots are not
yet enabled.

Bug: 224586316
Test: vts_libsnapshot_test -force_config dmsnap --gtest_filter=SnapshotUpdateTest.QueryStatusError
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ibaacff9b03eafe0bfa537d0f9cab98b7caceb37e
2022-03-18 20:11:17 +00:00
Treehugger Robot
81cc9d986f Merge "Add core to hwasan-postsubmit" 2022-03-18 19:24:07 +00:00
Tri Vo
5ba7cba78f Merge "trusty: set_attestation_key: Provision device IDs" 2022-03-18 18:14:18 +00:00
Tri Vo
7aeb43ecfc trusty: set_attestation_key: Provision device IDs
Bug: 221128605
Test: /vendor/bin/trusty_keymaster_set_attestation_key /vendor/etc/keymaster_soft_attestation_keys.xml
Change-Id: Iabe2162a7d50f16c966f16ca2eda5a7651779848
2022-03-17 17:49:35 -07:00
Bart Van Assche
c9b78e9528 Merge "Add support for optional cgroup attributes" 2022-03-17 21:17:44 +00:00
Florian Mayer
6c27e866f7 Add core to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I4328299776e7e658d0f02f7b71b150c1f4815d3e
2022-03-17 14:02:43 -07:00
Treehugger Robot
addba34668 Merge "Fix TEMP_FAILURE_RETRY on non-GNU C++ dialects" 2022-03-17 04:05:17 +00:00
David Anderson
fe62ca7165 Merge "init: Add more diagnostics for signalfd hangs." 2022-03-16 23:11:12 +00:00
Treehugger Robot
4c7dc7bd1d Merge changes from topic "sys_rootdisk"
* changes:
  Init: add dev.mnt.blk.bootdevice to access device sysfs
  init: mount_handler: detect main block device more reliably
  init.rc: use /sys/class/block instead of /sys/devices/virtual/block
2022-03-16 22:44:01 +00:00
Treehugger Robot
f8cd69af8b Merge changes Iee0932b5,I0d77c490
* changes:
  Fix Errors.h on systems that define NO_ERROR
  Disable call stacks on every OS except Linux/Android
2022-03-16 22:25:16 +00:00
Andrei Homescu
fcbc96191c Fix TEMP_FAILURE_RETRY on non-GNU C++ dialects
TEMP_FAILURE_RETRY uses typeof which is only allowed by gcc and clang
for GNU dialects. This switches to __typeof__ which is always supported.

Bug: 224644083
Test: m
Change-Id: I96d48d2f0dc5cd9ab903755d93c71c4eb80f7529
2022-03-16 20:54:31 +00:00
Bart Van Assche
59af680023 Add support for optional cgroup attributes
Cgroup attributes like io.weight or io.bfq.weight only exist if the
corresponding I/O scheduler has been loaded. Hence add support for
ignoring failures to write to a cgroup attribute that does not exist.

Bug: 213617178
Test: This patch has been tested in combination with patch "Migrate the blkio controller to the cgroup v2 hierarchy".
Change-Id: I5debafabc4dd430a1b98ea343bf3740c764edcc3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-16 19:55:46 +00:00
Treehugger Robot
4e0a7f22fa Merge changes Ib5012456,Idbfb49c2,Ieb953c18
* changes:
  Use uid_t for user IDs and gid_t for group IDs
  Fix cgroup directory permissions
  Simplify cgroups.json
2022-03-16 19:53:41 +00:00
David Anderson
14f9c15e05 init: Add more diagnostics for signalfd hangs.
This adds two new diagnostics. First, signalfd reads are now non-blocking. If the read takes more than 10 seconds, we log an error.

Second, init now wakes up from epoll() every 10 seconds. If it waits on an "exec" command for more than 10 seconds, it logs an error.

This change will be reverted as soon as we get feedback.

Bug: 223076262
Test: device boots
Change-Id: I7ee98d159599217a641b3de2564a92c2435f57ef
2022-03-16 05:06:17 +00:00
Andrei Homescu
aa4ebf2ce1 Fix Errors.h on systems that define NO_ERROR
Some systems (originally only Windows) define their own
NO_ERROR macro that overlaps with the enumerator from Errors.h.
The enumerator is only defined if the macro was not.

Bug: 224644083
Test: m
Change-Id: Iee0932b5259b3bfcf6494656b27e6e7488319f5c
2022-03-16 02:15:04 +00:00
Andrei Homescu
5c15de21da Disable call stacks on every OS except Linux/Android
To keep libutils (and consequently libbinder) as compact
and portable as possible, this disables call stacks on all
operating systems except Linux and Android.

Bug: 224644083
Test: m
Change-Id: I0d77c49022e852c2b8607f555174c4f9d54ed3df
2022-03-16 01:35:19 +00:00
Bart Van Assche
32a9b1c320 Use uid_t for user IDs and gid_t for group IDs
This patch makes the intent of the code more clear without changing any
functionality since uid_t and gid_t are both aliases for uint32_t on
Android systems. See also
https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/types.h

Bug: 213617178
Test: Compile-tested only.
Change-Id: Ib5012456a7357e79368f00e71e9a280fd6f96063
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-15 23:02:20 +00:00
Bart Van Assche
990194fe2f Fix cgroup directory permissions
Cgroup attributes are set from three different contexts:
(1) From the process that creates the cgroup directories. These
    processes are /system/bin/init, zygote and zygote64.
(2) From the created process. Some but not all created processes have
    user ID and/or group ID 'system'.
(3) The system_server process modifies certain cgroup attributes from
    other processes.

Allow all processes from the system group, including system_server, to
modify cgroup attributes from other processes. As one can see in
init.rc, that file includes commands for granting the system group
write permission for blkcg attributes. See also
https://cs.android.com/android/platform/superproject/+/master:system/core/rootdir/init.rc

Bug: 213617178
Test: Verified in the Cuttlefish emulator that this patch makes the
Test: io.bfq.weight write errors disappear from logcat.
Change-Id: Idbfb49c25afec12b21daea7a17db5322bc981ff0
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-15 23:02:20 +00:00
Bart Van Assche
f508ede763 Simplify cgroups.json
cgroups.json causes the following changes to be applied twice to
/sys/fs/cgroup: change user ID to system, change group ID to system and
change mode to 0755. Apply these settings once instead of twice.

Bug: 213617178
Test: Ran ls -ld /sys/fs/cgroup in Cuttlefish.
Change-Id: Ieb953c186c027b989599cbbaa70a9c9324678cdf
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-15 23:02:19 +00:00
Christopher Ferris
95c777072f Merge "Update for accurate unreadable elf files." 2022-03-15 22:20:08 +00:00
Treehugger Robot
00e57e0841 Merge "trusty: Update TIPC UAPI header" 2022-03-15 18:32:38 +00:00
Akilesh Kailash
d3f267200e Merge "Revert "init: Add diagnostics for snapuserd hangs"" 2022-03-15 17:49:35 +00:00
Christopher Ferris
c95047dd20 Update for accurate unreadable elf files.
The functionality moved from the Unwinder object to the MapInfo
object and means that the individual unreadable files can be
displayed now.

Included adding the unreadable elfs per thread in the protobuf.

Updated the unwinder test.

Test: All unit tests pass.
Change-Id: I7140bde16938736da005f926e10bbdb3dbc0f6f5
2022-03-15 09:50:48 -07:00
Jaegeuk Kim
120f6b260c Init: add dev.mnt.blk.bootdevice to access device sysfs
This patch adds a new property, 'dev.mnt.root.<mount_point>', which provides,
for example of /data,

1. dm-N
  dev.mnt.dev.data = dm-N
  dev.mnt.blk.data = sdaN or mmcblk0pN
  dev.mnt.rootdisk.data = sda or mmcblk0

2. sdaN or mmcblk0pN
  dev.mnt.dev.data = sdaN or mmcblk0pN
  dev.mnt.blk.data = sdaN or mmcblk0pN
  dev.mnt.rootdisk.data = sda or mmcblk0

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I0a58a62d416f966f26b5de04112c2f9a7eceb22c
2022-03-14 16:59:52 -07:00
Juhyung Park
491004bbfb init: mount_handler: detect main block device more reliably
Current code is not portable beyond SCSI devices (e.g., UFS).
For example, eMMC and NVMe devices fail due to their extra postfix.

Change its logic to rewind each character until "queue" directory appears.

Test: Confirm md0p1, sda20, nvme0n1p3, mmcblk0p3 are all handled well.
Change-Id: I585ccf2d4a72f6ef8ecb203acdd72a1e32d3e749
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2022-03-14 16:59:52 -07:00
Tri Vo
83b58f93a2 trusty: Update TIPC UAPI header
TRUSTY_SEND_SECURE operation was added to Trusty Linux driver by
aosp/1930989.

Bug: 224563842
Test: m libtrusty
Change-Id: Ic922ec177a8d35dba351415ab429216a1931a64d
2022-03-14 16:30:12 -07:00
Akilesh Kailash
6e43216340 Revert "init: Add diagnostics for snapuserd hangs"
This reverts commit 471643a909.

Reason for revert: Given https://r.android.com/1960063, it is safe to revert this diagnostics patch

Change-Id: Ib3600c1982ee10a0204ac0fdbc3e160c2833ed07
2022-03-14 20:49:53 +00:00
Steven Moreland
83785021f7 Merge "libutils: ~RefBase more logs" 2022-03-14 16:59:30 +00:00
Steven Moreland
f164de8935 libutils: ~RefBase more logs
This code was a bit confusing because Android runs with an old debug
mode on. The flag around this is removed to make it more clear what
is going on, and the log is promoted D -> W.

Bug: N/A
Test: boot, check logs
Change-Id: I4645b1a7b8e252336a6f9482ce6b57e1b907619d
2022-03-11 02:46:31 +00:00
Shikha Malhotra
927d9d1c68 Merge "Adding project_id ranges for internal app and cache folders." 2022-03-10 21:58:40 +00:00
David Anderson
b738b7d23a Merge "fs_mgr: Add force_super_partition bootconfig option to avoid slot suffixing alternate super partition names." 2022-03-10 04:42:20 +00:00
Treehugger Robot
5520cb3309 Merge "Adding libutils owner smoreland@ as fuzz targets owner for alerts" 2022-03-08 21:33:05 +00:00
Anis Assi
e75dd9a1c1 Adding libutils owner smoreland@ as fuzz targets owner for alerts
Bug: 221891733
Change-Id: I85ff5c754fb2eb85331e84b3dbacd24844d54efc
2022-03-08 19:48:21 +00:00
Akilesh Kailash
ca0c5c5b10 Merge "If there an error, cqe field is not allocated by io_uring_wait_cqe(); return the error immediately." 2022-03-08 08:07:14 +00:00
David Anderson
5c007a51dd Merge "init: Add diagnostics for signalfd epoll failures." 2022-03-08 08:02:39 +00:00