Commit graph

69602 commits

Author SHA1 Message Date
Treehugger Robot
f98bcdbac0 Merge "[fs_mgr] Use shared libutils for remount" 2021-08-30 22:20:27 +00:00
Pirama Arumuga Nainar
cdf919d1f0 [fs_mgr] Use shared libutils for remount
Bug: http://b/197965342

remount depends on libbinder.so which already depends on libutils.so.
When linking remount with libutils.a, the linker tries to fetch objects
from libutils.a to redefine undefined symbols in libbinder.so.  This
causes linker failure with upstream LLD.  Switching to shared
libutils.so instead doesn't increase the dependency closure for remount.

Test: build with aosp/1809741 which has lld with the above behavior.
Change-Id: I858042a08babe2c2db1fc8c7eeb5de62dda5f328
2021-08-30 12:18:08 -07:00
Joel Galenson
c3f73cbd15 Merge "Add bindgen bindings test" 2021-08-27 15:37:11 +00:00
David Anderson
b72fa73ace Merge "fastboot: Support casefolding in ext4 partitions." 2021-08-27 01:18:06 +00:00
David Anderson
ce8aa990d5 Merge "first_stage_init: Add SIGCHLD handler in first_stage_console" 2021-08-25 02:33:59 +00:00
Elliot Berman
6eb234017a first_stage_init: Add SIGCHLD handler in first_stage_console
Add a simple SIGCHLD handler to reap zombie processes given to init.

Bug: 197662257
Change-Id: I6e7930cfd7c311c454b361b9a541369ece2eb744
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2021-08-24 17:20:02 -07:00
Steven Moreland
53e977339b Merge "RefBase: Unknown mFlag meaning" 2021-08-24 20:22:24 +00:00
David Anderson
3936000b3e Merge "libsnapshot: Fix missing source partitions when adding a new partition." 2021-08-24 20:09:30 +00:00
David Anderson
dc3afaf54a libsnapshot: Fix missing source partitions when adding a new partition.
When adding a new partition, don't attempt to map a source partition
during boot, because none exists. Instead use the base device.

Bug: 196922070
Test: vts_libsnapshot_test
Change-Id: Ice6015237b0a76a0210819994433e52159376393
2021-08-24 00:28:11 -07:00
Christopher Ferris
a90757251d Merge "Add fault address marker in proto to tombstone." 2021-08-24 01:00:09 +00:00
Christopher Ferris
7e4c2a8ccc Add fault address marker in proto to tombstone.
When the switch was made to dump the tombstone from the protobuf,
the fault address marker in the maps section went missing. Re-add
that logic and add new unit tests to verify all of the different
behaviors.

Bug: 193935960

Test: All unit tests pass.
Test: All unit tests pass when setprop debug.debuggerd.translate_proto_to_text 0
Test: The above on cuttlefish, 32 bit and 64 bit.
Test: The above on a flame, 32 bit and 64 bit.
Change-Id: I098bb6ab4bacacae2ca0fc5ec9a73549ed0b9489
2021-08-23 16:25:13 -07:00
Joel Galenson
30d4ab6167 Add bindgen bindings test
Note that this is currently a no-op test that does nothing.  But this
makes it future proof in case we add more later.

Test: atest
Change-Id: I23817febd2122f54c40958541fc66363d38b60ca
2021-08-23 13:46:03 -07:00
陈冠有
0cbef728f9 RefBase: Unknown mFlag meaning
Change-Id: I3ddd1895c48c682bdb0868e890c62029710bf1c8
2021-08-22 16:36:36 +00:00
Christopher Ferris
c1c2b4f816 Merge "Modify missing output fd message." 2021-08-20 19:45:36 +00:00
Treehugger Robot
a896241e9b Merge "Add MicrodroidHostTestCases to TEST_MAPPING" 2021-08-20 00:14:01 +00:00
Inseob Kim
32c0ad4d33 Add MicrodroidHostTestCases to TEST_MAPPING
Microdroid shares init with its host, defined under system/core/init.
This change adds MicrodroidHostTestCases to TEST_MAPPING to ensure that
Microdroid tests can verify patches to init.

Test: presubmit
Change-Id: I55f7e3ffbaf3401d145afac5f7c53d83f69e6ba7
2021-08-19 02:50:49 +00:00
Akilesh Kailash
b504369754 Merge "snapuserd: pass arguments by reference" 2021-08-19 01:12:22 +00:00
Christopher Ferris
64a92413b6 Modify missing output fd message.
The "missing output fd" message can seem like an error, so modify
the message to indicate what is really happening. This message
will occur normally when running the debuggerd command, or when
a bugreport is generated, or when an ANR occurs. In all of those
cases, this is not an error, but an expected action.

Bug: 196189981

