Commit graph

78659 commits

Author SHA1 Message Date
Tri Vo
ad4ecd962c Merge "Implement getHardwareInfo() in Trusty KM TA" 2022-10-12 22:53:43 +00:00
Liu Cunyuan
8c0101b971 Add tomstone proto support for riscv64
Signed-off-by: Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: Ie22c2895fc30fab68eddc18713c80e403f44b203
2022-10-12 22:31:45 +00:00
Chen Guoyin
a22af66e4b Add seccomp policy for riscv64 crash_dump
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: Ie58bd7cf5dde792d8fba78602b5f53471752ab24
2022-10-12 22:31:39 +00:00
Xia Lifang
b13a10bb5d Add riscv64 support for debuggerd/crasher
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I521c6da61cf2f6f67a73febf368068c430d94cdb
2022-10-12 22:30:27 +00:00
Elliott Hughes
ef8ea8f9f6 Merge changes I840cce02,I3dbe6b6d
* changes:
  Add code_coverage seccomp policy for riscv64
  Add riscv64 support for libcutils
2022-10-12 21:58:56 +00:00
Bart Van Assche
7a952617f6 libprocessgroup: Improve error messages
Change two PLOG() statements into LOG() statements since PLOG() should
only be used if errno has been set. Make it easier to find the code that
logs an error message.

Bug: 213617178
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Change-Id: I73443f3adb7d7ba3fc0d39a55777f0b132529fbd
2022-10-12 13:48:52 -07:00
Tri Vo
025b7f3cd8 Implement getHardwareInfo() in Trusty KM TA
Bug: 253109915
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I579d563759a3af97100da95dab6a99ca52d0b384
2022-10-12 10:35:49 -07:00
Chen Guoyin
0d77b388f5 Add code_coverage seccomp policy for riscv64
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I840cce02a087d05587bfa61824e9071732c16218
2022-10-12 22:22:09 +08:00
Liu Cunyuan
46ed34b68f Add riscv64 support for libcutils
Signed-off-by: Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I3dbe6b6d79c2655ab76f48e48fd22ab72d761dfd
2022-10-12 22:16:41 +08:00
Yi-Yo Chiang
15f94436b3 fs_mgr_overlayfs: Add scratch size override system property
Bug: 253207748
Test: Treehugger
Change-Id: I7140044d127e7db99d86decbe818be3680d26995
2022-10-12 20:23:19 +08:00
Yi-yo Chiang
cf10e2097d Merge "Replacing fs_mgr_dir_is_writable(work) with fs_mgr_rw_access(work) to check whether the scratch partition is writable." 2022-10-12 10:06:48 +00:00
yi.sun
301adfcc07 Replacing fs_mgr_dir_is_writable(work) with fs_mgr_rw_access(work) to
check whether the scratch partition is writable.

Delate fs_mgr_dir_is_writable, as it may cause remount to fail.

Steps to reproduce:
1.adb root
2.adb remount
3.adb reboot
4.adb remount
5.push files to the system partition until the scratch partition is full
6.check that the Available of /mnt/scratch is zero through the df command
7.reboot
8.adb root
9.adb remount
Now, overlayfs failed to mount.

But I want to continue to view the files that were previously pushed to
the system partition.
Mounting of overlayfs should not be blocked when there is not enough space.
It seems reasonable to use fs_mgr_rw_access(work) to check whether
the partition is writable.
We should allow mount even if scratch is full, because this allows
the user to delete previously pushed files to free up space.

Bug: 240635368
Change-Id: I726ccd064cfabfab29789e7c690ea8cb574a6344
Signed-off-by: yi.sun <yi.sun@unisoc.com>
2022-10-12 03:06:22 +00:00
Thurston Dang
aa9eb7c87a Merge "storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side" 2022-10-12 00:27:03 +00:00
Akilesh Kailash
889b446810 Merge "init: Detach daemon only after sepolicy is loaded" 2022-10-11 21:04:42 +00:00
Yi-yo Chiang
9b123de886 Merge "Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE" 2022-10-11 10:31:19 +00:00
Treehugger Robot
f9ad588898 Merge "fs_mgr_overlayfs: Revert to use /data only if VAB" 2022-10-11 09:44:31 +00:00
Treehugger Robot
8b70bc46fb Merge "wear: add libicu to list of public libraries" 2022-10-11 07:05:11 +00:00
Yi-yo Chiang
c540ab9bf8 fs_mgr_overlayfs: Revert to use /data only if VAB
Partial revert of aosp/2240456 to fix b/251472189

Bug: 251472189
Test: Treehugger
Test: adb-remount-test
Test: g3-app-compat-main
Change-Id: Ifbd608a249fdc599954c34a134ef8497fdf24b46
2022-10-11 05:27:44 +00:00
Christopher Ferris
4fb3712462 Modify the mmc data structure.
The new 6.0 kernel headers changed all variable length
structures from [0] to []. This causes a clang warning to
trigger, so rewrite the mmc data structures using a union
to avoid having a variable sized array in the middle of the
structure.

