Commit graph

68974 commits

Author SHA1 Message Date
David Anderson
4c21150d8d Merge "KillZramBackingDevice: Return immediately if backing_dev is none." am: 7e2d32bc06
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710548

Change-Id: I6afe6758f30d4ee63e85cf56fe2a6f3962b2f090
2021-05-26 04:01:49 +00:00
David Anderson
7e2d32bc06 Merge "KillZramBackingDevice: Return immediately if backing_dev is none." 2021-05-26 03:29:05 +00:00
Akilesh Kailash
0ceae174e3 Merge "snapuserd: Add test case" am: 18a307beb4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1715756

Change-Id: I92e9097f2affd77e8faff0aedecde9bac6c7c215
2021-05-26 02:55:52 +00:00
Akilesh Kailash
18a307beb4 Merge "snapuserd: Add test case" 2021-05-26 02:29:53 +00:00
Kelvin Zhang
7acc052448 Merge "Add helptext for snapshotctl map" am: 22d2c263a8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1717814

Change-Id: I22729f4a2799fba96c03b0f8575459a0c5eae9f7
2021-05-25 21:19:44 +00:00
Kelvin Zhang
22d2c263a8 Merge "Add helptext for snapshotctl map" 2021-05-25 21:00:44 +00:00
Kelvin Zhang
c1e78883eb Add helptext for snapshotctl map
Test: no need
Change-Id: I709d02ccd478d6bed34808dc20cbba9ed89097c1
2021-05-25 14:43:52 -04:00
Yo Chiang
a4b8fb8300 Merge changes I5058cbe8,Ia0b3f1c9 am: f7584a223c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1713745

Change-Id: Ic0c1a9e4f71395cd0d8e94aac8470cd437d159c9
2021-05-25 05:19:53 +00:00
Yo Chiang
f7584a223c Merge changes I5058cbe8,Ia0b3f1c9
* changes:
  adb-remount-test: Strengthen skip_administrative_mounts
  fs_mgr_overlayfs_mount_fstab_entry(): Rename source device name
2021-05-25 05:01:17 +00:00
Yi-Yo Chiang
f931ad9446 adb-remount-test: Strengthen skip_administrative_mounts
Refactor skip_administrative_mounts so that it filters by device name,
mount point and filesystem type. (Was filtering by device name and mount
point.)

We need this because pseudo filesystems such as tmpfs and overlayfs can
have free-formed device name:

  blah /mnt/mnt_point overlay ro,lowerdir=...

However the filesystem type (third field of /proc/mounts) must be
reflecting the actual filesystem, so to robustly filter out
administrative filesystems, we have to check the filesystem type field.

Bug: 188862155
Test: adb-remount-test.sh
Change-Id: I5058cbe8a36920f25b73a5d5833e9fc5a096e90f
2021-05-23 16:42:11 +08:00
Akilesh Kailash
b3b264c15f snapuserd: Add test case
Add unit test to test reading dm-user block device
without user-space daemon. IO's should fail
with IO error.

Bug: 188362117
Test: cow_snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ida4efb4373904f6bb92f9904af9fe8443724bd2c
2021-05-22 17:57:48 +00:00
Yi-Yo Chiang
7b90e6936c fs_mgr_overlayfs_mount_fstab_entry(): Rename source device name
adb-remount-test.sh would fail if a overlayfs named "overlay" is mounted
in first_stage_init via fs_mgr_overlayfs_mount_fstab_entry():

  [  FAILED  ] overlay takeover unexpected at this phase

Prepend the source device name with "overlay-", so that the overlayfs
mounted by fs_mgr_overlayfs_mount_fstab_entry() mustn't be named
"overlay".

Bug: 188862155
Test: adb-remount-test.sh
Change-Id: Ia0b3f1c92ed5650c3e584fba23758344a4733657
2021-05-22 22:33:13 +08:00
Treehugger Robot
f4d3b9e85f Merge "Fix implicit cast from ssize_t to size_t in KeyedVector.h" am: a14beb2dbc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1715473

Change-Id: I445ccfbce2f429408c4bf92f9052023057b8f764
2021-05-22 04:40:42 +00:00
Treehugger Robot
a14beb2dbc Merge "Fix implicit cast from ssize_t to size_t in KeyedVector.h" 2021-05-22 03:46:09 +00:00
Vishnu Nair
0878f71613 Fix implicit cast from ssize_t to size_t in KeyedVector.h
Fixes a compiler warning for implicit conversion changes from signed
to unsigned which surfaced when refactoring native input libraries.
Add an explicit cast to avoid adding -Wno-sign-conversion compile
flags.

Test: b libsurfaceflinger_unittest
Change-Id: I8866aef7f09ca5173604abe18c586b68bbf12ed6
2021-05-21 16:45:46 +00:00
Elliott Hughes
1db66002c1 Merge "Increase coverage of Timers to 100%." am: 2dc28bcfc4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710936

