Commit graph

90576 commits

Author SHA1 Message Date
Isaac Manjarres
445d2e0025 Merge "ashmem: Ensure all memfds have non-executable permissions by default" into main 2024-12-03 22:53:26 +00:00
Isaac J. Manjarres
ee7a713757 ashmem: Ensure all memfds have non-executable permissions by default
Currently, memfds are created with executable permissions, meaning that
one can load a binary into a memfd buffer and use fexecve() to run said
binary. This is not desirable for security reasons, and also does not
match with the behavior that the ashmem driver currently supports.

When the ashmem driver is in use, /dev/ashmem* does not have executable
permissions, so fexecve() cannot be used on those buffers. Linux kernels
6.3+ offer MFD_NOEXEC_SEAL as part of the memfd interface, which allows
one to create memfds with non-executable permissions. Furthermore, the
executable permissions cannot be changed on these memfds.

This matches the expected behavior that ashmem provided, so allow memfd
usage only if MFD_NOEXEC_SEAL is supported, and create memfds with
non-executable permissions by default.

Bug: 111903542
Change-Id: Ibb2c2be3c118ead44fc12bcd2b63dcf6f83c9b03
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
2024-12-03 10:13:28 -08:00
Treehugger Robot
92487860cf Merge "fs_mgr: Support nosymfollow mount option" into main 2024-12-03 17:11:18 +00:00
Treehugger Robot
326534aace Merge "libsnapshot: Cleanup temp metadata during rollback" into main 2024-12-02 22:31:01 +00:00
Treehugger Robot
85050a06e1 Merge changes I0586f761,I9fc71f9c,I0ad1f449 into main
* changes:
  libprocessgroup: Remove ramdisk_available from libcgrouprc
  libprocessgroup: Remove vendor_ramdisk_available from libcgrouprc
  libprocessgroup: Remove recovery_available from libcgrouprc
2024-12-02 19:03:46 +00:00
Akilesh Kailash
00a32314ac libsnapshot: Cleanup temp metadata during rollback
Bug: 380471512
Test: Test rollback and check metadata is cleared
Change-Id: I4ebd5d9842409fa32c58bb482ffc0066817a5a05
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-12-02 10:58:46 -08:00
Eric Biggers
6dc0ed1758 Merge "Fix the dm-verity Merkle tree caches to not expire so quickly" into main 2024-12-02 18:11:34 +00:00
T.J. Mercier
8972ce18d2 libprocessgroup: Remove ramdisk_available from libcgrouprc
...which no longer appears to be required.

Bug: 349105928
Change-Id: I0586f76147d9519ef6a520a10164e1b0f5e5c9b8
2024-12-02 17:41:12 +00:00
T.J. Mercier
62f8723f67 libprocessgroup: Remove vendor_ramdisk_available from libcgrouprc
...which no longer appears to be required.

Bug: 349105928
Change-Id: I9fc71f9cf3238dcc935da63ce1a3b0b69d9cccc1
2024-12-02 17:41:12 +00:00
T.J. Mercier
f26b13aeb1 libprocessgroup: Remove recovery_available from libcgrouprc
...which no longer appears to be required.

Bug: 349105928
Change-Id: I0ad1f44912fdaf98c05b60402c0166c535155775
2024-12-02 17:41:12 +00:00
Treehugger Robot
e7a16c3aa0 Merge "Update comments to point to the new location of event.logtags." into main 2024-12-02 14:48:01 +00:00
Dennis Shen
db80953238 Merge "Deprecate cc_binary aconfigd and the controlling flag" into main 2024-11-27 13:33:23 +00:00
David Drysdale
bc6efddf79 Merge "Move Trusty C++ KeyMint to v4" into main 2024-11-27 07:18:20 +00:00
Treehugger Robot
17cd008055 Merge "libutils OWNERS for shayba@" into main 2024-11-27 00:28:02 +00:00
Steven Moreland
27dd6f8e62 libutils OWNERS for shayba@
For Looper work, but not scoped down to this
unless you want it to be.

Bug: N/A
Test: N/A
Change-Id: I14bf8d21af357ef7b9151cca49b0cf40dde0e3ca
2024-11-26 23:44:17 +00:00
Dennis Shen
52d2446b4e Deprecate cc_binary aconfigd and the controlling flag
cc_binary aconfigd is replaced with rust_binary aconfigd-system. The
replacement is flag guarded and is already in TF full for more than a
week. Thus delete the flag and deprecate old cc_binary aconfigd.

