Commit graph

89118 commits

Author SHA1 Message Date
Treehugger Robot
441f39230e Merge "toolbox/modprobe: Load modules from /lib/modules based on page size" into main 2024-06-12 14:56:06 +00:00
Juan Yescas
64776335c0 toolbox/modprobe: Load modules from /lib/modules based on page size
Load modules from /lib/modules for 4kb page size kernels when
the -d option is not present. Do not do this for 16kb page size kernels
due it will load the 4kb modules when PRODUCT_16K_DEVELOPER_OPTION
is true.

Depending on the value of PRODUCT_16K_DEVELOPER_OPTION, the
kernel modules can be located in several directories:

- true: There are 2 directories that contain the 4kb and 16kb
        modules.
        - 4kb modules are in /lib/modules
        - 16kb modules are in /lib/modules/<uname -r>_16k
- false: There is only one directory that contains only one type
        of the kernel modules, either 4kb or 16kb.
        - /lib/modules

This is a temporary fix for the 16kb developer option. This
b/346659501 will track the proper fix.

Test: Boot target husky-trunk_staging-userdebug with developer
      option.
Test: Boot target husky_pgagnostic-next-userdebug without developer
      option.
Bug: 345609905
Bug: 343971855
Change-Id: I9bab33d9f06743bd10ee804b20db8f39467fcc52
2024-06-11 18:41:49 -07:00
Bart Van Assche
0b2f24ceb1 Merge "Revert "Make foreground and background I/O priority different"" into main 2024-06-11 23:14:34 +00:00
Spandan Das
8bc0ee30bf Merge "Add libz to static libs of libutils_test" into main 2024-06-11 23:08:56 +00:00
Treehugger Robot
4c5b2303b9 Merge changes I68fa51f8,Ia16aa041,Iba57f5cf into main
* changes:
  libprocessgroup: Remove unused includes; add missing ones
  libprocessgroup: Don't delegate to default constructor
  libprocessgroup: Use default member initializers
2024-06-11 22:45:24 +00:00
Sijie Chen
c438dab75e Merge "[CrashReporting] Correct guest arch init" into main 2024-06-11 20:27:36 +00:00
Bart Van Assche
4cb11951e2 Revert "Make foreground and background I/O priority different"
It has been reported that CL "Make foreground and background I/O
priority different" causes Android devices equipped with eMMC storage
to reboot if there is sufficient I/O activity. Hence revert commit
7f3fe0aaf2.

Bug: 186902601
Bug: 342034992
Change-Id: I4fa9c782eb0e801b410cb358e20fe41acebe1094
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-06-11 20:17:44 +00:00
T.J. Mercier
54bfde03e1 libprocessgroup: Remove unused includes; add missing ones
No functional changes.

Bug: 346584259
Test: m
Change-Id: I68fa51f86b6baaa34fb2cdfdc16a4d1ff61e1e5f
2024-06-11 18:24:34 +00:00
T.J. Mercier
10826481ba libprocessgroup: Don't delegate to default constructor
Manually calling a defaulted default constructor from a another
constructor is superfluous, and can increase code size if the default
constructor is not otherwise used. There's nothing to delegate, so
remove the call.

Bug: 346584259
Test: m
Change-Id: Ia16aa041fdee7434587cf90645d7f95cba4e0d10
2024-06-11 18:24:23 +00:00
T.J. Mercier
df67107ac4 libprocessgroup: Use default member initializers
... instead of direct initialization in the default constructor
implementation. This allows us to just explicitly default the
constructor and provide no implementation.

Initialize class variables in the header and remove no-op constructor
to simplify code.

Bug: 346584259
Test: m
Change-Id: Iba57f5cfbf8e4d5d18ce178d39f8bcd2d76c8aaa
2024-06-11 18:23:58 +00:00
Sijie Chen
06603fe143 [CrashReporting] Correct guest arch init
Init guest arch to NONE, otherwise Arm32 will be used.

Bug: 288392666
Test: NA
Change-Id: Ib92b0351401b700a18d03e21a68569c2811d163c
2024-06-11 17:51:48 +00:00
Kiyoung Kim
fb30388ac1 Merge "Make public.libraries.android.txt available to filesystem" into main 2024-06-10 04:02:16 +00:00
Treehugger Robot
c623193110 Merge "Add reserved to CrashDetail proto" into main 2024-06-07 20:53:06 +00:00
Greg Kaiser
94ba56b68d Merge "Update zygote32 rc file to match others" into main 2024-06-06 20:57:51 +00:00
Greg Kaiser
f2064c3a0d Update zygote32 rc file to match others
In I3aad4b4b1d2f54db9e7ba86db8a655d8552bad0a we set MaxPerformance
for zygote64_32, and in I7fcceeb22b722c2164b9acf0b517a32ce34731fd
we synced up zygote64 to match this.

