Commit graph

75240 commits

Author SHA1 Message Date
Christopher Ferris
dbe14f2f73 Merge "Use new AndroidUnwinder object." 2022-05-12 03:35:34 +00:00
Richard Chang
a596618d4a Merge "Remove redundant settings in init.rc for cpu scaling_max_freq" 2022-05-12 02:48:27 +00:00
Treehugger Robot
c545516e2c Merge "Doc Thread requirement." 2022-05-12 01:53:32 +00:00
Treehugger Robot
a14a44ca66 Merge "Make sure all expected actions get run." 2022-05-12 00:05:34 +00:00
Steven Moreland
90722d254e Doc Thread requirement.
Fixes: 230893354
Test: N/A
Change-Id: I426184840c7bf61fe3369388cfc6db184470acf0
2022-05-11 23:13:17 +00:00
Christopher Ferris
d2bd6c5f13 Use new AndroidUnwinder object.
Replace libbacktrace with the new AndroidUnwinder object.

Bug: 120606663

Test: Ran unit tests.
Test: Added call of UnwindMainThreadStack() in DebugRebootLogging()
Test: and verified unwind data is logged properly.
Change-Id: Ia724f9485377d6d2c894283242a3c5653bf82768
2022-05-11 15:39:20 -07:00
Christopher Ferris
af4db6749a Merge "Use the new AndroidUnwinder object." 2022-05-11 20:53:58 +00:00
Richard Chang
6f554d1a2a Remove redundant settings in init.rc for cpu scaling_max_freq
The uevent.rc will setup owner/group/permissions in all the conditions
including device boot, cpu hotplugs, and cpu online/offline.
Since ueventd always regenerates uevents at boot, we could remove the
redundant settings in init.rc.

Bug: 230291215
Test: Build and check scaling_max_freq on Cuttlefish and B3 device
Change-Id: I4fcc440f2a950967667f88da574faa501b3e227c
2022-05-11 08:55:27 +00:00
Florian Mayer
6268f6ab7a Make sure all expected actions get run.
Change-Id: I2b390ffa394ccd6a50a4a5d8805ce5a580c369b9
2022-05-11 01:02:03 +00:00
Christopher Ferris
ab63124cd9 Use the new AndroidUnwinder object.
Replaces libbacktrace in CallStack. There is one small behavioral
change, the BuildId data is added to the unwinds.

Bug: 120606663

Test: All unit tests pass.
Test: Run the fuzzer for over an hour without any crashes.
Change-Id: Ic8a4247c515ce0d3cdc4d2cc15167d1948b15fa5
2022-05-10 17:19:12 -07:00
Richard Chang
abff801ae6 Merge "Align file permissions for cpufreq scaling_max_freq node" 2022-05-10 03:31:02 +00:00
Treehugger Robot
2d6ffb27d6 Merge "Promote HWASan tests to presubmit." 2022-05-10 01:10:11 +00:00
Florian Mayer
4dd9529e2b Promote HWASan tests to presubmit.
They have been passing and do not show significant slowdown.

Change-Id: I130335423a2e111fb8cede493ce5c7449d4907ef
2022-05-09 22:42:47 +00:00
Richard Chang
cbd75b85a2 Align file permissions for cpufreq scaling_max_freq node
The ueventd.rc sets permissions to 0664 but init.rc sets cpu0 to
0660. Since lots of processes already had read access for cpufreq nodes
(refer to system/sepolicy/public/domain.te), align all cpus to 0644
permissions.

Bug: 230291215
Test: Build
Change-Id: I3c72d69590998f8da894fb02097212f834edd48c
2022-05-09 09:12:58 +00:00
Treehugger Robot
37a5303642 Merge "Promote HWASan tests to presubmit." 2022-05-06 22:34:41 +00:00
Treehugger Robot
d65a7f0ca0 Merge "Promote HWASan tests to presubmit." 2022-05-06 22:30:42 +00:00
Florian Mayer
1e7af8d975 Promote HWASan tests to presubmit.
They have been passing and do not show significant slowdown.

Change-Id: If3aea998fcf33559824cf02e9963e8a71ac80163
2022-05-06 19:14:15 +00:00
Florian Mayer
eafc35bd4f Promote HWASan tests to presubmit.
They have been passing and do not show significant slowdown.