Test: m
Change-Id: Ib128adc2ef8178e02222f77e6b89bcc7ac83c1da
2024-11-26 15:26:52 +00:00
Treehugger Robot
7c066103a3 Merge "libprefetch: rename property name" into main 2024-11-26 08:38:29 +00:00
Akilesh Kailash
3df083a498 libprefetch: rename property name
Bug: 362507272
Test: Build
Change-Id: I39627fdcbbe5458e6fbc9dfaa1aa620844d56f8b
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-25 21:46:56 -08:00
Eric Lin
9731ea7b67 Update comments to point to the new location of event.logtags.
event.logtags was moved from system/core/logcat to system/logging/logcat in Android 12 by aosp/1454058.

Change-Id: Ia3cedee549145eddb0484ec589a9599a156bea14
BUG: 168791309
Flag: DOCS_ONLY
Test: Local build
2024-11-26 04:24:56 +00:00
Eric Biggers
cadad290a7 Fix the dm-verity Merkle tree caches to not expire so quickly
Bug: 335233956
Test: cat /sys/module/dm_bufio/parameters/max_age_seconds
Change-Id: I20e4df7dd3eb2ac1f462510e900568e946195faf
2024-11-26 03:24:44 +00:00
Automerger Merge Worker
f7b584086c Merge "Merge "snapuserd: Use GTEST_SKIP in snapuserd_test." into android15-tests-dev am: a8537415c1" into main 2024-11-25 22:25:24 +00:00
Treehugger Robot
c1f5c76fa9 Merge "snapuserd: Use GTEST_SKIP in snapuserd_test." into android15-tests-dev am: a8537415c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3365128

Change-Id: I12b0472a65d5c11ece024801392cc265cf0c5049
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-25 22:25:19 +00:00
Treehugger Robot
a8537415c1 Merge "snapuserd: Use GTEST_SKIP in snapuserd_test." into android15-tests-dev 2024-11-25 22:05:44 +00:00
Dennis Shen
c532409c5c Merge "move aconfigd platform init service from init.rc into aconfigd.rc" into main 2024-11-25 17:27:03 +00:00
David Drysdale
487584da23 Move Trusty C++ KeyMint to v4
- Declare v4 HAL.
- Declare version 400 in Package Manager (when unfrozen).
- Link to current (V4 when unfrozen) versions of support libraries.
- Add `setAdditionalAttestationInfo()` method to HAL service.
- Add `SetAdditionalAttestationInfo()` method to implementation, using
  the common message types.
- Add Trusty-specific message code for the
  `SET_ADDITIONAL_ATTESTATION_INFO` message exchange.

Test: VtsAidlKeyMintTargetTest (new test fails until TA updated too)
Bug: 369375199
Change-Id: I4699aea3ab8a0723a5c2bc1493f7bbb69cdfd6df
2024-11-25 15:52:31 +00:00
Treehugger Robot
1de1f1d83b Merge "Remove /data/apex/hashtree directory" into main 2024-11-25 10:29:16 +00:00
Jooyung Han
fef2dff80a Remove /data/apex/hashtree directory
This directory is no longer used.