However, this change never made it into the zygote32 rc file,
which we fix here.

Bug: 324014808
Test: Basic testing on 32-bit device
Change-Id: I6f0c4490330d05551952fd5d844e02a6b638ca68
2024-06-06 19:11:27 +00:00
Will Deacon
0cb931b1ce Merge changes from topic "modprobe-pgsize-fix" into main
* changes:
  toolbox/modprobe: Filter module directories based on kernel page size
  Revert "Load modules from _16K dir when running on 16K kernel"
2024-06-06 15:09:26 +00:00
Will Deacon
c991c3dbed toolbox/modprobe: Filter module directories based on kernel page size
When modules for multiple kernels with the same major/minor versions
are installed on a device, modprobe will search the module directories
based on whatever order scandir() returned them. In this case, it is
possible that we will try to load modules with the wrong page size for
the running kernel, which can lead to obscure symbol CRC mismatches and
ultimately a system crash.

Adjust the scandir() filtering function so that the kernel page size is
taken into account in addition to the major/minor versions returned by
utsname(). The general rule is that module directories ending in "_Nk"
contain modules for a page-size of N KiB, whilst the absence of such
a suffix implies the default of 4 KiB.

Bug: 343971855
Test: Verified that _16k module directory is excluded by modprobe when running in userspace fastboot with 4k pages.
Change-Id: I78a0a249028bbb0bcdd78eb14de36e631e233be0
2024-06-06 11:22:07 +00:00
Yihan Dong
30d0608988 Merge "Add proposed trendy teams for CTS modules" into main 2024-06-06 01:54:57 +00:00
Steven Moreland
48028b6d9c Merge "PREUPLOAD += bpfmt" into main 2024-06-05 21:35:38 +00:00
Steven Moreland
e767a71114 Merge "init: enable 'user root' check at build time" into main 2024-06-05 19:23:20 +00:00
Elliott Hughes
5b09799b9f Merge "libc++fs is part of libc++ now." into main 2024-06-05 15:52:20 +00:00
Yihan Dong
f0d3447af5 Add proposed trendy teams for CTS modules
Change-Id: I6f4dbaa75c219dd75fec84ab8c9590c4c81ec737
Test: build locally
Bug: 341598672
2024-06-05 01:09:09 +00:00
Steven Moreland
81a1b3ec23 init: enable 'user root' check at build time
For visibility.

We could make this only for new API levels, but it isn't
currently exposed at build time, and visibility is good
on upgrades.

Bug: 340953047
Test: build, on device passing and failing requirements
Change-Id: I3a0ea47560c65114bc1b8685954d1fb7687cb8df
2024-06-05 00:58:49 +00:00
Allen Hair
1c5b2fd454 Merge "Revert "Move native coverage output directory."" into main 2024-06-04 23:37:03 +00:00
Steven Moreland
571d4faecb PREUPLOAD += bpfmt
Bugs: me
Test: upload with bp file
Change-Id: Ie8da54e7f4ceda4c50d9537bf9e8a232653d920d
2024-06-04 23:10:21 +00:00
Elliott Hughes
c088de1879 libc++fs is part of libc++ now.
Change-Id: I2be806de736377e77bb49e4b3b9f72e25f7d717a
2024-06-04 16:47:32 +00:00
Allen Hair
f28b9a8b88 Revert "Move native coverage output directory."
This reverts commit 65430f8de6.

Reason for revert: Checking to see if this is the root cause for b/342673274.

Change-Id: I9bb319e73443e57b4ac0b61f5209048d5eb7e6c0
2024-06-03 19:14:52 +00:00
Florian Mayer
f2474379e7 Add reserved to CrashDetail proto
Change-Id: I176abc740744907d8559b94b9d1361b44dcbcb14
2024-05-31 22:35:25 +00:00
Will Deacon
4e1776cedf Revert "Load modules from _16K dir when running on 16K kernel"
This reverts commit ffdb017e7d.

Overriding an explicitly-specified module path (e.g. passed via the
'-d <path>' argument) because the kernel is using 16KiB pages is
inconsistent and unexpected. Revert this change in anticipation of
filtering incompatible modules instead.

Bug: 343971855
Test: Verified that _16k module directory is excluded by modprobe when running in userspace fastboot with 4k pages.
Change-Id: If9c6e2d26fc53b12f543d531d64ef3d288ddc179
2024-05-31 19:13:30 +00:00
Nate Myren
cdd4cb7db8 Merge "Revert^2 "Only write appcompat properties if flag is defined"" into main 2024-05-31 01:31:38 +00:00
Treehugger Robot
276eabe757 Merge "Revert^2 "Set ro.fstype.data when /data is mounted"" into main 2024-05-30 21:25:26 +00:00
Kelvin Zhang
915f32d892 Revert^2 "Set ro.fstype.data when /data is mounted"
062eb59a83