Change-Id: I2c722abc2249fc2b4b52486d7d6dd69426394657
2021-05-20 19:59:54 +00:00
Elliott Hughes
2dc28bcfc4 Merge "Increase coverage of Timers to 100%." 2021-05-20 19:37:59 +00:00
Yo Chiang
349cb5d4c7 Merge "fs_mgr_overlayfs: Polish fs_mgr_overlayfs_mount_fstab_entry()" am: 71db89b1da
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710550

Change-Id: I772ccf13620870dc6fa6fcbc952d91594944e7b5
2021-05-20 06:52:33 +00:00
Yo Chiang
99893a20f7 Merge "first_stage_mount: Remove "overlay" hack from InitRequiredDevices()" am: b440fc9c06
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1711245

Change-Id: I56f2959e358de2c1aec123a1560734487e0e955e
2021-05-20 06:52:11 +00:00
Yo Chiang
71db89b1da Merge "fs_mgr_overlayfs: Polish fs_mgr_overlayfs_mount_fstab_entry()" 2021-05-20 06:40:36 +00:00
Yi-Yo Chiang
dcf1c1f462 fs_mgr_overlayfs: Polish fs_mgr_overlayfs_mount_fstab_entry()
* Add logs.
* Append "override_creds=off" overlayfs mount flag only if
  fs_mgr_overlayfs_valid() returns kOverrideCredsRequired.
  Pre-4.6 kernels or kernels without the override_creds patch don't
  need or don't recognize the override_creds mount flag.
  (Background: I832c8ca3fce0269bdef4ce988541adb7ba9662ed)
* mkdir(mount_point) before mount() to ensure the mount point exists.
  This could happen if the mount point is in a tmpfs, such as /mnt.

Bug: 186342252
Test: Boot to normal with overlayfs mount entries in first stage fstab
Change-Id: I1a05696346610d7fd61de6d25c379520fd58ca9b
2021-05-20 06:40:27 +00:00
Yo Chiang
b440fc9c06 Merge "first_stage_mount: Remove "overlay" hack from InitRequiredDevices()" 2021-05-20 06:40:07 +00:00
Yi-Yo Chiang
87290f8e9b first_stage_mount: Remove "overlay" hack from InitRequiredDevices()
GetDmVerityDevices() should filter out overlayfs fstab entries in the
first place, so InitRequiredDevices() don't need to filter out overlayfs
pseudo device names.

Bug: 186342252
Test: Boot to normal with overlayfs mount entries in first stage fstab
Change-Id: I0ac8b7ac0f21daa0c191580d9349adf217854864
2021-05-20 06:39:57 +00:00
Yo Chiang
acd946eae9 Merge "fs_mgr_vendor_overlay: Mount vendor overlay with noatime" am: 4087bc555b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710549

Change-Id: I8610009bd08f67f8618666aca5fc037cef49fe14
2021-05-19 10:15:00 +00:00
Yo Chiang
4087bc555b Merge "fs_mgr_vendor_overlay: Mount vendor overlay with noatime" 2021-05-19 09:57:19 +00:00
Akilesh Kailash
f987fb0c2a Merge "snapuserd: Send header-response once per entire IO request" am: 78092feb9b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710668

Change-Id: I6906183f831cb719655b9de0173e43fc7cd35f51
2021-05-19 01:07:25 +00:00
Akilesh Kailash
78092feb9b Merge "snapuserd: Send header-response once per entire IO request" 2021-05-19 01:00:23 +00:00
Treehugger Robot
19dce52d10 Merge "tombstoned: fix file creation for ANRs." am: 83361ae6fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710946

Change-Id: Iba6dee47a53e107364950f0726c3c1674a60df5f
2021-05-19 00:57:21 +00:00
Treehugger Robot
83361ae6fc Merge "tombstoned: fix file creation for ANRs." 2021-05-19 00:33:54 +00:00
Akilesh Kailash
8d442f477e snapuserd: Send header-response once per entire IO request
Header response from daemon is sent once at the
beginning of the payload. This is a corner case
when the IO request can get broken into multiple chunks
if the IO is un-aligned.

Additionally, add error checks in the IO path
to validate sector information when the read
requests are merged.

Bug: 188361387
Test: Simulate an IO request to forcefully break the IO
response into multiple chunks and verify the correctness.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I1f4fa7a79c60493f4bbed3ad49e257098b930beb
2021-05-18 23:36:28 +00:00
Treehugger Robot
7db6b64f2d Merge "ueventd: Run external handler as non-root group" am: 5123a3eafc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1707926