Test: Builds.
Change-Id: Ib1ac92c4f76af386d934f51a3c73cb8914e97624
2022-10-10 15:26:10 -07:00
Akilesh Kailash
035e557fd3 init: Detach daemon only after sepolicy is loaded
The new sequence of operation would be:

1: Load sepolicy - Daemon will continue to be alive and serve any I/O request

2: After sepolicy loading is complete - Switch the device-mapper tables.

3: Kill the block device daemon launched in the first-stage init.

4: Re-launch the daemon with the correct selinux labels set.

5: Enforce the sepolicy

Bug: 240321741
Test: Full OTA on pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Idd392f0f0aae7d93e546c0ec0762e6c07b6263e4
2022-10-10 21:58:52 +00:00
Steven Moreland
b9d8e8289e Merge changes I732e5b8a,I4271909e
* changes:
  libutils: RefBase DEBUG_REF love
  libutils: DEBUG_* modes compile forever
2022-10-10 20:40:35 +00:00
Steven Moreland
b7412c8cd6 libutils: RefBase DEBUG_REF love
Done here:
- path saved to a useable location on host
- path always printed (for visibility for new users)
- open(.., 666) - That's '01204' not '0644' oops

Future considerations:
- make defines constexpr instead of ifdef
- copy malloc hook design to avoid needing to recompile code
- make libutilscallstack default on host
- run libutils tests, not just test compile debug mode
- code incorrectly prints ref 'doesn't exist'
  seems it's gotten out of sync, but still good enough
  to use stacktraces

Bug: 244325464
Test: manual
Change-Id: I732e5b8aec3cd946ef3559a2a814caf693846cc0
2022-10-10 16:58:57 +00:00
Ludvig Hansson
f2435108ce wear: add libicu to list of public libraries
Bug: 250668939
Test: atest CtsIcu4cTestCases:Icu4cGTests

Change-Id: I3348171dbbe5c22f601427de763109e02bd7e913
2022-10-10 14:56:20 +00:00
Sayanna Chandula
1d0fec78c4 Merge "init: Support reboot reason with thermal warmreset" 2022-10-08 15:47:35 +00:00
Steven Moreland
377adea81c libutils: DEBUG_* modes compile forever
I've seen these fixed before, so we compile the debug modes
now.

Bug: 244325464
Test: 'm libutils_test_compile'
Change-Id: I4271909e81893ad448bc46b8a3a567a84c40f8a3
2022-10-08 05:13:47 +00:00
Sayanna Chandula
5754b5ab10 init: Support reboot reason with thermal warmreset
Thermal shutdown could be due to tskin temperature or
battery temperature. Pass reason while rebooting the
system to reflect properly in boot.reason

Bug: 238464124
Test: Build and boot on device. Check reboot reason
for thermal shutdown and battery thermal shutdown with
thermal warmreset enabled.

Change-Id: I192562fed48ae7da7843e383362cd22a76ce479f
2022-10-07 14:11:25 -07:00
Yi-Yo Chiang
ddc9763ee2 Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE
This variable is always false or empty now, so clean up remaining
references of the variable.

Bug: 241346584
Test: Presubmit
Change-Id: Id5c37a1391239206477fd802d364a2678692f513
2022-10-07 21:17:40 +08:00
Treehugger Robot
460f70bb52 Merge "Adding target (sdk-repo-platform-tools) that is used by gmac(sdk_mac) build." 2022-10-07 04:13:51 +00:00
Yi-yo Chiang
ae57e8da32 Merge "remount: Remove AVB 1.0 code & opaque exit code" 2022-10-07 03:47:03 +00:00
Shaju Mathew
6c27f235cf Adding target (sdk-repo-platform-tools) that is used by gmac(sdk_mac) build.
Bug: 249370316
Test: N/A (coastguard)

Signed-off-by: Shaju Mathew <shaju@google.com>
Change-Id: I641d4f8dc60652c7e8eaebafd905090d3c0324f2
2022-10-06 22:37:09 +00:00
Bob Badour
e2b1d3c846 Merge "Add LOCAL_LICENSE_KINDS to system/core" 2022-10-06 22:28:09 +00:00
Bob Badour
03d5052754 Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  init/fuzzer/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I2db55c80799d0a8fc5935d9b07a2ddb17eb7235e
2022-10-06 19:59:07 +00:00
Treehugger Robot
71d9f3607b Merge changes I264d0891,I1af733e7,Iae344c1e
* changes:
  Added init_ueventHandler_fuzzer
  Added init_property_fuzzer
  Added init_parser_fuzzer