Change-Id: I20c4d4c17e4a314eb8754ed9c03db3dd8e3a5d0f
2024-05-30 19:11:11 +00:00
Kiyoung Kim
ed92eabfbb Make public.libraries.android.txt available to filesystem
public.libraries.android.txt was not installable as it was used only
from microdroid. However, this module can also be used from system
image, as there is no difference from the content. This change marks the
module as no_full_install, so it can be installed in the system image
defined in Android.bp

Bug: 343357947
Test: AOSP CF build succeeded
Change-Id: I15fd47b173b5b718972a6ee18b3aecb58826909c
2024-05-30 16:06:43 +09:00
Peter Collingbourne
68cf5b2239 Merge "Add fs_config entry for *.rc files." into main 2024-05-30 00:54:48 +00:00
Priyanka Advani
58a38f4681 Merge "Revert "Set ro.fstype.data when /data is mounted"" into main 2024-05-29 23:58:59 +00:00
Kelvin Zhang
062eb59a83 Revert "Set ro.fstype.data when /data is mounted"
Revert submission 3095293-fstype

Reason for revert: breaks build cf_x86_64_only_phone-next-userdebug

Reverted changes: /q/submissionid:3095293-fstype

Change-Id: I2d1b2561ec7a3d8ea954b375153dce1a936d0294
2024-05-29 23:26:19 +00:00
Peter Collingbourne
49ecca71b5 Add fs_config entry for *.rc files.
Android init will refuse to read files that are world writable. Since
adb push makes files world writable by default, this means that adb
pushed rc files cannot be read by init. Fix it by adding an fs_config
entry for *.rc that sets their permissions to 644 root:root.

Bug: 343370899
Change-Id: If9c4dd4796caae6d177d9fdeef880949e5639648
2024-05-29 14:24:52 -07:00
Treehugger Robot
ac7923211e Merge "Set ro.fstype.data when /data is mounted" into main 2024-05-29 17:49:18 +00:00
Daniel Zheng
0381ebefc4 Merge changes I115b6b98,Iff84c0df,Ice13f58e,I5302a9a2 into main
* changes:
  libsnapshot: set num merge threads
  snapshot_proto add build configuration variables
  update supported compression methods
  libsnapshot: get read_ahead_size from build
2024-05-29 17:29:31 +00:00
Seth Moore
24e39aff4a Merge "Use shared trusty OWNERs file" into main 2024-05-29 15:01:19 +00:00
Treehugger Robot
0b64326377 Merge "init: 'user root' check use vendor API" into main 2024-05-29 13:27:16 +00:00
Steven Moreland
5088e588f7 init: 'user root' check use vendor API
This changes user root to use the year date format
that vendor API uses.

Previously this still applied to V devices, which switched
to using API level 202404 after 35.

They recommend the year/date form, and there is no
constant for this.

Bug: 340953047
Test: service_test
Change-Id: I5ba8d1251c877a785e41f0cfcc35d7cb0776f8c7
2024-05-29 00:05:26 +00:00
Nate Myren
b9e0545c85 Revert^2 "Only write appcompat properties if flag is defined"
This reverts commit 6d8304aa46.

Reason for revert: resubmission

Change-Id: Ifb66efa2b1b7a734302316259690950306af99ec
2024-05-28 23:40:59 +00:00
Seth Moore
b1a58e12dd Use shared trusty OWNERs file
Change-Id: I20f118c39927f56890a37eaa059249db5285e59b
2024-05-28 23:00:10 +00:00
Tomasz Wasilczyk
50095020db Merge "Fix libutils_binder_sdk build warnings" into main 2024-05-28 20:13:03 +00:00
Tomasz Wasilczyk
e028a195d0 Merge "Mark libutils_binder_sdk as snapshot supported" into main 2024-05-28 20:11:34 +00:00
Snehal Koukuntla
82bc07f911 Merge "[Trusty][Metrics] Update struct to add is_crash on the NS side" into main 2024-05-28 17:14:31 +00:00
Tomasz Wasilczyk
0a2a015e39 Fix libutils_binder_sdk build warnings
-Wclass-memaccess
-Winvalid-offsetof
-Wsequence-point
-Wzero-as-null-pointer-constant (turned on in ag/4503295)

Bug: 285204695
Test: m libutils_binder_sdk
Change-Id: I5b988f498cb8e0cf04617a4f7fd41ba9970d321d
2024-05-28 09:51:20 -07:00
Tomasz Wasilczyk
7badb51d22 Mark libutils_binder_sdk as snapshot supported
Bug: 302718225
Test: https://r.android.com/2803466
Change-Id: I3a26e1c4c63e0ed6de896ef31eb56f3a3a6bba01
2024-05-28 09:49:49 -07:00
Bart Van Assche
ba9d7116fb Merge "Create the /dev/sys/block/by-name/zoned_device symbolic link" into main 2024-05-28 13:47:05 +00:00