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
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>
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
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
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
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
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
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
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
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
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
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
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
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
* changes:
Reduce the queue depth of loop devices used by the zram driver
libdm: Export ExtractBlockDeviceName()
libdm: Make ExtractBlockDeviceName() return its result
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
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>
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>
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>
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>
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