Change-Id: Ia53c37cdfda92064fcf127793f77a727a0a9a59e
2021-05-18 23:20:30 +00:00
Josh Gao
931274862f tombstoned: fix file creation for ANRs.
Bug: http://b/188315622
Test: manual
Change-Id: I2948b929beb3093b59c8d37b706c857e7422a3cc
2021-05-18 16:20:00 -07:00
Treehugger Robot
5123a3eafc Merge "ueventd: Run external handler as non-root group" 2021-05-18 22:01:59 +00:00
Elliott Hughes
4139da606d Increase coverage of Timers to 100%.
Test: treehugger
Change-Id: I3dda9a1a60c88886e5ef42de72bf341ba6cd0361
2021-05-18 13:10:50 -07:00
Yi-Yo Chiang
7cbed5a9ce fs_mgr_vendor_overlay: Mount vendor overlay with noatime
Change relatime to noatime as our filesystems and partitions are all
read-only, so relatime doesn't really work in the first place.

Test: atest -v fs_mgr_vendor_overlay_test
Test: Presubmit
Change-Id: I869bba24c2d6d8a986bf0eec0f487ba7b935ab4b
2021-05-18 17:26:57 +08:00
shisiyuan
423c4f1994 KillZramBackingDevice: Return immediately if backing_dev is none.
It's possible that CONFIG_ZRAM_WRITEBACK is y,
but userspace doesn't set the /sys/block/zram0/backing_dev,
so its value is 'none'.
It's the same with "CONFIG_ZRAM_WRITEBACK is not set".

Change-Id: I2df89ceee68e4685deef5113bada21be96779e9b
Signed-off-by: shisiyuan <shisiyuan@xiaomi.com>
2021-05-18 14:47:47 +08:00
Suchang Woo
10c6374e81 ueventd: Run external handler as non-root group
The external firmware handler always has root group privileges because
it is forked/executed without setgid() by ueventd which has root
privileges. This patch calls setgid() with group ID specified in
ueventd.rc before execv().

Test: atest CtsInitTestCases
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: Id1430e783b0e409d55ac80fe213e81ba099729e2
2021-05-17 10:37:19 +09:00
Treehugger Robot
94e0efea80 Merge "Allow others to read the profile ref dir" am: a6c57d5752
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1708274

Change-Id: I1c58ea00da7ae310585847276b930fe030fb2f47
2021-05-14 22:51:00 +00:00
Treehugger Robot
a6c57d5752 Merge "Allow others to read the profile ref dir" 2021-05-14 22:32:59 +00:00
Treehugger Robot
f464c76cfe Merge "libprocessgroup: remove failure log for aggregate profiles" am: 08a7cf2baa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1708280

Change-Id: I955f79dbc481f1ba75141d5664f5a4d3ad258550
2021-05-14 22:23:25 +00:00
Treehugger Robot
08a7cf2baa Merge "libprocessgroup: remove failure log for aggregate profiles" 2021-05-14 22:06:37 +00:00
Wei Wang
8722e4d219 libprocessgroup: remove failure log for aggregate profiles
The inner profile should print error message if needed.

Bug: 178070122
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I2d9d54e21fb064678feccdbae453a398806d51d6
2021-05-14 12:44:45 -07:00
Calin Juravle
11197dd8a8 Allow others to read the profile ref dir
ART wants to optimize the time when the profile information
is saved for an app. To do so, it needs access to both, the current
profile, and the reference profile. This will allow ART to access
the ref profiles, which previously was not needed.

Test: m & flash
Bug: 185979271
Change-Id: Ie07bce81d2fba9c0b0ae4f322418e960c024e15d
2021-05-14 18:34:02 +00:00
Peter Collingbourne
4bd1c5c8ac Merge "Run MTE tests on zero-sized allocations." am: 93406da189
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1706267

Change-Id: Iad5541d6126cf79bdbc257172078017b8684d935
2021-05-14 04:37:57 +00:00
Peter Collingbourne
93406da189 Merge "Run MTE tests on zero-sized allocations." 2021-05-14 03:58:13 +00:00
Treehugger Robot
a41e8af148 Merge "Add missing //apex_available:platform to debuggerd" am: a9d1799d3f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705255

Change-Id: I4784edb91d9d27e943562e505dfb2a462cb8c284
2021-05-14 02:21:08 +00:00
Treehugger Robot
a9d1799d3f Merge "Add missing //apex_available:platform to debuggerd" 2021-05-14 01:34:03 +00:00
David Anderson
260c7f6e3d Merge "libsnapshot: Move ImageManager creation to DeviceInfo." am: 9ac43f5421
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1705662

Change-Id: I29ed378aa7c22664156572452184172f6044a368
2021-05-14 00:29:31 +00:00
David Anderson
9ac43f5421 Merge "libsnapshot: Move ImageManager creation to DeviceInfo." 2021-05-14 00:12:41 +00:00
Peter Collingbourne
aa544796ae Run MTE tests on zero-sized allocations.
Bug: 187879470
Change-Id: I9547f3032af9d1a921f8597a53389d25af33b369
2021-05-13 14:08:41 -07:00