Change-Id: I2e072d3e8f772ddcc43d497fd306bed8387403db
2022-05-06 19:08:21 +00:00
Trevor Radcliffe
b0fa575e1f Merge "set isolated: false on fuzzy_fastboot" 2022-05-06 17:11:17 +00:00
Jaegeuk Kim
45aafa58d4 Merge "Support /dev/fscklogs/log in f2fs back" 2022-05-04 07:35:09 +00:00
Treehugger Robot
ced437ea26 Merge "Promote tests to HWASan presubmit." 2022-05-04 03:57:01 +00:00
Suren Baghdasaryan
25f0c1c457 Merge changes from topic "228160715_fix"
* changes:
  init: Purge empty process groups on zygote restart
  libprocessgroup: Add a function to remove only empty process groups
2022-05-03 19:43:22 +00:00
Florian Mayer
78bf3beb49 Promote tests to HWASan presubmit.
Change-Id: I55711f80c4ea870a78e7971fe133f096dac9ef1a
2022-05-03 19:40:36 +00:00
Alix Espino
d3918d8d1e Merge "Moved contents of clang_cflags into cflags" 2022-05-03 17:12:37 +00:00
Treehugger Robot
04afe0c3dc Merge "Delete stale Virtualization image files" 2022-05-03 09:28:57 +00:00
Jaegeuk Kim
3aca50cb9e Support /dev/fscklogs/log in f2fs back
We need to fix the below error happening in early stage.