Test: Ran debuggerd -b and debuggerd and verified this message is seen.
Test: Ran unit tests.
Change-Id: I6e3d5a76d92b972c77fca301ea7147745bc67c37
2021-08-18 17:01:13 -07:00
Christopher Ferris
80fccb3c9a Merge "Remove trailing newlines from abort message." 2021-08-18 23:10:35 +00:00
Akilesh Kailash
9cc14503e0 snapuserd: pass arguments by reference
Bug: 193863442
Test: Build
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I5c3ad108b0ae08c411936962fc859415febac2b6
2021-08-18 22:47:04 +00:00
Christopher Ferris
e8891458e5 Remove trailing newlines from abort message.
The tombstone will add a newline after the abort message, so remove
any trailing newlines before saving/printing.

Bug: 196414062

Test: Unit tests pass.
Test: Set system property debug.debuggerd.translate_proto_to_text to 0
test: and unit tests still pass.
Change-Id: I0d3dc215eb5d8be93d99e5b9d4f0a14b1d61396d
2021-08-18 14:13:02 -07:00
David Anderson
95983cbbb6 Merge "Fix shutdown animation cannot be shown" 2021-08-18 17:26:50 +00:00
Elliott Hughes
0589b7eb94 Merge "Split up the system/core/ TEST_MAPPING." 2021-08-18 16:25:15 +00:00
Treehugger Robot
0e13b0ebb4 Merge "fs_mgr: Separate the required modules of core and recovery variants" 2021-08-18 05:33:13 +00:00
Treehugger Robot
2201ccfebe Merge "libsparse: python3." 2021-08-18 00:06:36 +00:00
Treehugger Robot
ba62af23b4 Merge "init: python3." 2021-08-17 23:57:35 +00:00
Treehugger Robot
ae451e61c8 Merge "toolbox/generate-input.h-labels.py: python3." 2021-08-17 23:12:47 +00:00
Elliott Hughes
726a6a9159 libsparse: python3.
Test: treehugger
Test: ran simg_dump.py on a file created by img2simg
Change-Id: I999747867733a2e789c0da95add0bba83c36133f
2021-08-17 15:02:00 -07:00
Elliott Hughes
34b0cc11a8 init: python3.
I've actually left the two other scripts on python2, since they're not
used in the build, and I don't actually know whether anyone's still
using them manually. Leaving them on python2 should be a sign to future
maintainers (assuming they're far enough in the future) that maybe
no-one's using them and they can just be deleted instead.

Test: treehugger
Change-Id: I4d7dfdbf9f2a34ddd15cd4be077eeef2248cc596
2021-08-17 14:46:59 -07:00
Elliott Hughes
278bfa06e9 toolbox/generate-input.h-labels.py: python3.
Test: treehugger
Change-Id: Ia63fd0db0b678de05ab2a83411f7a04d81e401e9
2021-08-17 14:34:55 -07:00
Treehugger Robot
6809b6705f Merge "Handle long responses by keymint IPC." 2021-08-17 19:26:16 +00:00
Suren Baghdasaryan
228fbadc6e Merge changes from topic "extra_free_kbytes.sh"
* changes:
  Use extra_free_kbytes.sh whenever sys.sysctl.extra_free_kbytes changes
  init: Add extra_free_kbytes.sh script to adjust watermark_scale_factor
2021-08-17 19:17:59 +00:00
Colin Cross
fb66f3d13f Merge "Include sys/select.h for fd_set" 2021-08-17 18:56:16 +00:00
Suren Baghdasaryan
92cb2e8583 Use extra_free_kbytes.sh whenever sys.sysctl.extra_free_kbytes changes
sys.sysctl.extra_free_kbytes property controls the value set to the
/proc/sys/vm/extra_free_kbytes out-of-tree kernel knob. Replace its
use with execution of extra_free_kbytes.sh script which calculates
and sets corresponding value to /proc/sys/vm/watermark_scale_factor
upstream-supported kernel knob.

Bug: 109664768
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Iaece28eb858a20c8c39578a28dc6bbc6adc13c40
2021-08-17 17:02:25 +00:00
Suren Baghdasaryan
642048d969 init: Add extra_free_kbytes.sh script to adjust watermark_scale_factor
Android uses an out-of-tree /proc/sys/vm/extra_free_kbytes kernel knob
to increase low watermark. A similar /proc/sys/vm/watermark_scale_factor
knob supported in upstream kernel can be used for the same purpose.
The script implements conversion from desired extra_free_kbytes value
to watermark_scale_factor value and sets watermark_scale_factor according
to the value for extra_free_kbytes provided as a parameter.
Note that watermark_scale_factor affects high watermark differently
from extra_free_kbytes. While extra_free_kbytes increases low and high
watermarks by the same amount, watermark_scale_factor affects high
watermark 2x times. Therefore it is expected that replacing the usage
extra_free_kbytes with watermark_scale_factor will keep the same low
watermark but high watermark will be higher than before.

Usage:
    extra_free_kbytes.sh <extra_free_kbytes value>

Bug: 109664768
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Id8949be731da77be884cdeec3a765ea291dbc2f0
2021-08-17 17:02:18 +00:00
Yi-Yo Chiang
b33cfbfc4b Merge "fastboot/README.md: Update response packet max size to 256" 2021-08-17 14:15:36 +00:00
David Anderson
9784f5ae1c Merge "Support multiple fstab configs for one mount point" 2021-08-17 01:39:59 +00:00
Colin Cross
cbca269d75 Include sys/select.h for fd_set
socket.cpp fails to compile on musl with a missing definition of
fd_set.  Include sys/select.h for the definition.

Bug: 190084016
Test: m USE_HOST_MUSL=true fastboot
Change-Id: I095a56381a85981f42444f4c39ae8e7786d8640f
2021-08-16 17:20:19 -07:00
Elliott Hughes
22e082e87a Split up the system/core/ TEST_MAPPING.
A lot of things had moved out of system/core/ without their TEST_MAPPING
entries having gone with them, reducing the amount of presubmit coverage
for those things.

In order to reduce the likelihood of that happening again, I've pushed
all that remained in the system/core/ TEST_MAPPING down into the
individual subdirectories.

Test: treehugger
Change-Id: Ib75d65f9200fa64ae1552471da6fbe5b7023cf94
2021-08-16 16:37:10 -07:00
Treehugger Robot
55101e53fe Merge "Add mock interface for EmitXorBlocks" 2021-08-16 18:31:19 +00:00
Hongguang Chen
f156552ef1 Merge "Add Quiescent Reboot Target" 2021-08-16 18:12:17 +00:00
Yi-Yo Chiang
a7656fa3b6 fastboot/README.md: Update response packet max size to 256
This change is to update the doc to reflect the current state and it
doesn't affect the runtime behavior.
The max packet size was updated to 256 by aosp/1226715.

Bug: 196676392
Test: Presubmit; doc update doesn't affect build
Change-Id: I73b0a416730d09fdb24ea81bffe52ddd89534132
2021-08-14 22:12:34 +08:00
Bart Van Assche
dba7e067dd Merge changes Ifa16084c,I3e3560f3,I63637811
* changes:
  Reduce the queue depth of loop devices used by the zram driver
  libdm: Export ExtractBlockDeviceName()
  libdm: Make ExtractBlockDeviceName() return its result
2021-08-13 17:43:17 +00:00
zengshuchuan
21c97a5780 Fix shutdown animation cannot be shown
Don't start shutdown critical service or turn off
backlight, when ro.init.shutdown_animation=true

Bug: 196511757
Test: config ro.init.shutdown_animation=true and build
      shutdownanimation.zip to /system/media/
Signed-off-by: zengshuchuan <zengshuchuan@allwinnertech.com>
Change-Id: I5932b7281af630e80247048a70fe1b24f536d1d9
2021-08-13 17:34:39 +08:00
Huang Jianan
1bfa48af3c Support multiple fstab configs for one mount point
This allows us to mount with such fstab:
/dev/block/by-name/system /system ext4  ro slotselect
/dev/block/by-name/system /system erofs ro slotselect
This will be used when mount partition through ensure_path_mounted
in recovery.

Bug: 195726623
Test: mount with different image on the same fstab
Change-Id: I7761489a3e2bf46331563e872b6dfaa8b685a082
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
2021-08-13 16:08:54 +08:00
Bart Van Assche
0223cd89f7 Reduce the queue depth of loop devices used by the zram driver
Make the queue depth of loop devices identical to that of the underlying
storage device. This patch reduces latency by lowering the queue depth.
With this patch applied I see the following:

 # cat /sys/block/loop30/queue/nr_requests
32

Bug: 194450129
Test: Built Android images, installed these and verified that the queue depth of loop devices is 32 instead of 256.
Change-Id: Ifa16084c7df3a54d9559c2388abc4a8392ff88c6
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-12 15:42:51 -07:00
Bart Van Assche
c24f7b8224 libdm: Export ExtractBlockDeviceName()
Make this function available to libdm users. A caller outside libdm will
be added by a later patch.

Bug: 194450129
Test: mm libfs_mgr libdm_test
Change-Id: I3e3560f3cdef8978eac644d5b53cf3851209c0c2
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-12 15:11:48 -07:00
Bart Van Assche
6b296db8e3 libdm: Make ExtractBlockDeviceName() return its result
From https://engdoc.corp.google.com/eng/doc/devguide/cpp/styleguide.md:
"Prefer using return values over output parameters: they improve
readability, and often provide the same or better performance (see the C++
Primer)." Implement this advice for ExtractBlockDeviceName(). This patch
does not change any functionality.

Bug: 194450129
Test: mm libfs_mgr libdm_test
Change-Id: I6363781163eba08e6128507b403200f472f68a59
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-12 15:11:39 -07:00
Janis Danisevskis
5b4b52126e Handle long responses by keymint IPC.
The KeyMint TA may send responses that are longer thant the 8K buffer
that the KeyMint HAL holds. This patch introduces
trusty_keymaster_call_2 which can grow the receive buffer on demand.

Bug: 195622501
Test: VTS and CTS test for regression testing.
Change-Id: Ia06e590e547e649ca81cda9a71851f334970788f
Merged-In: Ia06e590e547e649ca81cda9a71851f334970788f
2021-08-12 19:21:11 +00:00
Yabin Cui
c5c532fc31 Merge "debuggerd: add -fno-finite-loop to fix test." 2021-08-11 23:24:11 +00:00