Bug: 184914612
Change-Id: Iaa094e2df39c363fe0a5ffd4b27b5c3075bb4f7f
Test: (device doesn't have the directory)
2024-11-25 08:32:05 +00:00
Treehugger Robot
3ffdc6206a Merge "libprefetch: Start prefetch service based on build" into main 2024-11-23 06:40:20 +00:00
Akilesh Kailash
ef3a2c05fe libprefetch: Start prefetch service based on build
1: Check the presence of the file 'prefetch_ready'. If it doesn't
 exist then the device is booting for the first time after wipe.
 Thus, we would just create the file and exit as we do not want
 to initiate the record after data wipe primiarly because boot
 after data wipe is long and the I/O pattern during first boot may not actually match
 with subsequent boot.

2: If the file 'prefetch_ready' is present:

   a: Compare the build-finger-print of the device with the one record format
   is associated with by reading the file 'build_finger_print'. If they match,
   start the prefetch_replay.

   b: If they don't match, then the device was updated through OTA. Hence, start
   a fresh record and delete the build-finger-print file. This should also cover
   the case of device rollback.

   c: If the build-finger-print file doesn't exist, then just restart the record
   from scratch.

Bug: 362507272
Test: Prefetch record/replay
Change-Id: I90b861ba9381ddba6ab7dedb9930a735e55b0e5d
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-22 20:49:13 -08:00
Treehugger Robot
e3db20857f Merge "Remove |ro.hardware.| prefix in KM VM sys property" into main 2024-11-23 00:14:01 +00:00
Treehugger Robot
6ec942a0cb Merge "Remove no longer necessary MS_LAZYTIME definitions." into main 2024-11-22 22:17:22 +00:00
Wei Li
e400d09c83 Merge "Remove system/core/METADATA" into main 2024-11-22 16:23:30 +00:00
Wei Li
f00efa0242 Remove system/core/METADATA
This directory doesn't contain third-party code and it doesn't need a METADATA file.

Bug: 380376695
Test: CIs
Change-Id: Ie197786da09304476fb002b178c2a77d424f5a53
2024-11-22 07:11:11 +00:00
Akilesh Kailash
e10fc8369a Merge "snapuserd: Lock the buffer during snapshot-merge" into main 2024-11-22 04:55:53 +00:00
Shin Kawamura
640e32478f Merge "Fix permission of zram writeback and idle file" into main 2024-11-22 03:58:13 +00:00
T.J. Mercier
b053403046 Merge "Reapply "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"" into main 2024-11-21 22:14:07 +00:00
Elliott Hughes
0701fed364 Remove no longer necessary MS_LAZYTIME definitions.
Change-Id: Idf2d947509731715f895518b541d55d55187c43d
2024-11-21 18:46:28 +00:00
Abdelrahman Daim
589afaa880 fs_mgr: Support nosymfollow mount option
Summary: The nosymfollow mount option was added to Linux 5.10, and the bionic
headers support it. Allow mounting with the option set. Updated relevant
CTS test too.

Test: Successful build on master

Change-Id: I0b280287e07ef8c485762b820dbbb26300144982
Signed-off-by: Abdelrahman Daim <adaim@meta.com>
2024-11-21 17:43:20 +00:00
Akilesh Kailash
0582e461bc Merge "Add prefetch directory in /metadata" into main 2024-11-21 17:21:06 +00:00
Akilesh Kailash
35ab96a423 Add prefetch directory in /metadata
Bug: 362507272
Test: Verify directory is created in /metadata
Change-Id: Ie1c2312f405d4b41e06a248e4d2b93cd8fc62a93
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-21 05:59:54 -08:00
Shintaro Kawamura
b912e3e548 Fix permission of zram writeback and idle file
The default permission of "/sys/block/zram0/idle" and
"/sys/block/zram0/writeback" are "0200".

Adding read permission to the files does not make sense because reading
those files fail as EIO error.

We should keep permission as minimum as possible.

Bug: 117682284
Bug: 375432468
Test: ls -la /sys/block/zram0

Change-Id: I11ed5d9eee257002f4698edcd81de39d2c317ea1
2024-11-21 16:28:34 +09:00
Treehugger Robot
1c1bdd91b3 Merge "Use genfs labels version library" into main 2024-11-21 02:45:16 +00:00
Akilesh Kailash
7bb484d405 snapuserd: Lock the buffer during snapshot-merge
Bug: 377819507
Test: Incremental OTA on Pixel
Change-Id: I08fa7129282cc005a565987856166088c092f40a
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-20 13:08:33 -08:00
Maciej Żenczykowski
3e7c17a8e7 Reapply "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"
This reverts commit fdaaef9523.

Reason for revert: should be safe to reapply post
  https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/3369257

Test: TreeHugger
Bug: 379796721
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1a24791713484461345312a34777c2266e443cee
2024-11-20 19:37:38 +00:00
Gabriel Biren
b6d84eba34 Merge "Create the mainline supplicant directory during initialization." into main 2024-11-20 17:15:32 +00:00
Inseob Kim
e2efde3746 Use genfs labels version library
Instead of hard-coding the text path everywhere, this uses a library to
get the genfs labels version.

As genfs labels affect SELinux, this also adds logs to help debug
issues.

Bug: 378805380
Test: boot and check log
Change-Id: I843c97cbeb0c211c67e0172458a4f0d236cf1f06
2024-11-20 18:03:41 +09:00
Alice Wang
d5c8b0bddf Remove |ro.hardware.| prefix in KM VM sys property
As per comment in aosp/3342288

Bug: 368502791
Test: launch_cvd --secure_hals=guest_keymint_trusty_insecure
Test: atest VtsAidlSharedSecretTargetTest
Change-Id: I71b6266fbd480c0ebe2a7946adadd88f38afb3e7
2024-11-20 08:32:40 +00:00
David Drysdale
91b97d7362 Merge "Declare support for v4 of KeyMint HAL" into main 2024-11-20 06:27:24 +00:00
Akilesh Kailash
e367550792 Merge "libprefetch: library to prefetch data using tracing." into main 2024-11-20 05:02:25 +00:00
Vikram Auradkar
ae8313f8e6 libprefetch: library to prefetch data using tracing.
1: This supports "mem" tracing only.
2: Replay option is modified to use "pread" instead
of readahead.

A simple utility binary "prefetch" is built which links to the library.

The binary allows record, replay and verifying the generated
metadata.

Bug: 362507272
Test: cargo test passes all unit tests.

Verify record, replay and dump options:

./prefetch record --duration 10 --path /data/test/trace-test
./prefetch replay --path /data/test/trace-test
./prefetch dump /data/test/trace-test --format csv

Change-Id: I1661e49183c6120d2878510e609571fe6d608bb5
Signed-off-by: Vikram Auradkar <auradkar@google.com>
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-19 17:50:49 -08:00