[   24.835617][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/sda1
[   24.843693][    T1] logwrapper: Cannot log to file /dev/fscklogs/log

Bug: 230637147
Bug: 230879192
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I19bc5f7154577e29414f855de6ce72172b281975
2022-05-02 15:06:43 -07:00
Daeho Jeong
aceda4728b Merge "init.rc: increase readahead window multiplier for POSIX_FADV_SEQUENTIAL files" 2022-05-02 17:43:57 +00:00
Daeho Jeong
431e35ef7c init.rc: increase readahead window multiplier for POSIX_FADV_SEQUENTIAL files
Set readahead window multiplier for POSIX_FADV_SEQUENTIAL files as 16 to
enhance file read performance like a language package loading.

Bug: 192011293
Test: adb shell cat /dev/sys/fs/by-name/userdata/seq_file_ra_mul
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I7f7e4339651be2d6aa99b07bcb12ab62136a940e
2022-04-29 11:52:03 -07:00
Suren Baghdasaryan
af64077f83 init: Purge empty process groups on zygote restart
When system_server crashes or gets killed, it causes zygote to kill
itself, which in turn leads to killing all processes in the same
process group (all apps). This leaves empty process groups because
system_server is not there to remove them.
Purge empty process groups when init detects zygote death.

Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0ce27eea28f8713e52033bbec2d5363a7b8ff5db
2022-04-29 17:17:51 +00:00
Suren Baghdasaryan
4345f3f50a libprocessgroup: Add a function to remove only empty process groups
When system_server and zygote crash or get killed, all apps also get
killed but their process groups are left empty. Provide a function to
remove all empty process groups so that init can purge them when this
even happens.

Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ife38ca021e80cd38106f218ae13183e8c2631bf0
2022-04-29 10:17:17 -07:00
Alan Stokes
df84dd93e5 Delete stale Virtualization image files
Delete all files and directories under
/data/misc/virtualizationservice at boot. Originally they were owned
by the virtualizationservice user; we now run as system, and don't
have permission to remove them after boot.

Bug: 230056726
Test: Create fake stale dir+file, see them deleted
Change-Id: I5ff7d055aeeb25ba7693e50876d6b8a830c4bf51
(cherry picked from commit 34ee0c931c)
2022-04-29 10:56:19 +00:00
Trevor Radcliffe
1adca2b8e9 set isolated: false on fuzzy_fastboot
fuzzy_fastboot causes vts to fail when it has isolated set to true
so manually set it to false to avoid this.

Bug: 178498003
Test: Ran tests that failed presubmit
Change-Id: I871854c26e07ac6ad94feb14703b705a3054c176
2022-04-28 19:30:42 +00:00
Treehugger Robot
a9eee03c56 Merge "sparse_fuzzer: Bug fix" 2022-04-28 12:53:23 +00:00
Elliott Hughes
4ba0e62970 Merge "libutils: clearer abort on overflow." 2022-04-28 00:16:32 +00:00
Elliott Hughes
a5f2e4d421 libutils: clearer abort on overflow.
Let's turn a bug into a feature... Since this code is built with intsan,
anyone who caused overflow here will have had an abort, so we know
no-one actually needs the BAD_INDEX return that was presumably the
original author's intent. So let's just mandate that, since it's a lot
harder to ignore an abort than it is to ignore an error return.

Bug: http://b/179044558
Test: treehugger
Change-Id: I08f1018f9da1e09de885699138b7543d55bb2a36
2022-04-27 14:29:44 -07:00
Lucas Wei
a85c719661 Merge "fastboot: Add vendor_kernel_boot" 2022-04-25 18:31:36 +00:00
Jaegeuk Kim
4669f919a6 Merge "Shutdown f2fs to avoid fsck" 2022-04-25 16:42:48 +00:00
Jooyung Han
0f3f4f402e Merge changes I72a3720c,Idac0d0ef
* changes:
  Migrate compare-bootcharts.py to python3
  Unshare mount namespace in bootchart's thread
2022-04-25 06:31:38 +00:00
Treehugger Robot
ebfdbc7a6c Merge "Remove stale files in /data/misc/virtualizationservice" 2022-04-25 03:27:07 +00:00
Jooyung Han
cee25aa926 Migrate compare-bootcharts.py to python3
Bug: 229983560
Test: system/core/init/compare-bootcharts.py \
          base-bootchart-dir exp-bootchart-dir
Change-Id: I72a3720cb3a80ef8d4fcb06fba8c8893ac08c930
2022-04-25 10:26:08 +09:00
Jooyung Han
7f8721b992 Unshare mount namespace in bootchart's thread
When bootchart is enabled its thread shares the mount namespace context
with the main thread. This prevents the main thread to switch the mount
namespace later with setns().

So, unshare() the mount namespace of the bootchart thread.

Bug: 229983560
Test: rebooted with bootcharting on/off
    enter_default_mount_ns should succeeded.
Change-Id: Idac0d0efcb4f7f7d8a7cbcebf8fa2fa29f104c35
2022-04-25 10:26:07 +09:00
Jiyong Park
97cc69ee5d Remove stale files in /data/misc/virtualizationservice
[1] changed the UID of the virtualizationservice daemon and
/data/misc/virtualizationservice directory to `system`. However, this
can cause a permission denial issue when the directory has stale files
when the device was running a build before [1] and an OTA to [1] (or
above) is attempted. The daemon tries to delete the stale files - which
must have been still labeled as old UID and thus the daemon has no
privileged to delete them.

Fixing this issue by ensuring that the directory is always empty by
init.

[1] https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2059527

Bug: 230056726
Test: watch TH
Change-Id: I61c0297503347932b14b83859bec9ff82628336f
2022-04-25 09:47:03 +09:00
Steven Moreland
d438ea723b Merge "ueventd: suggest move location for ueventd config" 2022-04-22 21:38:48 +00:00
Jaegeuk Kim
3e595d5e67 Shutdown f2fs to avoid fsck
Bug: 229406072
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Id3b27219ab2a4655f1740829b0f03f027e66349d
2022-04-22 12:48:09 -07:00
Steven Moreland
2098314842 ueventd: suggest move location for ueventd config
Bug: 229650435
Test: N/A
Change-Id: I4645fd5a95b46ff40a0e8ee25130788ebfd01d72
2022-04-21 20:13:40 +00:00
Mitch Phillips
5411905232 Merge "[GWP-ASan] Enable debuggerd to pull more allocation metadata." 2022-04-21 18:12:43 +00:00
Treehugger Robot
ff1750c5f6 Merge "Fix lints from Rust 1.60.0" 2022-04-21 05:35:46 +00:00
Alix
9640339389 Moved contents of clang_cflags into cflags
Test: Treehugger
Bug: 226636335
Change-Id: I30294801423e6d39ab1d8ed3804c15a6ff0e90e5
2022-04-21 03:41:26 +00:00
Automerger Merge Worker
51d2d073f2 Merge "Merge "Merge "vts_libsnapshot_test: Fix free space calculation." into android12-tests-dev am: abed76bf3e" into android12L-tests-dev am: 3a4b134e84" 2022-04-21 01:13:56 +00:00
Automerger Merge Worker
f21fd279b9 Merge "Merge "vts_libsnapshot_test: Fix free space calculation." into android12-tests-dev am: abed76bf3e" into android12L-tests-dev am: 3a4b134e84
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2066968

Change-Id: Ie35c2b7eb4f6470d220b2a91d5039f034fa20769
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 01:13:54 +00:00