2022-10-06 13:59:37 +00:00
Yi-Yo Chiang
ce2dbd009f remount: Remove AVB 1.0 code & opaque exit code
* Remove AVB 1.0 (fec).
* Assert device is bootloader unlocked in main().
* Since error is already logged to stderr and logd, there is no need to
  return an opaque enum value as error code. Just return 1 if main()
  encounters any error.

Bug: 241688845
Test: Presubmit
Test: adb-remount-test
Change-Id: I06df6f92a3d4adaca77061920736056c9051c112
2022-10-06 18:54:19 +08:00
Yi-yo Chiang
5653687caf Merge changes I8b5e08a3,Iccfe06f9
* changes:
  fs_mgr_overlayfs: Remove support for physical scratch
  fs_mgr_overlayfs: Refactor scratch mounting code
2022-10-06 06:19:12 +00:00
Wayne Ma
78e23f23ce Merge "Make libstatspull_bindgen available to resolv apex." 2022-10-06 01:28:18 +00:00
Thurston Dang
8ae1c1db42 storageproxyd: Add STORAGE_FILE_GET_MAX_SIZE API on Android side
This is the Android-side companion change to go/oag/2241573,
adding the interface for STORAGE_FILE_GET_MAX_SIZE (implementation
sold separately).

Bug: 247003431
Test: None
Change-Id: Ie834c91a085b2e4a668e0d9d22ec0f6b1e4e6c1c
2022-10-06 00:12:00 +00:00
Yi-yo Chiang
27cf51e71c Merge "fs_mgr_overlayfs: Cleanup -user build stubs" 2022-10-05 09:19:45 +00:00
Yi-Yo Chiang
9032c00869 fs_mgr_overlayfs: Remove support for physical scratch
Deprecate physical scratch path, support only dynamic partition scratch
and scratch on /cache.

Bug: 243116800
Test: adb-remount-test
Change-Id: I8b5e08a38e323139b56b169865dcaf1a6620cf20
2022-10-05 01:13:32 +08:00
Yi-Yo Chiang
ea2f32a438 fs_mgr_overlayfs: Refactor scratch mounting code
Make the control flow less chaotic and rename to cpp style function
name.

Bug: 243116800
Test: adb-remount-test
Change-Id: Iccfe06f9cb9659b7b0bad085250422e298cc4f27
2022-10-05 01:11:18 +08:00
Wayne Ma
8044045a1e Make libstatspull_bindgen available to resolv apex.
Test: m successed
Change-Id: Ia367ab5a87794c82238291b27a783278f319e767
2022-10-05 00:54:47 +08:00
David Anderson
aaa16bbad4 Merge "init: Statically link libbootloader_message." 2022-10-04 16:32:50 +00:00
Yi-yo Chiang
7214c98d2e Merge "remount: Remove errno test & improve messaging of fs_mgr_overlayfs_mount_all" 2022-10-04 06:27:27 +00:00
David Anderson
12e53bc350 init: Statically link libbootloader_message.
This is to resolve idiosyncracies with test packaging.

Bug: 244284630
Test: ldd -d -r CtsInitTestCases
Change-Id: Iec2c14c3ca5cd359b79d9e1f12e689c0eeffb122
2022-10-03 21:37:56 -07:00
Florian Mayer
0b2cf1d6ec Merge "[MTE] add device config for permissive mode" 2022-10-03 21:04:24 +00:00
Treehugger Robot
d07f11168b Merge "[MTE] Reset MTE state for userdata wipe in fastbootd" 2022-10-03 19:39:33 +00:00
Treehugger Robot
6e74f8c4a6 Merge "bootstat: remove unused FDE boot events" 2022-10-03 18:46:56 +00:00
Florian Mayer
4c3c526e54 [MTE] Reset MTE state for userdata wipe in fastbootd
Test: $ adb shell su root [...]/mtectrl memtag,memtag-kernel default
      $ adb shell 'su root dd bs=1 skip=32832 if=/dev/block/bootdevice/by-name/misc count=15 | xxd'
      00000000: 015a fefe 5a05 [...]
      $ adb reboot fastboot
      $ fastboot -w
      $ fastboot reboot
      $ adb shell 'su root dd bs=1 skip=32832 if=/dev/block/bootdevice/by-name/misc count=15 | xxd'
      00000000: 0000 0000 0000 [...]

Bug: 245596152
Change-Id: I5e2d4584776ab1685bdf37124e32dcb827eaf05a
2022-10-03 11:01:36 -07:00
Florian Mayer
84a30c8526 Merge "[MTE] Add device config to control upgrade time" 2022-10-03 17:47:12 +00:00
Florian Mayer
7a6079000c [MTE] add device config for permissive mode
Change-Id: Ifb16c0f29f07870f59ab50522d010689ee232de8
2022-10-03 09:58:39 -07:00